TUI guide¶
This guide is for terminal users, remote server users, and developers. After reading it, you can start the TUI, connect to the backend, select data sources or Skills, restore server sessions, and view runs and outputs in the terminal.
How to start¶
Start the full dev stack or backend first:
Start the TUI:
Point at a specific runtime URL:
Set default data source and agent name:
Resume the latest server session:
Resume a specific thread/session:
Demo mode does not connect to the backend—useful for layout, commands, and simulated event streams:
View CLI flags:
Main views¶
The TUI has four views:
| View | Purpose |
|---|---|
| Chat | Talk to the agent; view streaming replies, tool calls, and results. |
| Stats | Session stats, step progress, and run status. |
| Config | Workspace configuration and resource status. |
| Outputs | Outputs for the current session. |
Switch with /tab <name>, or directly with /chat, /stats, /config, /outputs.
Slash commands¶
Type / and use Tab to complete. Built-in commands:
| Command | Action | Example |
|---|---|---|
/help |
List available commands. | /help |
/clear |
Clear current chat display. | /clear |
/status |
Show thread, message count, current data source and Skill. | /status |
/tab <chat\|stats\|config\|outputs> |
Switch view. | /tab outputs |
/chat |
Switch to Chat view. | /chat |
/stats |
Switch to Stats view. | /stats |
/config |
Switch to Config view. | /config |
/outputs |
Switch to Outputs view. | /outputs |
/datasource |
List or select a data source. | /datasource list |
/skill |
Open Skill picker, list, or select a Skill. | /skill show |
/reset |
Create a new local session. | /reset |
/resume [latest\|list\|sessionId] |
Restore a server session. | /resume list |
/exit |
Exit the TUI. | /exit |
/datasource usage:
/skill usage:
Shortcuts¶
| Shortcut | Action |
|---|---|
Ctrl+C |
Exit. |
Ctrl+L |
Clear chat display. |
Ctrl+N |
New session. |
PageUp / PageDown |
Scroll in Chat view. |
Home / End |
Jump to top or bottom of Chat scroll area. |
Tab |
Complete commands in the input box. |
↑ / ↓ |
Browse input history. |
Ctrl+U |
Clear current input. |
Ctrl+W |
Delete the previous word in input. |
Enter |
Send message or run command. |
Runtime behavior¶
When connected to a real backend, the TUI sends natural-language input to /api/copilotkit and writes the current data source, enabled resources, and Skill selection into run_config. AG-UI events from the backend appear in Chat, Stats, and Outputs as text, tool calls, run state, and outputs.
/resume depends on /api/v1/sessions and /api/v1/sessions/:id/conversation. If the backend is unavailable or sessions are unsupported, the TUI shows an error in the command hint area.
Demo mode uses local simulated events and built-in demo state. It does not call a real backend and cannot restore server sessions.
Typical flow¶
- Start backend and TUI.
- Run
/statusto see thread, data source, and Skill. - Run
/datasource listto see available sources. - When needed:
/datasource select api-duckdb-demo. - Ask a question:
- Watch streaming replies and tool calls in Chat.
- Run
/statsfor run status. - Run
/outputsfor outputs.
Compared with the Web workbench¶
| Dimension | Web workbench | TUI |
|---|---|---|
| Environment | Browser, local demos, business analysis. | SSH, remote servers, terminal workflows. |
| Interaction | Clicks, input box, console. | Keyboard and slash commands. |
| Trace | Right console, step details, trace list. | Chat, Stats, and Outputs views. |
| Resources | Forms for create, test, import, preview. | Select data source and Skill; view config state. |
Use the Web workbench for full visual demos. Use the TUI to verify agent runtime over SSH or lightweight terminal environments.
Troubleshooting¶
- Cannot connect: confirm
npm run devornpm run dev:apiis running. - Backend URL changed: pass full
/api/copilotkitURL with--runtime-url. - Model not responding: check
LLM_PROVIDER,LLM_MODEL,LLM_BASE_URL, andLLM_API_KEYin root.env. - Session restore fails: confirm
/api/v1/sessionsis reachable and start without--demo. - Command has no effect: run
/helpand check errors in the command hint area.
Continue with Web workbench guide.