Appearance
API Guide
Use this page as the integration contract source.
What this page covers
- Authentication and request conventions.
- Isolation and identity boundaries.
- The identifiers every client must persist.
- Retry and error-handling behavior for production callers.
Authentication
X-Api-Key: <key>Authorization: Bearer <token>X-Admin-Token: <token>for admin and control endpoints
Base URL and headers
Use one consistent base URL per environment, for example:
- Local:
http://localhost:3001 - Hosted:
https://api.your-domain.com
Send:
content-type: application/json- one supported auth header
- explicit
tenant_idandscopein the JSON body
Isolation model
- Isolation boundary is
(tenant_id, scope). - Always send both fields explicitly.
- Private-lane visibility requires owner identity match.
Endpoint groups
- Memory:
POST /v1/memory/write,POST /v1/memory/recall,POST /v1/memory/recall_text,POST /v1/memory/context/assemble,POST /v1/memory/find,POST /v1/memory/resolve - Sessions and events:
POST /v1/memory/sessions,POST /v1/memory/events,GET /v1/memory/sessions/:session_id/events - Policy:
POST /v1/memory/rules/evaluate,POST /v1/memory/tools/select,POST /v1/memory/tools/decision,POST /v1/memory/tools/run,POST /v1/memory/tools/feedback - Replay:
POST /v1/memory/replay/* - Sandbox (experimental):
POST /v1/memory/sandbox/*
Detailed groups are listed in API Reference.
Identifiers to persist
request_idtenant_idscoperun_iddecision_idanddecision_uricommit_idandcommit_uri
These are the minimum fields required to trace and replay a workflow later.
Error model
json
{
"error": "string_code",
"message": "human_readable_message",
"details": {}
}Common classes:
invalid_request(400)unauthorized/forbidden(401/403)not_found(404)rate_limited_*(429)backend_capability_unsupported(501)
Retry behavior
- Retry
429and transient5xxwith exponential backoff and jitter. - Do not hot-loop on
400,401,403, or other validation and auth failures. - Treat write and decision endpoints as non-idempotent unless your client provides its own dedupe strategy.
Production integration checklist
- Verify
write -> recall_text -> resolveon the target environment. - Validate both success and failure auth cases.
- Capture provenance IDs in logs and telemetry.
- Implement retry and backoff for
429and transient5xx.