Memory Extraction
Automatically extract memories from conversations and documents.
Overview
The extraction endpoint creates and stores memories from the content you provide:
Content → Extracted memories → Stored memories
Basic Extraction
curl -X POST https://api.memory.tensorheart.com/v1/query/extract \
-H "Authorization: Bearer $API_KEY" \
-d '{
"content": "User: Hi, I am Sarah and I work at Netflix as a product manager.",
"content_type": "conversation"
}'
Extracted memories:
- "User's name is Sarah"
- "User works at Netflix"
- "User is a product manager"
Content Types
| Type | Best For |
|---|---|
conversation | Chat logs, transcripts |
document | Articles, reports |
notes | Meeting notes, summaries |
Adding Metadata
Tag extracted memories with source information:
{
"content": "...",
"metadata": {
"source": "onboarding_call",
"date": "2024-01-15",
"session_id": "abc123"
}
}
Best Practices
- Clean input - Remove irrelevant content before extraction
- Use metadata - Track where memories came from
- Batch wisely - Extract from complete conversations, not fragments
- Review results - Periodically audit extracted memories