The agents server runs Seed agents: it stores agent definitions, conversations (sessions), runs and model provider settings per account, and executes the model calls. Seed Exact is a client of it. This page describes the protocol surface the app relies on, as verified from the app's code and the mock that stands in for the server. The server's own implementation lives outside the mobile app directory and is not documented here.
Address
The address is the persisted state agentServer, default https://agentic.seed.hyper.media (app.contract line 149). The user edits it in the agent server sheet, which normalises it once with normalizeAgentServerUrl. Each account sees its own agents: the account is the envelope's signer.
Endpoints
agentEndpoint resolves three endpoints in one of two layouts, chosen by the base URL's path:
Purpose | Method | Standalone layout | Site-mounted layout (base ends with |
|---|---|---|---|
Actions |
|
|
|
Health |
|
|
|
Live updates | WebSocket |
|
|
The WebSocket scheme is wss: under https:, else ws:. The app treats any 2xx health reply as Online and reads no fields from it.
Signed envelope
Every action is a DAG-CBOR map {type: "AgentsAction", signer, sig, account, protocol: 3, action} with Content-Type: application/cbor and Accept: application/cbor. action carries a _ discriminator and a millisecond ts. The signature is Ed25519 over the envelope encoded with sig zero-filled. Full details: Agents: signed action envelope and endpoints.
Replies are CBOR maps. An error is {_: "Error", message} or a non-2xx status. A non-CBOR body (a proxy page, a text 404) is reported as Agent server returned HTTP <status>.
Actions the app uses
Action | Payload | Reply fields read | Sent by |
|---|---|---|---|
| none |
|
|
|
|
|
|
| none |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| none |
|
|
| none |
|
|
| none |
|
|
| none |
|
|
| none |
|
|
| none |
|
For every command the app takes the resulting id from the reply as continuedToSessionId, else sessionId, else agentId. Payload details and the command mapping are in Agents: reads, commands and the clock. The mock also answers actions the app never sends (UpdateSession, DeleteSession, GetRun, GetRunJournal, ListAgentInvites, ListAgentTriggers, ListAgentTools, ListSigningIdentities), inherited (inferred) from the fixture it was ported from, frontend/apps/mobile/dev/mock-agents-server.ts.
WebSocket subscribe protocol
The client opens the socket and sends one binary message: a signed envelope whose action is {_: "Subscribe", key, afterSeq?}.
Keys are sessions/<sessionId>, runs/<rootRunId> and agents/<agentId>. afterSeq (sessions only) asks for replay of events with a higher seq.
The server answers with JSON text frames. One socket carries one subscription; the app opens up to two at a time on a session screen (session and runs) and one on an agent screen.
Frame | Fields | Meaning |
|---|---|---|
|
| Socket accepted; carries the server's clock |
|
| Subscription is live |
|
| A durable session event, also used for replay |
|
| A streaming fragment of the assistant's reply |
|
| The session record (status, title, plan, |
|
| The subscription failed |
How the app maps each frame is in Agents: WebSocket streams as resources.
Time skew rule
An action whose ts is too far from the server's clock is rejected. The mock enforces a window of 300 000 ms (five minutes) with "Stale request timestamp" (server.ts line 545). The app's source comment refers to "the server's skew window", but the hosted server's exact window is not visible from the app directory. The app's answer to the rule:
Commands sign with a clock read at the moment of the tap.
Reads sign with the later of the caller's snapshot time and the newest server time seen in live frames, so a screen left open past the window can still read.
A minute task refreshes the read clock while the Agents tab is visible.
Envelopes carry no audience field, which the source comment notes when explaining why borrowing server time for reads adds no replay risk.
Secrets
A model provider API key is the only secret the app sends anywhere. It goes in SetSecret.value as bytes, only when safeAgentSecretTarget accepts the server: HTTPS, or HTTP to localhost, 127.0.0.1 or [::1].
Test stand-in
Tests use the mock agents server at http://127.0.0.1:3068 (tools/mock-agents/server.ts). It verifies the real envelope (signer prefix, type, signature, direct signer, timestamp, protocol 3), serves both endpoint layouts, speaks the same JSON frames, and scripts replies. The app reaches it only through the /agents-test route's throwaway identity, which the signer refuses to use against any other URL.
Related
Grants and capabilities: net.fetch http:, net.websocket ws: and wss:
Notify service: the other signed-envelope service
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime