Skip to main content

Crate baml_agent_tui

Crate baml_agent_tui 

Source

Re-exports§

pub use agent_task::spawn_agent_loop;
pub use agent_task::AgentEventHandler;
pub use agent_task::AgentTaskEvent;
pub use agent_task::ChannelHandler;
pub use agent_task::TuiAgent;
pub use chat::ChatState;
pub use context_bar::ProjectContext;
pub use event::AppEvent;
pub use headless::run_headless;
pub use help::HelpOverlay;
pub use picker::FuzzyPicker;
pub use picker::PickerAction;
pub use picker::PickerItem;
pub use picker::PickerPreview;
pub use terminal::init_terminal;
pub use terminal::restore_terminal;
pub use terminal::setup_panic_hook;
pub use terminal::Tui;

Modules§

agent_task
chat
context_bar
Compact project context bar widget.
event
headless
help
Help overlay widget — shows keybindings and shortcuts.
picker
Generic fuzzy picker widget — reusable overlay for searching and selecting items.
terminal

Structs§

ActionResult
Result of executing a single action.
AgentConfig
AgentEngine
Generic engine that builds a BamlRegistry from AgentConfig.
LoopConfig
Configuration for the agent loop.
Session
Session manager: JSONL persistence, history access, context trimming.
StepDecision
Result of one LLM decision step (STAR: Situation → Task → Action).

Enums§

LoopEvent
Events emitted by the agent loop (print, TUI, log).

Traits§

AgentMessage
A message in the agent conversation.
BamlRegistry
Trait abstracting BAML’s generated ClientRegistry.
MessageRole
Role of a message in the agent conversation.
SgrAgent
Base SGR Agent trait — implement per project.
SgrAgentStream
Streaming extension for SGR agents.

Functions§

run_loop
Run the SGR agent loop (non-streaming).
run_loop_stream
Run the SGR agent loop with streaming tokens.