Skip to main content
POST
Extract Facts
This endpoint requires an x402 payment header.
Price: $0.01 USDC (includes LLM processing) Extract automatically identifies and stores important facts from a conversation. The LLM parses the messages and creates individual memories for each distinct fact, with automatic deduplication.

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.