Agents: chat with Seed agents
The agents package: how the mobile app lists agents, opens sessions, streams transcripts and run cards, and signs every request to an agents server.

The agents package is the Agents tab. It talks to a Seed agents server, by default https://agentic.seed.hyper.media, to list the signed-in account's agents, create one, open a conversation, send messages, and watch the reply and its runs arrive live. Every request is a signed CBOR envelope, and live data arrives over WebSockets that Exact exposes as resources.

Files

File

Lines

Role

Page

src/agents/envelope.ts

92

Signed envelope, endpoint layouts, URL normalization, secret-target check

Envelope and endpoints

src/agents/sources.ts

545

All sources: reads, commands, provider save, three streams, the borrowed server clock

Reads, commands and the clock, WebSocket streams

src/agents/model.ts

370

Session events to chat rows, run records to run cards

Chat rows and run cards

src/agents/provider-registry.ts

159

Provider metadata, ported from the desktop UI package

Providers, models and tool summaries

src/agents/model-utils.ts

175

Model list curation and default pick

same

src/agents/tool-summary.ts

430

Tool row wording, address parsing, source chips

same

agents.contract

853

Shapes and six screens

Screens and components

agents.test.contract

307

15 Contract tests against the mock

same

tools/mock-agents/

923

The scripted mock server

Mock agents server

Data flow

flowchart LR root["app.contract agents block"] -- "agentsOverview, agentsSession, agentsLoadRuns" --> http["sources.ts request"] root -- "agentsSessionStream, agentsRunStream, agentsAgentStream" --> ws["sources.ts exactStream"] root -- "agentsCommand, agentsSaveProvider" --> http http -- "POST CBOR envelope" --> srv["agents server"] ws -- "signed Subscribe, JSON frames" --> srv http --> model["model.ts chatRows and runRow"] ws --> model model --> screens["agents.contract screens"]

A screen never sees protocol records. sources.ts "own[s] the protocol boundary; components receive shaped, presentation-ready records".

Key design points

    One envelope for everything. HTTP actions and the WebSocket subscribe message use the same protocol 3 envelope, signed by the identity's key through identity and encoded with crypto's vendored CBOR codec.

    Snapshot plus stream. A session is read once over HTTP (GetSession), then a stream resource takes that snapshot as its initial value and applies frames. Runs work the same way. See streams.

    Time is an argument. Commands sign with the caller's fresh clock. Reads may borrow the server's clock from live frames so a long-open screen keeps working. See sources.

    A test identity that cannot leave the mock. The unlinked /agents-test route mints a random key that the signer refuses to use against any URL other than the mock's.

    Parity with existing clients. The envelope is checked byte for byte against a vector produced by executing the shared client's real signing code (frontend/packages/ui/src/agents/client.ts), and the transcript logic against the React Native app's behaviour.

Tests

File

Tests

Covers

__tests__/agents.test.ts

12

Envelope vector, URL layouts, secret target, transcript, run cards, model curation

__tests__/parity.test.ts

11

Child runs, tool spawns, chips, trigger context, structured parts, provider saves, clocks, the HTTP and stream race

__tests__/review.test.ts

6

Timestamps, transport errors, codec import rule, linear time transcript

agents.test.contract

15

End to end UI flows against the mock

Known limits

    Subscription (OAuth) sign-in for providers is not offered: "Subscription sign-in is available on desktop".

    New agents are always created with the tool list search, web_search, execute, publish. There is no agent editing, deletion, or session deletion in the UI.

    Signing requires the account's own key on the device. An envelope whose signer is not the account fails with "The local key holds no delegation for this account".

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

Unsubscribe anytime

Comments