Agents server
The Seed agents server as the mobile app uses it: endpoints in both layouts, the signed envelope, the actions called, the WebSocket subscribe protocol and the time skew rule.

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 /hm/api/agents)

Actions

POST

<base>/api/message

<base>/message

Health

GET

<base>/agents/api/health

<base>/health

Live updates

WebSocket

<base>/agents/ws

<base>/ws

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

ListAgents

none

agents[].id, .definition.name, .model, .modelProvider, .updatedAt

agentsOverview

GetAgent

agentId

agent.definition.name, .model, .modelProvider, .systemPrompt

agentsOverview

ListModelProviders

none

providers[].id, .name, .type, .authMode

agentsOverview

ListSessions

agentId, includeChildren: false, limit: 50, optional cursor

sessions[] (id, title, description, status, parentSessionId, updatedAt, createdAt), nextCursor

agentsOverview

ListProviderModels

provider

models[].id, .name

agentsModels

GetSession

sessionId

session (title, agentId, parentSessionId, status, plan), events[], triggerContext

agentsSession

ListRuns

sessionId or rootRunId

runs[]

agentsLoadRuns

MessageSession

sessionId, clientMessageId, content: [{type: "text", text, clientMessageId}]

sessionId, continuedToSessionId

agentsCommand send

CreateSession

agentId, clientRequestId

sessionId

create-session

CreateAgent

clientRequestId, definition

agentId

create-agent

StopSession

sessionId

none

stop

RetrySession

sessionId

none

retry

CancelRun

runId

none

cancel

SignalRun

runId, signal

none

signal

SetSecret

name, value (bytes), metadata: {provider}

none

agentsSaveProvider

SetModelProvider

name, provider: {type, baseUrl?, secretRefs?}

none

agentsSaveProvider

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

connected

connectedAt

Socket accepted; carries the server's clock

subscribed

key, accountId

Subscription is live

append

key, event: {id, seq, createdAt, event}

A durable session event, also used for replay

appendPartial

key, partialId, patch: {textDelta?, activity?: {phase}, done?}

A streaming fragment of the assistant's reply

change

key, value

The session record (status, title, plan, updatedAt) or a run record changed

error

message

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.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime