CrabTalk

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:

Field Description
agent Which agent produced the event
session Which session it belongs to
kind Event type (see below)
content Event payload
timestamp When it happened

Event kinds

Kind What happened
TEXT_DELTA Agent is generating text
THINKING_DELTA Agent is reasoning (thinking mode)
TOOL_START Agent dispatched tool call(s)
TOOL_RESULT A tool call completed
TOOLS_COMPLETE All pending tool calls finished
DONE Agent turn completed

Streaming events

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

Event What it carries
StreamStart Agent name + session ID
StreamChunk Text delta
StreamThinking Reasoning delta
ToolStartEvent Array of tool calls being dispatched
ToolResultEvent Single result with call_id and duration_ms
ToolsCompleteEvent All tools finished
AskUserEvent Agent needs input — questions with options
StreamEnd Final — 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

Operation Message Response
Subscribe SubscribeEvents Stream of AgentEventMsg
Stream request StreamMsg Stream of StreamEvent

See Protocol for the full wire format.

What's next