You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ Optional GitHub repo **variables** (build-time baked into the SPA bundle):
92
92
The Mongo cluster is the source of truth for AgentOS. **Only the `agentos-server` connects to Mongo.** As of the post-0.2.1 dev build, the Python SDK no longer writes Mongo directly — it POSTs telemetry to the server's ingest endpoint (`AgentOSHttpSink` → `POST /agentos/api/ingest/events`), and the server owns all writes. (The old `AgentRegistrySink` + `MongoMessageSink` and the `motor` dep were removed — see the Python SDK history below.)
93
93
94
94
**Collections (database = the server's `MONGO_DATABASE`):**
95
-
-`agent_registry` — one doc per registered agent (the server writes `source.type="library"` for harness-mode agents → AgentOS UI hides the chat-sandbox button for those, see commit `8d829b8`). Also carries **ownership** (`ownerGroup`/`ownerUser`, see §2.6b) and **GAP source sync** (`sourceSha`/`sourceSyncedAt` — the commit SHA the SDK last loaded; the `session_started` projection updates it and logs drift, see §2.6c).
95
+
-`agent_registry` — one doc per registered agent (the server writes `source.type="library"` for harness-mode agents → AgentOS UI hides the chat-sandbox button for those, see commit `8d829b8`). Also carries **ownership** (`ownerGroup`/`ownerUser`, see §2.6b) and **GAP source sync** (`sourceSha`/`sourceSyncedAt` — the commit SHA the SDK last loaded; the `session_started` projection updates it and logs drift, see §2.6c).**Identity key:** when the SDK supplies a stable `agent_id` (sparse-unique `agentId` field) the registry + per-agent joins (`sessions`/`chat_sessions`/`agent_logs`) key on it and `name` becomes a mutable display label — so renaming an agent doesn't re-register it. A legacy name-keyed doc is *adopted* (not duplicated) on the first run that carries an id; absent → keyed on `name` as before. Dashboard reads join `{$or:[{agentId},{name}]}` for back-compat.
96
96
-`agent_logs` — one doc per conversation (one `ComputerAgent` instance = one log row, multi-turn collapses correctly since the 0.2.0 session-id refactor)
97
97
-`sessions` — ordered chat transcript (one doc per session_id, entries appended in order; **`session_started` is the sole creator** of the doc, so a dropped/reordered start can't stub it)
98
98
-`chat_sessions` — the session-index row (`{_id, agent, createdAt, lastMessageAt}`) the dashboard's session list + per-agent `sessionCount`/`lastActivity` read. The server projection writes this so library-mode sessions show up (the old Python sink omitted it).
|`MONGO_URL`|`mongodb+srv://user:pass@cluster/...` — required, server refuses to start without it |
406
406
|`MONGO_DATABASE`| Default `computeragent-test`. Set to `computeragent` / `computeragent-prod` per env |
407
407
|`CA_BASE`| URL of the harness-server. Default `http://127.0.0.1:8787`. In Docker, use `http://host.docker.internal:8787` (Mac/Win) or the harness container hostname (compose / k8s) |
408
-
|`ANTHROPIC_API_KEY`| Powers the `/completion` route (the "agent-less" chat from the SPA home page) |
408
+
|`ANTHROPIC_API_KEY`| Powers the `/completion` route (the "agent-less" chat from the SPA home page) **and** the `POST /agentos/api/v1/messages`**Anthropic gateway** (`routes/messages.ts`) — a cak_-authed (`completion:run`) transparent reverse proxy to Anthropic. Lets a local SDK consumer point `ANTHROPIC_BASE_URL=<host>/agentos/api` + `ANTHROPIC_AUTH_TOKEN=cak_…` so the upstream key lives only on the server (see smoke #07). |
0 commit comments