crates/protocol. If a method, event, or payload is not exported there, treat it as an implementation detail.
Transport
The default gateway listener is:/health, /ready, and /health/native; their readiness contract is described in Observability and runtime maintenance.
Authentication
The WebSocket handshake uses an access credential from a device session:auth/device/activate method and stores the returned access and refresh credentials in its platform keystore. Clients refresh the access credential with auth/refresh and can revoke a session with auth/session/revoke or auth/logout.
The gateway validates the access credential during the WebSocket handshake. A missing, expired, revoked, or invalid credential rejects the connection with HTTP 401. The gateway keeps signing material internal; clients never mint or rotate it. See Authentication and authorization for the credential exchange and Identity and authentication for session and capability state.
Request envelope
Every request uses JSON-RPC2.0. Request ids are strings with exactly 21 characters.
Feature-specific errors may include
error.data with a machine-readable code and details.
Notifications
Notifications are server-to-client JSON-RPC messages without an id. They are how clients observe long-running turns, tool output, task events, MCP status, and skill catalog changes.turn/start returns after the gateway accepts the turn; the assistant response arrives through turn/* and item/* notifications.
Naming conventions
Method names use slash-separated groups:Schemas
JSON Schemas are generated fromcrates/protocol and written to /schemas. The schema file names use snake_case type names, for example:
/schemas/turn_start_params.json/schemas/thread_tree_response.json/schemas/mcp_install_params.json/schemas/task_create_params.json
Reference sections
Workspace & Threads
Workspace listing, creation, selection, renaming, thread creation, folders, history, and subscription cleanup.
AGENTS.md
Thread-tree instruction file read, save, archive, resolve, and notification methods.
Turns
Turn submission, cancellation, item events, timeline composition, and streaming notifications.
Providers
Provider listing, model listing, and API key management.
CLI Runtime
Codex CLI and Claude Code runtime listing, model catalogs, thread bindings, approvals, login, review, compaction, fork, and turn steering.
Settings
Gateway-scoped general, memory, self-improvement, thread-context, CLI runtime, remote-access, and voice-input settings read/update methods.
Skills
Skill upload, install, update, uninstall, policy, health, and catalog notifications.
Memory
Durable memory search, remember, forget, candidate review methods, and memory notifications.
MCP Servers
MCP install config, policy, restart, uninstall, details, runtime status, and catalog notifications.
Tasks
Durable task creation, scheduling, subagents, task trees, waiting, deliveries, and task events.
Artifacts
Workspace file upload, listing, preview reads, downloads, bindings, artifact notifications, and model-facing artifact read behavior.
Authentication and access
Device activation, sessions, invitations, membership, profile updates, and capability snapshots.
Agent domain
Agent identities, authored work, delegation routes, and agent execution projections.
Patch history
Authorized file mutation, exact patch records, scoped history queries, and filesystem view grants.