Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.protean.peerislands.io/llms.txt

Use this file to discover all available pages before exploring further.

A Run is the unit of agent execution. Every invocation of an agent — from the CLI, the API, an MCP tool, or a watcher — produces a Run with:
  • runId — opaque identifier
  • seed — deterministic source for clock + RNG
  • cassetteId — pinned LLM responses (null when running live)
  • events[] — typed event log (turn.start, text.delta, tool_call.start, tool_call.end, finish, error)
  • statequeued | running | succeeded | failed | cancelled
The Zod schemas live in @protean/shared-types.

Why this shape

The event log is the source of truth, not in-memory state. The SDK, UI, and CLI all consume the same stream. Replay re-emits the events in order; the agent code is the same code path that ran the first time. This is the foundation everything else (replay, observability, time-travel debugging) sits on. See replay for the gate semantics.