Skip to main content
Use chat commands to send messages to an agent and read responses in your terminal. For REST details, see User Conversations and Streaming. Authenticate first — see CLI Auth. Pass an agent ID with -a agt_123, look one up with --agent-name, set CHATBASE_AGENT_ID, or configure a default agent.

Send a message

Send a one-shot message:
Pipe text from stdin instead of -m:
If you omit both -m and stdin, the CLI starts an interactive REPL. By default, responses stream token-by-token to your terminal. See Streaming for event types and how to parse them in scripts.

Continue a conversation

Pass a conversationId from a previous response to send a follow-up message:
Add --resume to replay the last few messages when continuing, so the agent has recent context without you re-sending it.
Save the conversationId from a --json response or from the streaming finish event metadata. See User Conversations for per-user history and listing conversations by user.

Scripting output

Wait for the complete response instead of streaming:
Output raw API JSON for parsing in scripts:
Use --plain for tab-separated output. Combine with --quiet in CI pipelines.

Retry a response

Regenerate an assistant message and discard it plus everything after it in the conversation:
Wait for the full retry response instead of streaming:

Commands

For every flag, run chatbase chat --help or chatbase chat retry --help.