Agent Air TUI
TUI frontend for agent-air, providing a ratatui-based terminal interface.
This crate provides:
- TuiRunner - Extension to run AgentAir with a TUI
- App - Complete TUI application with chat, input, and command handling
- ChatView - Chat message display with streaming support
- Layout system - Flexible layout system with templates and custom layouts
- Permission and question panels for tool interactions
- Markdown rendering with theming support
- Table rendering
- Session pickers
- Slash command system
- Text input with cursor management
- Theme system with 45+ built-in themes
Quick Start
use agent_air_runtime::agent::{AgentConfig, AgentAir};
use agent_air_tui::AgentAirExt;
struct MyConfig;
impl AgentConfig for MyConfig {
fn config_path(&self) -> &str { ".myagent/config.yaml" }
fn default_system_prompt(&self) -> &str { "You are helpful." }
fn log_prefix(&self) -> &str { "myagent" }
fn name(&self) -> &str { "MyAgent" }
}
fn main() -> std::io::Result<()> {
let agent = AgentAir::new(&MyConfig)?;
agent.into_tui().run()
}