The Agent Memory API Errors
- reference
An explanation of error messages generated by the Agent Memory API.
This page is for self-managed Agent Memory.
API errors occur when a request fails to complete, typically returning standardized HTTP status codes that indicate the type and cause of the failure.
Agent Memory API Error Messages
HTTP Status 400
Bad request.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
Session has already ended The session has already been ended and cannot be ended again or written to. Start a new session for further activity. |
|
|
|
A prompt reference was provided but semantic extraction is disabled for this call A prompt_id was supplied while semantic extraction was turned off for the request. Enable extraction, or drop the prompt reference. |
|
|
|
Invalid request The request was rejected as malformed — for example an unparseable filter or other caller-supplied value. Correct the request and resend. |
|
HTTP Status 401
Unauthorized.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
Invalid token The bearer token is malformed, has invalid claims, or is an ID token rather than an access token. Send a valid OIDC access token in the Authorization header. |
|
|
|
Token has expired The access token is past its expiry. Obtain a fresh token from your identity provider and retry. |
|
|
|
Token validation failed The token could not be validated against the identity provider's keys. Confirm the token was issued by the configured issuer and audience, then retry with a new token. |
|
|
|
Authentication required No bearer token was supplied for a protected route. Include an Authorization=Bearer <access_token> header. |
|
HTTP Status 403
Forbidden.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
Insufficient permissions The token is valid but carries no AMS role, or a role below the tier this route requires (ams_ro < ams_rw < ams_admin). The response names the required tier. Grant the caller the needed role. |
|
HTTP Status 404
Not found.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
User not found No user exists for the user_id in the path. Create the user first, or check the identifier. |
|
|
|
Session not found No session exists for the given session_id (and user_id, when the lookup is user-scoped). Create the session first, or check the identifiers. |
|
|
|
Prompt not found No prompt exists for the given prompt_id. Register the prompt first, or check the identifier. |
|
|
|
Prompt version not found The requested version of the prompt does not exist. List the prompt's versions and reference an existing one. |
|
|
|
Memory block not found No memory block exists for the given id (within the session, when the lookup is session-scoped). Check the block id, or note that only READY blocks are retrievable. |
|
|
|
Resource not found No route matches the requested method and path. Check the URL and HTTP method against the API reference. |
|
HTTP Status 409
Conflict.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
User already exists A user with this user_id already exists. Use a different id, or fetch/update the existing user instead of creating it. |
|
|
|
Session already exists A session with this session_id already exists for the user. Use a different id, or continue with the existing session. |
|
|
|
Prompt already exists A prompt with this prompt_id already exists. Use a different id, or update the existing prompt to create a new version. |
|
|
|
Prompt has been archived and can no longer be referenced or re-created The whole prompt id has been archived. Reference a different prompt; an archived id cannot be reused or recreated. |
|
|
|
Prompt has already been archived The prompt is already archived, so it cannot be archived again. No action needed. |
|
|
|
Prompt version has been archived and can no longer be pinned to The referenced prompt version is archived and cannot be pinned to. Pin to a live version instead. |
|
|
|
Prompt version has already been archived The prompt version is already archived, so it cannot be archived again. No action needed. |
|
|
|
Cannot purge the current version of a prompt — update it to a new version first, or purge the whole prompt instead Purging the version currently in use is not allowed. Update the prompt to a new current version first, then purge the old one, or purge the entire prompt. |
|
|
|
Cannot archive the current version of a prompt — update it to a new version first, or archive the whole prompt instead Archiving the version currently in use is not allowed. Update the prompt to a new current version first, then archive the old one, or archive the entire prompt. |
|
|
|
Prompt is currently being purged A purge of this prompt is already in progress. Wait for it to finish before issuing another purge. |
|
|
|
Memory block is currently being processed The block is mid semantic-extraction and cannot be updated right now. This is transient; retry after the interval in the Retry-After header. |
|
HTTP Status 422
Unprocessable content.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
Request validation failed The request body or parameters failed schema validation. details.fields lists each offending field and why. Fix those fields and resend. |
|
HTTP Status 429
Too many requests.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
Memory processing queue is full The asynchronous extraction queue is at capacity, so the block was not accepted. Back off and retry after the Retry-After header; details.queue_size and details.queue_max_size report current depth. |
|
HTTP Status 500
Internal server errors.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
User operation failed An unexpected server-side error occurred while processing the user operation. Retry; if it persists, contact support with the request_id. |
|
|
|
Session operation failed An unexpected server-side error occurred while processing the session operation. Retry; if it persists, contact support with the request_id. |
|
|
|
Prompt operation failed An unexpected server-side error occurred while processing the prompt operation. Retry; if it persists, contact support with the request_id. |
|
|
|
Failed to delete memory block The block could not be deleted due to a server-side error. Retry; if it persists, contact support with the request_id. |
|
|
|
Failed to generate embeddings for memory blocks The embedding provider returned an error while embedding the submitted blocks. Retry; if it persists, check the embedding model configuration and provider status. |
|
|
|
Memory block operation failed An unexpected server-side error occurred while processing the memory block. Retry; if it persists, contact support with the request_id. |
|
|
|
Database operation failed A non-transient Couchbase failure that will not improve on retry. When a bucket, scope, collection, keyspace, or index is missing, details.service, details.resource, and details.name identify it; other database faults (e.g. a malformed query) carry no details and only a request_id. Check that the configured storage and FTS indexes exist. |
|
|
|
Internal server error An unhandled server-side error occurred. Retry; if it persists, contact support with the request_id from the response. |
|
HTTP Status 502
Bad gateway.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
Unable to connect to model service The server could not open a connection to the model provider. The body message is generic by design; the failure is identified by the X-Upstream-Service and X-Error-Class=connection_error response headers, and the underlying error is logged against the request_id. Check network egress to the provider and provider status, then retry. |
|
|
|
Model service error The model provider returned an unexpected error. The body message is generic; X-Upstream-Service and X-Error-Class (the provider error class) name the failure, and the detail is logged against the request_id. Retry; if it persists, check provider status. |
|
HTTP Status 503
Service unavailable.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
Authentication service temporarily unavailable The identity provider (OIDC discovery or JWKS endpoint) is unreachable, so the token could not be validated. This is transient and unrelated to the token itself; retry after a short delay. |
|
|
|
Database is temporarily unavailable A transient Couchbase failure (timeout or connection loss) occurred. This is retryable; retry after a short delay. details.service is "database". |
|
|
|
Embedding service is unavailable The embedding model failed its health check and requests are being blocked. details.service is "embedding". Retryable once the provider recovers; check the embedding model configuration and provider status. |
|
|
|
LLM service is unavailable The LLM (extraction) model failed its health check and requests are being blocked. details.service is "llm". Retryable once the provider recovers; check the LLM model configuration and provider status. |
|
|
|
Model service authentication failed The model provider rejected the configured API key. Identified by the X-Upstream-Service and X-Error-Class=authentication_error response headers. This is a server configuration issue, not the caller's; rotate or correct the provider API key. |
|
|
|
Model health check failed A pre-request model health check failed. The X-Upstream-Service=model response header marks it; no details object is returned. Retryable once the model recovers; check the model configuration and provider status. |
|
|
|
Model service temporarily unavailable due to upstream rate limiting The model provider rate-limited this deployment and internal retries were exhausted. details.retry_after_seconds and details.service (embedding/llm/unknown) accompany it, mirrored by the Retry-After and X-Error-Class=rate_limit_exhausted headers. Back off and retry after Retry-After. |
|
|
|
Model provider account quota exhausted — retrying will not help The model provider account is out of quota or credits. details.service names the affected model and details.retry_after_seconds is 0; the X-Error-Class=quota_exhausted header marks it and no Retry-After is sent. This is permanent until resolved; top up credits or rotate the API key. |
|
|
|
Server is under memory pressure The server is shedding load because memory usage crossed its threshold. No details object is returned; the Retry-After and X-Memory-Usage-Percent response headers carry the specifics. Back off and retry after Retry-After. |
|
HTTP Status 504
Gateway timeout.
| Code | Name | Description | HTTP Status |
|---|---|---|---|
|
|
Model service request timed out The model provider did not respond within the timeout. Identified by the X-Upstream-Service and X-Error-Class=timeout response headers. Retry; if it persists, check provider status and latency. |
|
See Also
-
For more information about the Agent Memory API, see Agent Memory API for Self-Managed Deployments.
-
For a full reference guide, see Agent Memory API Reference.
-
To make an API call, see Make an API Call with the Agent Memory API.