Skip to main content

Authentication

UnifiedMemory accepts browser sessions for the product UI and scoped bearer keys for API, MCP, gateway, and agent integrations. For agent/runtime calls, scoped keys are the normal path.

Authorization: Bearer <scoped-key>

Do not place admin keys in agent config, public docs, screenshots, proof artifacts, or committed files.

Key types

TypeIntended useNotes
Scoped agent keyClaude, Codex, Hermes, OpenClaw, Gemini, Cursor, VS Code, REST clientsBound to source app, container, capabilities, and default scope.
Connector tokenShort-lived setup/bootstrap through ConnectionsUsed to establish a scoped integration without pasting admin credentials.
Admin/owner keyOperator workflows, cleanup, proof, and controlled live verificationKeep out of normal agent runtime.
Browser sessionProduct UI such as dashboard, review, settings, and Courtroom workspaceServer-owned session/cookie flow; not an MCP/API substitute.

Effective identity

The authenticated key or session decides the effective identity:

FieldSource of truth
workspace_id / container_tagKey/session metadata and route.
source_appKey metadata.
agent_idKey binding when present.
agent_scopeKey metadata, normally own.
capabilitiesKey grants.

If a request body or header claims a different agent_id, source_app, or scope, UnifiedMemory should preserve that only as diagnostics/audit and use the key-derived identity for authorization.

Capability failures

Expected status codes:

StatusMeaning
401Missing, malformed, expired, revoked, or unknown credential.
403Credential is valid but lacks the requested container, route, capability, or scope.
404Resource is not found or not visible to the authenticated principal.
422Credential is accepted, but the request payload is invalid.

Examples:

  • A key with recall capability but no write capability receives 403 from retain/writeback.
  • A Claude-scoped key asking for Codex working memory should receive no leaked memory; if the route requires direct access, it should receive 403 or scoped empty results.
  • A missing bearer token receives 401.

Safe examples

Use environment variables:

export UNIFIED_MEMORY_API_KEY="<scoped-key>"
curl https://edge-api.jithendranara.dev/api/v2/containers/jeethendra/recall \
-H "Authorization: Bearer $UNIFIED_MEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"What docs changed?","limit":5}'

Use connector tokens only for setup flows:

curl https://edge-api.jithendranara.dev/mcp/connect/<connector-token> \
-X POST \
-H "Content-Type: application/json" \
-d '{"client":"codex"}'

Rotation and reissue

If a key is exposed or no longer needed:

  • revoke or rotate it from Connections or Settings/Ops;
  • reissue a new scoped key for the same integration;
  • update the local agent config or environment variable;
  • verify the selected key with a real tool call, not just a browser preflight.

General credential rotation should not return raw keys through broad web settings surfaces. Use an explicit key reveal/reissue flow.

Sessions and logout

Browser sessions are for the hosted UI. Logging out should revoke the backend session and clear relevant cookies before redirecting to login. A changed password should require a fresh session and should not silently restore an old browser session.

Next steps