The management API provides control-plane operations: creating Contexts, managing API keys, and operator lifecycle. All management endpoints are under /api/v1/ and require a management key.
Authentication
Management endpoints require a management API key in the same header as the data plane:
Keys are printed once by bootstrap or minted via spectron keys generate-key / management REST. They are distinct from per-Context end-user keys.
Contexts
List Contexts
Returns all Contexts registered on this Spectron deployment.
Response:
Create a Context
Creates the Context, provisions the SurrealDB namespace and database, and applies schema migrations. Returns 201 Created.
Response:
Get a Context
Returns the Context record. Provider API key values are replaced with a providers_configured summary.
Update Context config
Deep-merges the provided config into the existing config. Unset fields are left unchanged.
Delete a Context
Drops the bound SurrealDB database (removing all authoritative knowledge and experiential memory data), deletes the associated API keys, and removes the control-plane registry entry. This is irreversible. Returns 204 No Content.
API keys
List keys for a Context
Response:
The secret is never returned after creation.
Create a key
Response (secret shown once):
Principal types:
| Principal | Capabilities |
|---|---|
agent | Create sessions, add turns, recall context, search knowledge. Cannot persist reflections or manage keys. |
supervisor | All agent capabilities plus persisting reflections at the supervisor's scope floor. |
Rotate a key
Generates a new secret for the key. The old secret is immediately invalidated. Returns the new secret (shown once).
Delete a key
Revokes the key immediately. Returns 204 No Content.
Knowledge upload (management-only)
Document ingestion requires a management key or an agent key with explicit upload capability. See Uploading documents for the full upload API.
Ontology management
Ontology endpoints (entity type definitions, attribute key declarations, and relation label declarations) are management-only. See Ontology grounding for details.
Lifecycle operations
Trigger decay pass
Runs the lifecycle decay pass immediately, expiring context-category memories past their TTL and pruning expired semantic cache entries:
Force reindex
Triggers re-embedding and re-indexing of all chunks in a Context (e.g. after changing the embedding model):
This is a long-running operation. Poll the returned job ID to track progress.
Pagination
List endpoints support cursor-based pagination:
Response:
next_cursor is null and has_more is false when the last page has been reached.