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-contextsAuthentication
Required. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| appId | string | Required | Application identifier |
| externalUserId | string | Required | External user identifier |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| agentId | string | Required | Unique agent identifier (max 255 chars) |
| memoryType | string | Required | episodic, semantic, procedural, or working |
| data | object | Required | JSON object containing context data |
| metadata | object | Optional | version, tags, expiresAt |
Memory Types
| Type | Description |
|---|---|
| episodic | Conversation history, decision logs, action history |
| semantic | Domain knowledge, user preferences, embeddings |
| procedural | System prompts, tool definitions, skills |
| working | Current task state, variables, progress |
Response
| Field | Type | Description |
|---|---|---|
| id | string | Unique context identifier (UUID) |
| agentId | string | Agent identifier |
| memoryType | string | Type of memory stored |
| blockchainStatus | string | pending, submitted, confirmed, or failed |
| createdAt | string | ISO 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