Chat
Full-featured terminal chat interface for AI agents
Quick Start
main.py
Python REPL
Interactive
Installation
code
Parameters
| Parameter | Type | Description |
|---|---|---|
| agent | Agent | ConnectOnion agent instance |
| handler | Callable | Custom message handler (alternative to agent) |
| title | str | Window title |
| welcome | str | Welcome message (markdown supported) |
| hints | list[str] | Footer hints |
| triggers | dict | Autocomplete triggers (/, @) |
| on_error | Callable | Custom error handler |
Thinking Indicator
Shows real-time progress during LLM calls and tool execution:
During LLM thinking:
โ น Thinking... 5s (usually 3-10s)
During tool execution:
โ น Search emails in inbox
โโ search_emails("aaron")Shows description (what's happening) and function call (technical detail).
Autocomplete Triggers
main.py
Status Bar
Shows real-time information in a three-column layout:
๐ค Assistant โ Thinking (1/10) co/gpt-4 1,234 tok $0.0012
- Left: Agent name
- Center: Current status with iteration
- Right: Model, token count, cost
Customizing
Copy and modify the Chat component:
code
Example: Gmail Agent
main.py
Included Widgets
| Widget | Purpose |
|---|---|
| ChatStatusBar | Top status bar |
| HintsFooter | Bottom hints |
| WelcomeMessage | Initial welcome |
| UserMessage | User message bubble |
| AssistantMessage | Agent response |
| ThinkingIndicator | Processing animation |
| TriggerAutoComplete | Trigger-based autocomplete |
main.py
