Extract Facts
API Reference
Extract Facts
POST /v1/memories/extract — Extract and store facts from conversation via LLM.
POST
Extract Facts
This endpoint requires an x402 payment header.
Request Body
array
required
Array of conversation messages. Each message must have
role (string) and content (string). Max 100 messages, 32,768 characters per message.string
Namespace for extracted memories. Default:
"default".string
Associate extracted memories with a session.
string
Associate extracted memories with an agent.
Response (201 Created)
string[]
UUIDs of the stored memories (includes both new and deduplicated).
number
Total facts identified by the LLM.
number
New facts stored (not duplicates).
number
Facts that matched existing memories (skipped).
number
Total tokens consumed (LLM + embeddings).
Example
Response
The LLM automatically assigns importance and memory type based on the content. Corrections and preferences get higher importance; observations get lower. Each fact is deduplicated against existing memories.