Overview
Crewship provides real-time event streaming so you can:- Monitor crew execution as it happens
- Build responsive UIs that update live
- Debug issues by watching the event flow
- Log events to external systems
Streaming via CLI
The simplest way to stream events:Streaming via API
Server-Sent Events (SSE)
Connect to the events endpoint with SSE:JavaScript/TypeScript
Python
Event Types
Run Lifecycle Events
| Event | Description | Payload |
|---|---|---|
run.started | Execution began | { run_id, started_at } |
run.completed | Success | { run_id, duration_ms, result } |
run.failed | Error | { run_id, error, stack_trace } |
run.canceled | Manually stopped | { run_id, canceled_at } |
Agent Events
| Event | Description | Payload |
|---|---|---|
agent.started | Agent began task | { agent, task } |
agent.completed | Agent finished | { agent, task, output } |
agent.error | Agent failed | { agent, error } |
Tool Events
| Event | Description | Payload |
|---|---|---|
tool.called | Tool invoked | { tool, input } |
tool.result | Tool returned | { tool, output } |
tool.error | Tool failed | { tool, error } |
Log Events
| Event | Description | Payload |
|---|---|---|
log | Log message | { level, message, timestamp } |
Artifact Events
| Event | Description | Payload |
|---|---|---|
artifact | File produced | { name, size, content_type } |
Event Format
Each SSE event follows this format:Reconnection
SSE supports automatic reconnection. Use theLast-Event-ID header: