octo chat: talk to an agent
Send one message or start an interactive session with an Askocto agent from your terminal, with streaming, sources and JSON output.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
octo chat sends messages to an agent and prints its answer. Use it for quick checks after you change a source, for smoke tests in CI, or to reproduce a question a customer asked. It uses the same chat endpoint as your website, so the answer reflects the published agent.
Send one message
octo chat "Where is my order?" --agent agt_123
The answer streams to the terminal as it is written. When it finishes, the CLI prints the sources it used and the conversation id.
Your order ships within two business days...
Sources: Shipping times (src_42)
Conversation: conv_8f2a
Start an interactive session
Leave out the message to open a prompt.
octo chat --agent agt_123
Type a message and press Enter. The session keeps one conversation, so follow-up questions have context. Type /new to start a fresh conversation and /exit to leave.
Flags
| Flag | Description |
|---|---|
--agent |
The agent id. Falls back to defaultAgent from octo config. |
--conversation |
Continue an existing conversation, for example conv_8f2a. |
--user |
Send the message as a user id such as usr_123. |
--no-stream |
Wait for the full answer and print it once. |
--json |
Print the full response object. Implies --no-stream. |
Use it in scripts
octo chat "What is your refund window?" --agent agt_123 --json \
| jq -r '.message.content'
The JSON has the same shape as the chat endpoint: conversationId, message with sources, and usage. A non-zero exit code means the request failed.
Tip: Run a short list of questions after each source change and compare the answers. For repeatable checks with expected answers, use Test > Tests in the dashboard.
What you should see
The first characters appear within a moment, then the answer completes and the CLI prints the sources. If no sources appear, the agent answered from a procedure or from the conversation itself.
Troubleshooting
not_founderror. The agent id is wrong or belongs to another workspace. Runocto agents list.forbiddenerror. The agent is still a draft. Publish it or test it in the Playground.- Empty answer. Check that at least one source is
readywith octo sources.