CLI › Commands
Conversations
Talk to agents from the terminal, continue conversations, follow what's running and cancel.
A conversation (a session in the CLI) is a sequence of messages with an agent. It's kept in the history on the Tasks page and can be continued from the app, the CLI or the API.
doublex sessions list | create | send | get | cancel | deleteStart a conversation#
doublex sessions create agt_8f3a2b1c9d0e --input "List the late orders from this week"The answer shows up while the agent writes. The tools it uses appear on stderr with ›, and notices with !:
› Searching the knowledge base
› Creating a file
I found 4 late orders this week:
…
Chat task_5d2c9a3e1f07. Continue with: doublex sessions send task_5d2c9a3e1f07 --input "..."For long messages, read from stdin:
doublex sessions create agt_8f3a2b1c9d0e --input - < pedido.md
git diff | doublex sessions create agt_2b7e4c6a1f3d --input -Continue#
doublex sessions send task_5d2c9a3e1f07 --input "Email each customer about the new deadline"The agent remembers everything already said in the conversation. Send only the new message.
JSON output (NDJSON)#
With --json, create and send print each event of the answer on its own line, exactly as the API sends it:
doublex sessions create agt_8f3a2b1c9d0e --input "Hi" --json{"type":"task","taskId":"task_5d2c9a3e1f07"}
{"type":"text","delta":"Hello! "}
{"type":"text","delta":"How can I help?"}
{"type":"done","status":"completed"}To collect only the answer text:
doublex sessions create agt_8f3a2b1c9d0e --input "Hi" --json | jq -rj 'select(.type == "text") | .delta'List#
doublex sessions list --agent agt_8f3a2b1c9d0e --status failed --limit 20| Option | What it's for |
|---|---|
--agent <id> | Only one agent's conversations. |
--status processing|completed|failed | Filters by status. |
--limit <n> | How many to show (default 50, newest first). |
The table shows the ID, the agent, the title, the status, the source (chat, trigger, webhook or subagent) and the last update.
View#
doublex sessions get task_5d2c9a3e1f07Shows the title, the status and the last 10 messages. With --json, it returns the whole conversation (including the tools used) and the running field, which tells you whether the agent is still working.
Stop and cancel#
- Ctrl+C during the answer stops reading and cancels the conversation on the server. The exit code is
130. - If you just stop reading (for example, by closing the terminal), the agent keeps going on the server and saves the result. Cancel it like this:
doublex sessions cancel task_5d2c9a3e1f07A cancelled conversation shows as Failed, with a notice that it was stopped. Whatever was already processed is charged.
Delete#
doublex sessions delete task_5d2c9a3e1f07 --yesWhen the answer fails#
The command exits with code 1 when the answer has an error event or ends with done as failed: credits ran out, the model is unavailable, a connector needs to be reconnected. The message appears on stderr with ✗.
A conversation answers only one message at a time. If you send another while the agent is still working, you get a notice that the conversation is in progress.