Overview
Add episodes to the knowledge graph for automatic knowledge extraction. Supports three types of episodes:- Messages: Conversational episodes with role information
- JSON Data: Structured JSON data episodes
- Text Data: Plain text episodes
Only one episode type can be provided per request. Processing is asynchronous and takes 1-5 minutes.
Authentication
Your API key for authentication
Request Body
User identifier (group ID) for the episodes
Message episodes to add (conversational data)
JSON episodes to add (structured data)
Text episodes to add (unstructured text)
Response
Confirmation message indicating episodes were queued
Always
true for successful requestsExample Requests
Example Response
Status Code:
202 Accepted - Episodes are queued for async processing (1-5 minutes)Error Responses
Request validation failed
Best Practices
Always use source_description - Group related episodes together for easy batch cleanup when users delete conversations
Include timestamps - The knowledge graph uses these for temporal fact tracking
One episode type per request - Don’t mix messages, json_data, and text_data in the same request
Wait for processing - Knowledge extraction takes 1-5 minutes. You can continue adding episodes while previous ones process.
For JSON data, use meaningful keys (e.g.,
"height_ft": 144 not "h": 144) to improve entity extraction quality.