Comma Agents
@comma-agents/daemonProtocol

Shared Types

Reusable wire types — Usage, AgentCallResultWire, ErrorInfo, RunSummary, AgentStreamEventWire.

These types are used across multiple protocol messages.

Usage

Token usage statistics, included in strategy_completed, agent_output, step_completed, and AgentCallResultWire.

{ "promptTokens": 150, "completionTokens": 87 }

Prop

Type

AgentCallResultWire

Wire format for agent call results. Included in step_completed and the done stream event.

{
  "text": "Found 3 issues: ...",
  "usage": { "promptTokens": 50, "completionTokens": 30 },
  "finishReason": "stop"
}

Prop

Type

ErrorInfo

Structured error information included in strategy_error events.

{ "code": "EXECUTION_ERROR", "message": "Model resolution failed" }

Prop

Type

RunSummary

Summary of a run, included in strategy_list responses.

{
  "runId": "run_abc123",
  "strategyName": "Code Review Pipeline",
  "status": "running",
  "startedAt": "2025-01-15T10:30:00.000Z"
}

Prop

Type

Run Statuses

StatusDescription
pendingRun created but not yet started
runningFlow is actively executing
completedFlow finished successfully
errorFlow encountered an error
cancelledFlow was stopped via stop_run

AgentStreamEventWire

Wire format for streaming events, included in agent_streaming messages. Discriminated union on type.

Prop

Type

See Strategy Observation for detailed field descriptions of each event variant.

On this page