CrabTalkCrabTalk

Events

Real-time event stream — monitor every agent, every tool call, every session from one connection.

The daemon broadcasts agent events in real time. Subscribe from any client and see everything — text deltas, tool calls, completions — across all agents and all sessions simultaneously.

Subscribing

Send a SubscribeEvents message to the daemon. You'll receive a stream of AgentEventMsg objects, each carrying:

FieldDescription
agentWhich agent produced the event
sessionWhich session it belongs to
kindEvent type (see below)
contentEvent payload
timestampWhen it happened

Event kinds

KindWhat happened
TEXT_DELTAAgent is generating text
THINKING_DELTAAgent is reasoning (thinking mode)
TOOL_STARTAgent dispatched tool call(s)
TOOL_RESULTA tool call completed
TOOLS_COMPLETEAll pending tool calls finished
DONEAgent turn completed

Streaming events

When you stream a single request (via StreamMsg), you get richer typed events:

EventWhat it carries
StreamStartAgent name + session ID
StreamChunkText delta
StreamThinkingReasoning delta
ToolStartEventArray of tool calls being dispatched
ToolResultEventSingle result with call_id and duration_ms
ToolsCompleteEventAll tools finished
AskUserEventAgent needs input — questions with options
StreamEndFinal — agent, error, provider, model, token usage

Tool calls arrive as a batch in ToolStartEvent. Results stream back individually as each completes — you see which tool is slow without waiting for the entire batch.

Use cases

  • Dashboard: show all active agents and their current state
  • Debugging: watch tool calls execute in real time
  • Logging: pipe events to a file or external system
  • Monitoring: alert when an agent errors or exceeds duration

Protocol

OperationMessageResponse
SubscribeSubscribeEventsStream of AgentEventMsg
Stream requestStreamMsgStream of StreamEvent

See Protocol for the full wire format.

What's next

On this page