Skip to content

Error codes

AI Workbench returns every error in a stable envelope:

json
{
  "error": {
    "code": "workspace_not_found",
    "message": "workspace \"ws_123\" not found",
    "requestId": "01HY2Z...",
    "hint": "The workspace does not exist or your principal cannot see it; run `aiw workspace list` to verify.",
    "docs": "docs/errors.md#workspace-not-found"
  }
}

The code field is stable across releases. The table below maps every registered code to its canonical HTTP status and remediation hint; the long-form sections that follow are the canonical destination for the envelope's docs field.

Index

CodeStatusHint
agent_not_found404The agent does not exist in this workspace; create one before sending messages.
agent_template_not_found404The agent template is not registered; pick one from GET /api/v1/agent-templates.
agent_tool_unresolved422One or more requested toolIds name a namespaced tool (mcp:/native:/astra:) that doesn't resolve in this workspace — register/enable the underlying MCP server or capability, or remove the id.
api_key_not_found404The API key does not exist or was revoked.
cascade_incomplete500A workspace delete partially failed across Astra partitions; the workspace was left intact — retry the delete to complete the idempotent cascade.
chat_disabled503No chat provider is configured; uncomment the chat block in workbench.yaml or bind an LLM service to the agent.
chat_message_not_found404The chat message does not exist in this conversation.
chat_not_found404The chat thread does not exist for this workspace.
chunking_service_in_use409At least one knowledge base binds this chunking service; rebind the KBs before deleting.
chunking_service_not_found404The chunking service is not configured in this workspace.
collection_name_taken409An Astra collection with this name already exists; choose another or adopt the existing one.
collection_not_found404The Astra collection does not exist; create it first or check the spelling.
collection_unavailable503The Astra collection is temporarily unreachable; retry with backoff.
conflict409The resource already exists or its state changed underneath you; refetch and retry.
control_plane_unavailable503The control-plane backend is unreachable; verify Astra connectivity or the file driver path.
conversation_not_found404The conversation does not exist for this agent; conversations are scoped per-agent.
data_api_error502The Astra Data API returned an error; check Astra status and the runtime logs.
data_api_unavailable503The Astra Data API is unreachable or timed out; retry with backoff.
dimension_mismatch400The vector dimension does not match the collection's configured dimension.
document_not_found404The document is not in this knowledge base; document IDs are scoped per-KB.
draining503The runtime is shutting down and is no longer accepting new requests; retry against another replica.
driver_unavailable503The vector-store driver registered for this workspace failed to initialize.
embedding_dimension_mismatch400The embedding service returned a vector whose dimension does not match the collection.
embedding_service_in_use409At least one knowledge base binds this embedding service; rebind the KBs before deleting.
embedding_service_not_found404The embedding service is not configured in this workspace.
embedding_unavailable503The embedding provider is unreachable or rejected the request; check the service credentials.
empty_file400The uploaded file is zero bytes; check the source path before retrying.
forbidden403Your principal is authenticated but lacks the required scope or workspace access.
forbidden_origin403The request Origin/Referer does not match the configured publicOrigin; check your reverse proxy.
hybrid_not_supported501The active vector-store driver does not support hybrid (lexical+vector) search.
internal_error500An unexpected error occurred; check the runtime logs with the requestId for the full stack.
invalid_chunker400The chunker name is not registered; valid chunkers are listed at GET /api/v1/chunkers.
invalid_cursor400The pagination cursor is malformed or expired; restart pagination from the first page.
invalid_metadata400The metadata object must be a shallow record of string-keyed JSON-safe values.
invalid_multipart400The multipart/form-data body could not be parsed; check the Content-Type boundary.
invalid_parser400The parser name is not registered for this MIME type.
invalid_playground_command400The playground command name or argument shape is invalid; see /docs for the supported command list.
invalid_visible_to400The visibleTo field must be a non-empty array of principal IDs or '*'.
job_not_found404The job ID does not exist or its retention window has elapsed.
kb_name_must_match_collection400The KB name must equal the existing collection name when adopting an Astra collection.
kb_name_taken409A knowledge base with this name already exists in the workspace; pick a unique name.
knowledge_base_not_found404The knowledge base does not exist in this workspace; run aiw kb list --workspace <id>.
knowledge_filter_not_found404The knowledge filter is not defined in this workspace.
list_records_not_supported501This driver does not expose a list-records operation; use search instead.
llm_credential_missing503The LLM provider credential could not be resolved; check the credentialsRef on the service.
llm_model_not_chat422The model is not served for chat completion; pick an instruct/chat model.
llm_model_unavailable422The provider does not serve this model; check the model id (e.g. an OpenRouter slug like openai/gpt-4o-mini) and that your account/credits can route it.
llm_provider_unsupported422The agent's LLM service uses a provider this runtime cannot dispatch; choose openrouter, openai, or ollama (HuggingFace was removed in 0.3.0).
llm_service_in_use409At least one agent binds this LLM service; rebind the agents before deleting.
llm_service_not_found404The LLM service is not configured in this workspace.
missing_file400The request must include a file part in the multipart body.
not_found404The route or resource does not exist; check the URL and the active workspace.
payload_too_large413Request body exceeded the per-route ceiling; split the payload or use the multipart ingest endpoint for large files.
policy_denied403The active principal is not permitted to access this resource by the workspace's RLAC policy.
policy_principal_required401This route requires a resolved sub-workspace principal; ensure your token carries the principal claim.
principal_not_found404The principal does not exist in this workspace's RLAC table.
rate_limited429You hit the per-IP rate limit; back off and retry, or raise runtime.rateLimit.capacity.
rerank_not_supported501The active vector-store driver does not support reranking; set rerank=false.
reranking_service_in_use409At least one knowledge base binds this reranking service; rebind the KBs before deleting.
reranking_service_not_found404The reranking service is not configured in this workspace.
setup_restart_unavailable503This runtime did not register a restart hook; restart the container manually (docker compose restart workbench).
unauthorized401Provide a valid API key or OIDC token via the Authorization header.
unsupported_workspace_kind422This operation is not implemented for the workspace's backend kind.
validation_error400Request body or query string failed schema validation; see the message for the offending field.
vector_collection_not_allowed400This operation targets a non-vector collection; remove the vector field from the request.
vector_collection_required400This operation requires a vector-enabled collection; recreate it with a vector dimension.
vectorize_service_mismatch400The KB's embedding service does not match the collection's $vectorize service definition.
workspace_database_conflict409Another workspace is already bound to this (endpoint, keyspace); reuse it or pick a different keyspace.
workspace_misconfigured422The workspace is missing required configuration (credentials, endpoint, or keyspace).
workspace_name_conflict409A workspace with this name already exists; pick a unique name.
workspace_not_found404The workspace does not exist or your principal cannot see it; run aiw workspace list to verify.

agent_not_found

  • Default status: 404
  • Hint: The agent does not exist in this workspace; create one before sending messages.

agent_template_not_found

  • Default status: 404
  • Hint: The agent template is not registered; pick one from GET /api/v1/agent-templates.

agent_tool_unresolved

  • Default status: 422
  • Hint: One or more requested toolIds name a namespaced tool (mcp:/native:/astra:) that doesn't resolve in this workspace — register/enable the underlying MCP server or capability, or remove the id.

api_key_not_found

  • Default status: 404
  • Hint: The API key does not exist or was revoked.

cascade_incomplete

  • Default status: 500
  • Hint: A workspace delete partially failed across Astra partitions; the workspace was left intact — retry the delete to complete the idempotent cascade.

chat_disabled

  • Default status: 503
  • Hint: No chat provider is configured; uncomment the chat block in workbench.yaml or bind an LLM service to the agent.

chat_message_not_found

  • Default status: 404
  • Hint: The chat message does not exist in this conversation.

chat_not_found

  • Default status: 404
  • Hint: The chat thread does not exist for this workspace.

chunking_service_in_use

  • Default status: 409
  • Hint: At least one knowledge base binds this chunking service; rebind the KBs before deleting.

chunking_service_not_found

  • Default status: 404
  • Hint: The chunking service is not configured in this workspace.

collection_name_taken

  • Default status: 409
  • Hint: An Astra collection with this name already exists; choose another or adopt the existing one.

collection_not_found

  • Default status: 404
  • Hint: The Astra collection does not exist; create it first or check the spelling.

collection_unavailable

  • Default status: 503
  • Hint: The Astra collection is temporarily unreachable; retry with backoff.

conflict

  • Default status: 409
  • Hint: The resource already exists or its state changed underneath you; refetch and retry.

control_plane_unavailable

  • Default status: 503
  • Hint: The control-plane backend is unreachable; verify Astra connectivity or the file driver path.

conversation_not_found

  • Default status: 404
  • Hint: The conversation does not exist for this agent; conversations are scoped per-agent.

data_api_error

  • Default status: 502
  • Hint: The Astra Data API returned an error; check Astra status and the runtime logs.

data_api_unavailable

  • Default status: 503
  • Hint: The Astra Data API is unreachable or timed out; retry with backoff.

dimension_mismatch

  • Default status: 400
  • Hint: The vector dimension does not match the collection's configured dimension.

document_not_found

  • Default status: 404
  • Hint: The document is not in this knowledge base; document IDs are scoped per-KB.

draining

  • Default status: 503
  • Hint: The runtime is shutting down and is no longer accepting new requests; retry against another replica.

driver_unavailable

  • Default status: 503
  • Hint: The vector-store driver registered for this workspace failed to initialize.

embedding_dimension_mismatch

  • Default status: 400
  • Hint: The embedding service returned a vector whose dimension does not match the collection.

embedding_service_in_use

  • Default status: 409
  • Hint: At least one knowledge base binds this embedding service; rebind the KBs before deleting.

embedding_service_not_found

  • Default status: 404
  • Hint: The embedding service is not configured in this workspace.

embedding_unavailable

  • Default status: 503
  • Hint: The embedding provider is unreachable or rejected the request; check the service credentials.

empty_file

  • Default status: 400
  • Hint: The uploaded file is zero bytes; check the source path before retrying.

forbidden

  • Default status: 403
  • Hint: Your principal is authenticated but lacks the required scope or workspace access.

forbidden_origin

  • Default status: 403
  • Hint: The request Origin/Referer does not match the configured publicOrigin; check your reverse proxy.

hybrid_not_supported

  • Default status: 501
  • Hint: The active vector-store driver does not support hybrid (lexical+vector) search.

internal_error

  • Default status: 500
  • Hint: An unexpected error occurred; check the runtime logs with the requestId for the full stack.

invalid_chunker

  • Default status: 400
  • Hint: The chunker name is not registered; valid chunkers are listed at GET /api/v1/chunkers.

invalid_cursor

  • Default status: 400
  • Hint: The pagination cursor is malformed or expired; restart pagination from the first page.

invalid_metadata

  • Default status: 400
  • Hint: The metadata object must be a shallow record of string-keyed JSON-safe values.

invalid_multipart

  • Default status: 400
  • Hint: The multipart/form-data body could not be parsed; check the Content-Type boundary.

invalid_parser

  • Default status: 400
  • Hint: The parser name is not registered for this MIME type.

invalid_playground_command

  • Default status: 400
  • Hint: The playground command name or argument shape is invalid; see /docs for the supported command list.

invalid_visible_to

  • Default status: 400
  • Hint: The visibleTo field must be a non-empty array of principal IDs or '*'.

job_not_found

  • Default status: 404
  • Hint: The job ID does not exist or its retention window has elapsed.

kb_name_must_match_collection

  • Default status: 400
  • Hint: The KB name must equal the existing collection name when adopting an Astra collection.

kb_name_taken

  • Default status: 409
  • Hint: A knowledge base with this name already exists in the workspace; pick a unique name.

knowledge_base_not_found

  • Default status: 404
  • Hint: The knowledge base does not exist in this workspace; run aiw kb list --workspace <id>.

knowledge_filter_not_found

  • Default status: 404
  • Hint: The knowledge filter is not defined in this workspace.

list_records_not_supported

  • Default status: 501
  • Hint: This driver does not expose a list-records operation; use search instead.

llm_credential_missing

  • Default status: 503
  • Hint: The LLM provider credential could not be resolved; check the credentialsRef on the service.

llm_model_not_chat

  • Default status: 422
  • Hint: The model is not served for chat completion; pick an instruct/chat model.

llm_model_unavailable

  • Default status: 422
  • Hint: The provider does not serve this model; check the model id (e.g. an OpenRouter slug like openai/gpt-4o-mini) and that your account/credits can route it.

llm_provider_unsupported

  • Default status: 422
  • Hint: The agent's LLM service uses a provider this runtime cannot dispatch; choose openrouter, openai, or ollama (HuggingFace was removed in 0.3.0).

llm_service_in_use

  • Default status: 409
  • Hint: At least one agent binds this LLM service; rebind the agents before deleting.

llm_service_not_found

  • Default status: 404
  • Hint: The LLM service is not configured in this workspace.

missing_file

  • Default status: 400
  • Hint: The request must include a file part in the multipart body.

not_found

  • Default status: 404
  • Hint: The route or resource does not exist; check the URL and the active workspace.

payload_too_large

  • Default status: 413
  • Hint: Request body exceeded the per-route ceiling; split the payload or use the multipart ingest endpoint for large files.

policy_denied

  • Default status: 403
  • Hint: The active principal is not permitted to access this resource by the workspace's RLAC policy.

policy_principal_required

  • Default status: 401
  • Hint: This route requires a resolved sub-workspace principal; ensure your token carries the principal claim.

principal_not_found

  • Default status: 404
  • Hint: The principal does not exist in this workspace's RLAC table.

rate_limited

  • Default status: 429
  • Hint: You hit the per-IP rate limit; back off and retry, or raise runtime.rateLimit.capacity.

rerank_not_supported

  • Default status: 501
  • Hint: The active vector-store driver does not support reranking; set rerank=false.

reranking_service_in_use

  • Default status: 409
  • Hint: At least one knowledge base binds this reranking service; rebind the KBs before deleting.

reranking_service_not_found

  • Default status: 404
  • Hint: The reranking service is not configured in this workspace.

setup_restart_unavailable

  • Default status: 503
  • Hint: This runtime did not register a restart hook; restart the container manually (docker compose restart workbench).

unauthorized

  • Default status: 401
  • Hint: Provide a valid API key or OIDC token via the Authorization header.

unsupported_workspace_kind

  • Default status: 422
  • Hint: This operation is not implemented for the workspace's backend kind.

validation_error

  • Default status: 400
  • Hint: Request body or query string failed schema validation; see the message for the offending field.

vector_collection_not_allowed

  • Default status: 400
  • Hint: This operation targets a non-vector collection; remove the vector field from the request.

vector_collection_required

  • Default status: 400
  • Hint: This operation requires a vector-enabled collection; recreate it with a vector dimension.

vectorize_service_mismatch

  • Default status: 400
  • Hint: The KB's embedding service does not match the collection's $vectorize service definition.

workspace_database_conflict

  • Default status: 409
  • Hint: Another workspace is already bound to this (endpoint, keyspace); reuse it or pick a different keyspace.

workspace_misconfigured

  • Default status: 422
  • Hint: The workspace is missing required configuration (credentials, endpoint, or keyspace).

workspace_name_conflict

  • Default status: 409
  • Hint: A workspace with this name already exists; pick a unique name.

workspace_not_found

  • Default status: 404
  • Hint: The workspace does not exist or your principal cannot see it; run aiw workspace list to verify.

Released under the MIT license.