CLI (RockBot.UserProxy.Cli)
The rockbot CLI is a user proxy on the RabbitMQ bus, like the Blazor UI. With no arguments it runs
an interactive chat. With --message it sends one message, follows the turn to its end, and exits.
That one-shot form is how scripts and live tests drive the agent.
Subcommands
| Command | What it does |
|---|---|
chat (default) |
Interactive chat, or one turn with --message <TEXT> (- reads stdin) |
info |
The agent’s name and version; with --models, --pricing, --usage, --mcp, --skills, --memory, --routing or --all, what it is configured with, what it has used, and its health. See Agent info |
status |
The agent’s current activity (processing, subagents) |
history |
Stored conversation history for a session |
clear |
Reset the agent’s in-memory conversation context for a session |
cancel |
Cancel in-flight work for a session |
auth mcp |
Sign in to an OAuth-protected MCP server the agent uses |
Connection options work on every subcommand: --rabbitmq-host, --rabbitmq-port, --rabbitmq-user,
--rabbitmq-password, --agent, -s|--session, -u|--user, --timeout, --proxy-id, -v|--verbose.
They override the matching configuration keys (RabbitMq:HostName and so on) from appsettings.json,
environment variables and user secrets. Put the subcommand first: rockbot clear --session X.
Agent info: rockbot info
rockbot info prints the agent’s name and version. The flags add what the agent is configured
with. The agent answers these from its own state, without calling its LLM, so they work while the
LLM is failing and cost no tokens.
| Flag | Adds |
|---|---|
--models |
Each tier (Low, Balanced, High) with its models in fallback order, the service and endpoint host of each, the pricing row it is costed with, the embedding model and the decision model |
--pricing |
The pricing table the agent estimates cost with, in USD per million tokens, and whether it came from llm-pricing.json or the built-in fallback table |
--usage |
Tokens and estimated cost today, over the last 7 and 30 days, per model and per workload, and for the session given with --session (default cli-session) |
--mcp |
The MCP servers the agent is configured with: connected or not (and why not), host, tool count, OAuth |
--skills |
The agent’s skills (learned, starter, from MCP servers), most recently used first |
--memory |
Memory health from the latest memory audit, and whether consolidation is paused |
--routing |
How requests were routed across the model tiers over the last 7 days, and how many a fallback answered |
--all |
Every section |
--json |
The agent’s answer as JSON instead of text. With no section flag, every section |
$ rockbot info --models
RockBot 0.18.4 (started 2026-11-15 08:00:00Z)
Models (loaded 2026-11-15 08:00:01Z; a change needs a restart)
Low gpt-5.6-luna (Azure AI Foundry, rocky.cognitiveservices.azure.com) $0.20 in / $1.20 out per M
Balanced 1. claude-haiku-5-5 (Anthropic API, api.anthropic.com, images) $0.10 in / $0.50 out per M
2. anthropic/claude-haiku-5.5 (OpenRouter, openrouter.ai, text only) $0.10 in / $0.50 out per M
High (no model of its own; uses the Balanced model)
A numbered list is a fallback chain: each later model is used only when the ones before it fail.
Embeddings: text-embedding-3-small (Azure AI Foundry)
Decision model: decision-1 (Azure AI Foundry, Foundry decision API)
No output ever carries an API key; endpoints are shown as a host only. An agent older than this CLI
doesn’t answer these requests, and the command exits 2 after the timeout.
One-shot output
By default (--output text), the final reply goes to stdout and progress lines go to stderr:
$ rockbot chat -m "look up issue 797 in MarimerLLC/rockbot"
CLI option to write turn events as JSON lines
JSON lines (--output jsonl)
--output jsonl writes every event of the turn to stdout instead, as one
AG-UI 1.0 event object per line, serialized with the AG-UI
.NET SDK (AGUI.Abstractions). It needs --message. Stdout then carries nothing but these lines,
encoded as UTF-8, and stderr keeps only error: diagnostics and logging. The AG-UI proxy
streams the same events over HTTP, from the same code.
{"type":"RUN_STARTED","threadId":"cli-session","runId":"e4e7…","protocolVersion":"1.0","timestamp":1794547308650}
{"type":"CUSTOM","name":"rockbot.agent_run_started","value":{"agentName":"RockBot","heartbeatIntervalSeconds":15},…}
{"type":"TOOL_CALL_START","toolCallId":"call_p6od…","toolCallName":"github__get_issue",…}
{"type":"TOOL_CALL_ARGS","toolCallId":"call_p6od…","delta":"{\"summary\":\"owner=MarimerLLC, repo=rockbot, issueNumber=797\"}",…}
{"type":"TOOL_CALL_END","toolCallId":"call_p6od…",…}
{"type":"TOOL_CALL_RESULT","toolCallId":"call_p6od…","content":"{ \"url\": …","metadata":{"rockbot":{"status":"finished","failed":false,"durationMs":948,"agentName":"RockBot"}},…}
{"type":"TEXT_MESSAGE_START","messageId":"1939…","role":"assistant","name":"RockBot",…}
{"type":"TEXT_MESSAGE_CONTENT","messageId":"1939…","delta":"CLI option to write turn events as JSON lines",…}
{"type":"TEXT_MESSAGE_END","messageId":"1939…",…}
{"type":"RUN_FINISHED","threadId":"cli-session","runId":"e4e7…",…}
The first line is always RUN_STARTED and the last is always RUN_FINISHED or RUN_ERROR, even
when the CLI can’t reach the broker. Every event has a timestamp in milliseconds since the Unix
epoch. The runId is the turn’s correlation id on the bus.
| Event | When |
|---|---|
RUN_STARTED |
First line, before connecting. threadId is the session. |
CUSTOM rockbot.attachment_sent |
Each --attach file the agent accepted (value.attachment) |
CUSTOM rockbot.agent_run_started |
The agent began the turn (agentName, heartbeatIntervalSeconds) |
CUSTOM rockbot.heartbeat |
The agent is still working (elapsedSeconds, status) |
ACTIVITY_SNAPSHOT (activityType: rockbot.progress) |
Progress text (content.agentName, content.text). Each one replaces the last for its source. |
TOOL_CALL_START, TOOL_CALL_ARGS, TOOL_CALL_END |
A tool call started. RockBot carries a readable argument summary, not the JSON arguments, so delta is {"summary": "…"}. |
TOOL_CALL_RESULT |
A tool call finished or failed. content is the result summary or the error, and metadata.rockbot holds status (finished/failed), failed, durationMs and agentName. |
STATE_SNAPSHOT, STATE_DELTA |
The agent’s task lists, as state {"taskLists": {"primary": [...], "<subagent id>": [...]}}. Each item has id, description and status (pending, in_progress, completed). A list’s first appearance is always a snapshot of the whole state; later changes to it are RFC 6902 patches. An empty list means there is no plan to show: the agent cleared it, or its run ended with steps it never checked off. A turn that hands its work to a subagent ends with its plan still open; the run that relays the results checks it off later, as background work (see AG-UI). |
SUBAGENT_STARTED, SUBAGENT_FINISHED, SUBAGENT_ERROR |
A subagent or worker this session spawned. name is subagent or worker. SUBAGENT_ERROR.code is failed, cancelled or timeout. |
TEXT_MESSAGE_START, TEXT_MESSAGE_CONTENT, TEXT_MESSAGE_END |
A reply, as one content chunk. The turn’s own reply comes right before the last line. |
CUSTOM rockbot.attachments |
Attachments on that reply (value.messageId, value.attachments) |
CUSTOM rockbot.origin |
Follows a reply that isn’t this turn’s own, such as a subagent result (value.messageId, value.sessionId, value.origin, value.source, and value.followsQuestionId on the reply to an MCP form answer) |
RUN_FINISHED |
The turn succeeded, or was cancelled (outcome.type: "cancelled") |
RUN_ERROR |
The turn failed. code is error, timeout, agent_lost, attachment_failed or client_error. |
Events from a subagent or worker carry its id as subagentRunId. Subagent lifecycle events travel on
a different queue from the turn’s reply, so after the reply the CLI waits until nothing has arrived
for 250 ms (2 s at most) before writing the last line. That lets an awaited worker’s
SUBAGENT_FINISHED land in the stream. The process exits after the turn, so a subagent that
outlives it shows SUBAGENT_STARTED with no finish; its result arrives later, in other clients.
Replying to that result from another client (the Blazor UI, or an interactive rockbot chat in
another session) works: that client’s proxy attaches a reference to the result to the next message,
and the agent copies the result into the session the reply is written in before answering.
For example, to check that a turn called github__get_issue and the call succeeded:
rockbot chat -m "…" --output jsonl > events.jsonl
id=$(jq -r 'select(.type=="TOOL_CALL_START" and .toolCallName=="github__get_issue") | .toolCallId' events.jsonl)
jq -e --arg id "$id" 'select(.type=="TOOL_CALL_RESULT" and .toolCallId==$id) | .metadata.rockbot.failed == false' events.jsonl
Exit codes
Both output formats use the same exit codes.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | The CLI failed before or outside the turn: --attach or --output jsonl without --message, a missing file, an attachment the agent rejected, or no connection to the broker (in jsonl mode) |
| 2 | No reply (timeout), or an attachment the agent never answered |
| 3 | The agent cancelled the turn |
| 4 | The agent reported an error (any reply is still printed) |
| 5 | Lost contact with the agent (no heartbeat) |
An option Spectre.Console can’t parse or validate, such as an unknown --output format, exits with
-1 (255 on most shells) before anything runs.