Agent Contexts / Create

Create Agent Context

Create a persistent agent context for multi-turn conversations. Agent contexts maintain conversation history and retrieved content across multiple interactions, enabling coherent follow-up questions and contextual responses.

POST {baseAPIUrl}/agent-contexts

Authentication

Required. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Query Parameters

ParameterTypeRequiredDescription
appIdstringRequiredApplication identifier
externalUserIdstringRequiredExternal user identifier

Request Body

FieldTypeRequiredDescription
agentIdstringRequiredUnique agent identifier (max 255 chars)
memoryTypestringRequiredepisodic, semantic, procedural, or working
dataobjectRequiredJSON object containing context data
metadataobjectOptionalversion, tags, expiresAt

Memory Types

TypeDescription
episodicConversation history, decision logs, action history
semanticDomain knowledge, user preferences, embeddings
proceduralSystem prompts, tool definitions, skills
workingCurrent task state, variables, progress

Response

FieldTypeDescription
idstringUnique context identifier (UUID)
agentIdstringAgent identifier
memoryTypestringType of memory stored
blockchainStatusstringpending, submitted, confirmed, or failed
createdAtstringISO 8601 timestamp

Try It

Query Parameters

Application identifier for multi-tenant isolation

External user identifier for data isolation

Request Body

Unique identifier for the AI agent (max 255 chars)

One of: episodic, semantic, procedural, working

Flexible JSON object containing the context data

Optional metadata with version, tags, expiresAt