Agents and setup
This reference was reconciled against current development source on 2026-11-15. Historical public-source links below remain pinned to their stated revision; they are not proof that a public mirror or your installation has caught up. Start with the current operator guide for installation. This is static source review, not a live API compatibility test.
The agent registry is PostgreSQL-backed. An empty registry is valid; a fallback agent label in code does not establish that a real agent exists. Start with GET /api/setup/status and GET /api/agents.
Initial setup
Setup status distinguishes fresh, incomplete and ready. POST /api/setup/complete evaluates persisted operator identity and agent state; client-supplied flags do not establish completion. A model selection is not required merely to complete setup, but is required for normal model-backed chat.
Use the initial setup guide. The current wizard calls POST /api/setup/operation with an operationId, operator identity, agent, agent identity, a documents array and optional model selection. These durable stages share one transaction. A completed operation can be replayed with the same ID and identical input; changed input with that ID conflicts.
The current wizard sends all six profile kinds. Before retrying its known retained legacy five-kind submission, it inserts empty PREFERENCES and persists that repair while preserving the operation ID and every other field. Complete retained submissions replay unchanged. Profile validation failures roll back the operation's writes and do not record a replay ID; a changed payload against an already committed ID conflicts. Separately created provider connections are outside the transaction. See the recovery procedure.
Registry
Create requires name; an optional id must be a string and pass registry validation. Update supported identity/configuration fields through PATCH; deleting an agent affects its related store records, so treat it as a destructive administrative action. Disabling an agent is separate from deletion.
GET /api/agents includes disabled agents unless includeDisabled=false. POST /api/agents/overview is a bulk UI projection with normalized request selection; it does not launch agents. GET /api/agent-status is listed under diagnostics.
Native peer discovery
The agent-facing agents_list tool is separate from this operator registry API: it lists enabled peers by default, with optional substring query, disabled inclusion and pages of up to 20 exact identity cards. Known peers can be addressed directly by agent_send_message using canonical ID or unique full display name; discovery does not require Backdoor or MCP. See peer messaging. Registry listing is not a runtime health or peer-data permission check. For a mod-owned peer, native discovery additionally requires the a2a capability and a live owning context provider. Direct native sends recheck caller and target eligibility; a known identity or earlier discovery result does not bypass those checks. See mod-owned native agents.
Overview/status now retain root, immediate-parent and depth ancestry. Context hydration is bounded separately from the descendant tree; see status projections.
Profile documents
The six kinds are SOUL, RULES, ORIENTATION, PREFERENCES, TOOLS and DREAM_MEMORY. Each is at most 48,000 characters. GET returns the persisted documents; PUT replaces a complete set and requires all six, rather than merging an arbitrary one-document patch. Preserve the other current documents when preparing a replacement.
These documents live in PostgreSQL, even when rendered with file-like names or postgres: references. Descriptive tool/profile text is not an MCP grant. Per-agent model selection and MCP/skill assignments have separate endpoints; Dream settings also have separate routes.
Shared profiles
Current source implements shared RULES and ORIENTATION documents with per-agent useGlobalRules and useGlobalOrientation flags, through GET/PUT /api/settings/global-profile-documents. These settings first arrived after historical public 2026.10.19; older installations need an update before clients can rely on them.
Endpoint inventory
Methods are significant. Braced segments are placeholders; URL-encode identifiers. See the contract and conventions for artifact limitations.
| Method | Path | Purpose |
|---|---|---|
GET | /api/agents | List registered agents |
POST | /api/agents | Create a registered agent |
PATCH | /api/agents/{agentId} | Update a registered agent |
DELETE | /api/agents/{agentId} | Delete a registered agent |
GET | /api/agents/{agentId}/profile-documents | Read agent profile documents |
PUT | /api/agents/{agentId}/profile-documents | Replace agent profile documents |
GET | /api/setup/status | Read persistent installation setup state |
POST | /api/setup/complete | Mark installation setup complete after checking persisted requirements |
POST | /api/setup/operation | Transactional, replay-safe complete first-run setup |
POST | /api/agents/overview | Read bulk agent UI overview |
Targeted source review
The full page was reconciled on 2026-11-08 against Backend commit 6b682eae6cd0dc6efa79e173b7d819fb219443b3. No live API or provider calls were performed. The links below are retained historical public references, not links to the current development source.
29 October development delta
Changed contracts above were checked statically against Backend 4057b50a5d5a9b14d36bb3b70f35781c4b29a9b9 on 2026-10-29. This is not a runtime, provider or collector test, nor a revalidation of unchanged historical sections. See source coverage.
Agent-wide Minion overview
POST /api/agents/overview additionally accepts minionScope: "session" | "agent"; default is session, invalid values return 400 minion_scope_invalid. With agent, each successful status includes the requested session anchor plus visible Minions across that agent's originating sessions and declares status.minionScope: "agent". It does not include unrelated ordinary chats or other agents. Anchor IDs stay unchanged, including when the anchor itself is a child. Context hydration remains independently capped at the anchor plus 12 distinct children. /api/agent-status, recovery and cancellation retain their existing session scopes.
Reference-photo routes
GET|PUT|DELETE /api/agents/{agentId}/reference-image manage an agent photo independently of its avatar; success returns {ok:true,agentId,referenceImage}. The operator equivalent /api/operator/reference-image returns {ok:true,referenceImage} without agentId. GET yields metadata or null, PUT uploads/replaces, and DELETE returns null. PUT requires {fileName,content}, where content is a PNG/JPEG/WebP base64 data URL with at most 20 MiB decoded bytes.
Metadata contains id, attachmentId, contentUrl, mimeType, fileName, sizeBytes and updatedAt. The /content?id=<revision> child route streams the current original with private/no-store headers; missing, stale or wrong-agent revisions return 404. Ordinary settings authentication/scopes apply. The operator attachment identity is operator-reference-image:<uuid>; agent photos use agent-reference-image:<uuid>.
PostgreSQL owns links in agent_reference_images and singleton operator_reference_images; files live in Core's runtime-managed artifacts. Replacement/removal cleans the previous owned file, and agent deletion cleans its photo. These are not chat-retention attachments or selective-export payloads. See generation selectors.
The exact photo-byte endpoints are GET /api/agents/{agentId}/reference-image/content and GET /api/operator/reference-image/content, with the id revision query. Core also serves mod-owned photo bytes at GET /api/mod-reference-images/{modId}/{key}/content?id=... through ordinary media authentication; mod HTTP handlers themselves remain JSON-only.
15 November full static review
Rechecked the documented route family and its current implementation boundaries against Backend 29ca7b6cec378700503a587703adc1d82e9d6f6d. Historical source links and earlier receipts above remain historical. This pass inspected source and contracts; it did not execute API calls, application tests or model/provider work.
Mod-owned identity removal
DELETE /api/agents/{agentId} returns HTTP 409 agent_managed_by_mod for a mod-owned identity. Its installed owner can remove it through the mod host capability. This is distinct from removing an agent from a group, disabling it, or uninstalling a mod.
Check deletion cleanup
On Development builds exposing GET /api/agents/deletions, this read-only route reports pending and failed cleanup. Core commits the deletion event and tracks each installed mod's acknowledgement; disabled mods can receive pending work when reactivated. Core does not rewrite opaque mod data. A hidden or disabled identity is not a deleted identity, and identity reuse is fenced until pending cleanup completes.