Choose an agent with a swipe at Ready (0.2.0)

Bridge: an owner-configured list of agents (HERMEVEN_AGENTS). Each extra
agent is another profile of the same Hermes gateway, reached at
/p/<profile> with that profile's own key. GET /v1/agents lists ids and
names; POST /v1/conversations takes an optional agent_id checked against
the list. A conversation belongs to one agent (migration v3) and its turns
are submitted, polled and stopped at that agent. /v1/device is unchanged so
clients built earlier keep working.

Client: at Ready a swipe moves between agents; the name is shown through
the exchange; each agent keeps its own conversation; a follow-up goes to
the agent that answered. Reopened within the conversation window it opens
on the last agent, otherwise on the default. With one agent, or a bridge
without /v1/agents, nothing changes.

Also: contract section G, server survey and key evidence, the 0.1.2
upload, and the CODY-020 correction. Not reviewed, not deployed, not
uploaded.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-21 16:08:11 -08:00
co-authored by Claude Fable 5.2
parent 15714bd848
commit 9394c249ad
20 changed files with 1117 additions and 42 deletions
+22 -1
View File
@@ -18,7 +18,8 @@ Every error has the shape:
| `GET /v1/device` | Pairing status, limits, whether the agent is reachable and STT is configured. | 200 |
| `POST /v1/device/renew` | Rotate the device token. The old token stops working at once. | 200 |
| `DELETE /v1/device` | Revoke this device and close its conversation. | 200 |
| `POST /v1/conversations` | Start a new conversation; closes the device's previous one. | 201 |
| `GET /v1/agents` | The agents this device may talk to, default first: `{agents: [{id, name}]}`. Ids and display names only; no address, profile or key. Added after 0.1.x: an older bridge answers 404 `not_found`, which a client must treat as "one agent". | 200 |
| `POST /v1/conversations` | Start a new conversation. Optional `agent_id` (an id from `/v1/agents`; omitted = the default agent; anything else is 400 `invalid_request`). Closes the device's previous conversation **with that agent** only. | 201 |
| `POST /v1/turns` | Create one turn (text or audio). | 202, or 200 for a duplicate |
| `GET /v1/turns/{request_id}` | Current state and result. | 200 |
| `POST /v1/turns/{request_id}/cancel` | Request cancellation. Idempotent. | 200 |
@@ -26,6 +27,26 @@ Every error has the shape:
There is no SSE endpoint. Streaming through the Even WebView is undocumented and untested, so
polling is the supported path.
## More than one agent
The bridge can be given further agents besides the default one. Each is another profile served by
the same Hermes gateway (`gateway.multiplex_profiles`), reached at `<HERMES_BASE_URL>/p/<profile>`
with that profile's own `API_SERVER_KEY`; Hermes refuses the default profile's key there.
```
HERMEVEN_AGENT_NAME=Pepper # display name of the default agent (default: Agent)
HERMEVEN_AGENTS=wendy,cody # extra agent ids, in display order
HERMEVEN_AGENT_WENDY_API_KEY=... # required for each extra agent
HERMEVEN_AGENT_WENDY_PROFILE=wendy # optional; default: the id
HERMEVEN_AGENT_WENDY_NAME=Wendy # optional; default: the id, capitalised
```
The list is the owner's allow-list. A client names an agent only by id, only when creating a
conversation, and the id is checked against the list; it is never used to build an address. A
turn goes to the agent of its conversation. Each agent has its own conversation and its own
Hermes session, so nothing said to one is sent to another. `/v1/device` is unchanged, and its
`active_conversation_id` and `agent_reachable` describe the default agent.
## Creating a turn
Typed text (`Content-Type: application/json`):