Quick Start
Configuration
Tool Result Modes
The server supports three streaming modes, configured via CLI or environment variable:Environment Variables
Server Info Endpoint
GET /aura/info is an aura-native introspection endpoint. It returns the
default agent and, per agent, its orchestration workers and configured MCP
servers. This endpoint is not OpenAI-compatible; it lives under /aura/ to keep
/v1/models clean.
The CLI uses this at boot to display orchestration workers before the first
prompt in HTTP mode.
id matches the id field in /v1/models (alias if set,
otherwise agent name). The workers array is omitted for non-orchestration
agents. Each worker’s model is included only when it overrides the
coordinator model.
mcp_servers is a credential-free view of the agent’s configured MCP servers,
keyed by name and tagged by transport (stdio, http_streamable, or sse).
URLs are reduced to their origin (scheme://host:port) — path, query,
fragment, and userinfo are all dropped, since any of them can carry a token. A
stdio server shows only the executable basename as command; its arguments
and environment are never included, and neither are headers or
headers_from_request. A URL that cannot be reduced to an origin appears as
the sentinel <invalid url>, and a command with no extractable file name as
<unknown>. An empty object means no configured MCP servers, while
a populated one lists them. Older servers omit the field entirely, and the CLI
then uses its generic startup call-to-action.
Custom AURA Events (Optional)
Most custom AURA events are optional and requireAURA_CUSTOM_EVENTS=true.
HITL approval lifecycle events are the exception: the server emits them whenever
an approval route needs clients to observe or act on approval state.
Custom Event Types
Event Flow
Event Formats
Custom events use the SSEevent: field to distinguish from standard OpenAI chunks:
Tool requested (immediate UI feedback when LLM decides to call a tool):
progress_token is included when available from the MCP client. Use it to correlate with aura.progress events.
Tool complete (success):
- Successful tool results include the
resultfield (truncated perTOOL_RESULT_MAX_LENGTH, default 1000 chars) - Tool errors are automatically detected from Rig’s error format prefixes (
ToolCallError:,JsonError:,Tool returned an error:) - When detected,
successis set tofalseand theerrorfield contains the full error message
AURA_CUSTOM_EVENTS=trueis set- The MCP server sends
notifications/progressmessages during tool execution
aura.session_info includes only CorrelationContext fields (session_id, trace_id) — no agent_id. model_context_limit comes from the context_window field in the [agent.llm] TOML config section (or [orchestration.worker.<name>.llm] for per-worker overrides). If context_window is not set, model_context_limit is omitted from the event.
MCP status (emitted once when at least one MCP server is configured — at stream start in single-agent mode, or just after the shared manager connects in orchestration mode):
status is one of connected, failed, or not_attempted. This lets a client distinguish a server that is configured but unavailable (failed, with a reason) from one that connected and legitimately exposes no tools (connected, tools_count: 0). reason is present only for failed servers. The event is omitted entirely when no servers are configured. aura.mcp_status includes only CorrelationContext fields (session_id, trace_id) — no agent_id.
In orchestration mode all workers share a single McpManager, so one aura.mcp_status reports the whole run’s server status. The wire shape is identical to single-agent mode; it just arrives slightly later (after the manager connects, before planning) rather than at stream start. Requires AURA_CUSTOM_EVENTS=true in both modes.
Worker phase (phase transitions in multi-agent mode):
phase values: "planning", "executing", "analyzing". task_id and parent_agent_id are omitted when not set.
Tool usage (usage snapshot after tool execution rounds):
on_stream_completion_response_finish hook when usage data is available. Associates the completed tool IDs with a token usage snapshot. No agent_id field (only CorrelationContext).
Usage (final token usage at stream end):
prompt_tokens with model_context_limit from aura.session_info to calculate context window fill percentage: (prompt_tokens / model_context_limit) * 100. No agent_id field (only CorrelationContext).
Scratchpad usage (per-agent report when an agent finishes with scratchpad activity):
agent_id is the worker name). tokens_intercepted is the total tool output diverted to disk; tokens_extracted is what the agent pulled back into context via the scratchpad exploration tools.
Approval requested (HITL approval request raised):
AURA_CUSTOM_EVENTS=false because they are
protocol lifecycle events, not optional telemetry. The webhook route emits
aura.approval_requested before dispatch and aura.approval_completed for all
terminal webhook outcomes. The conversational route emits
aura.approval_requested, then aura.approval_pending while the tool call is
parked, then aura.approval_completed after the decision, timeout, or
cancellation. outcome.kind is one of approved, denied, timed_out,
cancelled, or errored; errored represents channel faults such as transport
errors, non-2xx responses, or invalid JSON. aura.approval_pending is reserved
for the conversational route and is not emitted by the webhook route.
Client Handling
Standard OpenAI clients will ignore these events (they only processdata: lines without event: prefix). Custom clients can filter by event type:
Correlation Fields
Most custom events include correlation fields for tracing:
Approval lifecycle events carry
decision_id and HITL scope instead of the shared AgentContext / CorrelationContext fields. Use decision_id to correlate aura.approval_requested with aura.approval_completed, and inspect scope for the requesting surface (single, worker, or future coordinator).
Tool Event Correlation
Use these fields to correlate tool-related events:
Example correlation:
Orchestration Events
Whenorchestration.enabled = true and AURA_CUSTOM_EVENTS=true, the server emits orchestration-specific events covering the Plan/Execute/Continue lifecycle. These events are emitted alongside the standard aura.* events above.
Orchestration Event Types
Orchestration Event Flow
Routing decisions happen twice: once on initial query (before any work) and again post-execute (after workers finish). Both paths can producedirect_answer, clarification_needed, or a new plan. The initial routing has no iteration_complete; the post-execute routing always emits one.
Orchestration Event Formats
Plan created (coordinator decomposed query into tasks):routing_mode field indicates how the coordinator routed the query:
"routed"— classified to a single worker"orchestrated"— multi-task DAG with continuation
planning_response field contains the coordinator’s raw planning text and is omitted when empty.
Direct answer (coordinator answered without orchestration):
options is omitted when the coordinator does not suggest choices.
Task started (worker begins execution):
AURA_CUSTOM_EVENTS=true and AURA_EMIT_REASONING=true. Worker reasoning is also emitted as aura.reasoning with agent_id set to the worker name (e.g., "arithmetic") and parent_agent_id: "coordinator" for backward-compatible aggregation.
Tool call started (coordinator or worker calls a tool):
task_id is omitted if it could not be determined. arguments is omitted when not available.
Tool call completed (the matching tool call finished):
task_id is omitted if it could not be determined. result is truncated per TOOL_RESULT_MAX_LENGTH and omitted when empty.
Tool coverage: these events fire for the coordinator (worker_id: "main") as well as workers. They cover MCP tools, the skill tools (load_skill, read_skill_file), and orchestration operations (read_artifact, submit_result, list_prior_runs). Scratchpad exploration tools are suppressed by default and emit only when AURA_EMIT_SCRATCHPAD_TOOL_EVENTS is set.
Task completed (worker finished with result):
reasoning and gaps fields are included only when non-empty (i.e., when replanning is triggered).
Phase timing fields (all milliseconds, present on every iteration_complete):
To separate time the LLM spent deciding what to call from time spent executing tools, compute
execution_ms - tool_ms ≈ LLM-thinking time. This is exact for single-task routes; for parallel waves it is approximate, since tool_ms and task_compute_ms are summed compute rather than wall-clock — compare them against execution_ms to gauge overlap. The same four fields are written to the run manifest (phase_timings) and recorded as orchestration.{planning,execution,task_compute,tool}_ms attributes on the orchestration.iteration OTel span.
Replan started (new planning cycle triggered):
"post_execute_create_plan" (coordinator routed back to planning after evaluating worker results).
Synthesizing (consolidating task results for coordinator decision):
iteration_complete, which fires after the coordinator’s routing decision.
Note: Workers that use scratchpad emit aura.scratchpad_usage when they finish — see the Custom Event Types section above. This is a base aura.* event (not orchestration-specific) so the same event fires for single-agent deployments and workers alike.
Orchestration Correlation
SSE Event Reference
Event Types by Mode
Message Formats
First text chunk (includesrole):
none mode) - includes actual arguments:
open-web-ui mode) - empty arguments for UI compatibility:
open-web-ui mode only) - sent as second delta with same index:
finish_reason Values
Client Examples
JavaScript
Python
Multi-Turn Tool Execution
Unlike standard OpenAI API (where tool execution is client-side), this server executes tools server-side and continues streaming. After tool execution completes, text resumes with a\n\n separator for readability:
ToolResult event.
Connection Behavior
Graceful Shutdown
On SIGTERM or SIGINT, the server performs a two-phase shutdown to let in-flight requests finish:
Configure the grace period:
terminationGracePeriodSeconds to at least SHUTDOWN_TIMEOUT_SECS + 15 (default: 45s). The total shutdown budget is grace period + 10s Actix buffer. During Phase 1, /health returns 503 — readiness probes will fail immediately, removing the pod from service endpoints.
The
/health endpoint returns 503 during shutdown (same middleware gate as all routes). This is intentional — it signals load balancers and K8s readiness probes to stop routing traffic to this instance.
