Expand description
HTTP API contract for the Context service.
§Why this service exists
Conversation history is durable, cross-turn state. A Runtime must be able to
read and append it without owning a database and without holding a platform
service secret. Giving history its own service does for history what
agent-workspace-infra does for sandboxes: one owner, one HTTP contract, one
deployable.
§Layering
agent-context-contract paths + DTOs (this crate)
agent-context-runtime store implementation
agent-context-server router + auth + binSee api.md for the full HTTP reference.
Structs§
- ApiError
- Error body shared by every non-2xx response.
- Append
Messages Request - Append
Response - Result of an append.
appendedexcludes ids that already existed, so a caller can tell a fresh write from a deduplicated retry. - Authorized
Scope - Scope derived from a verified gateway-issued internal credential.
- Context
Derivation - Context
Export Artifact - Context
Export Artifact Chunk - Context
Insight - Context
Maintenance Status - Context
Operation - Context
Provenance - Context
Window - Context
Window Item - One ordered item that was actually visible to the model.
- Conversation
Record - One durable conversation message.
- Conversation
Scope - Identifies the conversation a record belongs to.
- Correct
Context Insight Request - Create
Context Derivation Request - Create
Context Window Request - Delete
Conversation Request - Deletion
Operation - Expire
Context Insight Request - Export
Context Request - GetContext
Export Artifact Chunk Request - GetContext
Export Artifact Request - GetContext
Insight Request - GetContext
Operation Request - GetContext
Window Request - GetDeletion
Operation Request - GetModel
Invocation Request - Import
Context Request - Index
Watermark - Knowledge
Evidence - The smallest replayable external-knowledge record. References are opaque to Context Infra and never imply ownership of the provider’s source document.
- Merge
Context Insights Request - Message
Cursor - Stable opaque cursor position for
(sequence ASC, id ASC)ordering. - Message
Page - Messages
Response - Records in chronological order, oldest first.
- Model
Invocation - Audit record for the exact request snapshot supplied to one model call.
- Page
Messages Request - PutContext
Insight Request - PutModel
Invocation Request - Rebuild
Vector Projection Request - Recall
Context Request - Recall
Context Response - Recall
Score Breakdown - Recalled
Context - Recent
Messages Request - Retention
Policy - Retention
Request - Search
Messages Request
Enums§
- Context
Derivation Kind - Context
Insight Kind - Context
Insight Status - Context
Operation Kind - Context
Operation State - Context
Window Item Kind - Context
Window Stage - Model
Invocation State
Constants§
- AUDIENCE
- CONTEXT_
ADVANCED_ OPERATIONS_ PATH - CONTEXT_
CORRECT_ PATH - CONTEXT_
EXPIRE_ PATH - CONTEXT_
EXPORT_ ARTIFACT_ CHUNK_ PATH - CONTEXT_
EXPORT_ ARTIFACT_ PATH - CONTEXT_
EXPORT_ PATH - CONTEXT_
IMPORT_ PATH - CONTEXT_
INSIGHTS_ PATH - CONTEXT_
INSIGHT_ GET_ PATH - CONTEXT_
MERGE_ PATH - CONTEXT_
OPERATIONS_ PATH - CONTEXT_
RECALL_ PATH - CONVERSATION_
DELETE_ PATH - DEFAULT_
PAGE_ SIZE - Default page size when a request omits
limit. - DEFAULT_
PORT - DERIVATIONS_
PATH - HEALTH_
PATH - MAINTENANCE_
STATUS_ PATH - MAX_
APPEND_ BYTES - Maximum serialized payload bytes accepted by one atomic append.
- MAX_
APPEND_ MESSAGES - Maximum number of records accepted by one atomic append.
- MAX_
PAGE_ SIZE - Upper bound the server enforces on any page size.
- MAX_
RESOURCE_ ID_ CHARS - MAX_
SEARCH_ QUERY_ BYTES - MAX_
WINDOW_ BYTES - MAX_
WINDOW_ ITEMS - MESSAGES_
APPEND_ PATH - MESSAGES_
PAGE_ PATH - MESSAGES_
RECENT_ PATH - MESSAGES_
SEARCH_ PATH - MODEL_
INVOCATIONS_ PATH - MODEL_
INVOCATION_ GET_ PATH - RETENTION_
PATH - SERVICE_
NAME - SERVICE_
TOKEN_ ENV - Optional static service token. When unset, the server runs in open mode.
- VECTOR_
REBUILD_ PATH - WINDOWS_
PATH - WINDOW_
GET_ PATH
Functions§
- content_
text - Extract plain text from a message
contentvalue.