Skip to main content
The web app’s HTTP routes (web/app/src/routes/api/) are how the browser talks to the agent runtime. Only the web server adapter (web/server/src/event-mapper.ts) imports agent packages; browser code consumes the wire format.

Routes

Additional routes exist for session listing, provider metadata, and session actions — see web/app/src/routes/api/ for the current surface.

Event shapes

  • NDJSON ChatStreamEvent on chat responses. See Streaming protocol for the event catalogue.
  • SSE AgentSessionEvent on /api/attach for out-of-turn state changes (compaction ran, another client sent a turn, etc.).

Contracts

Wire contracts live in web/protocol:
  • chat-protocol.ts — event catalogue and payload shapes.
  • fleet-contract.tsChatAttachment, ProjectId, and zod schemas for the OpenUI wire contract.
  • openui-prompt.ts — UI wire contract.
Any change to these contracts is released with a matching change to the adapter.
Last modified on August 17, 2026