Retain memories
POST/v1/default/banks/:bank_id/memories
Retain memory items with automatic fact extraction.
This is the main endpoint for storing memories. It supports both synchronous and asynchronous processing via the async parameter.
Features:
- Efficient batch processing
- Automatic fact extraction from natural language
- Entity recognition and linking
- Document tracking with automatic upsert (when document_id is provided)
- Temporal and semantic linking
- Optional asynchronous processing
The system automatically:
- Extracts semantic facts from the content
- Generates embeddings
- Deduplicates similar facts
- Creates temporal, semantic, and entity links
- Tracks document metadata
When async=true: Returns immediately after queuing. Use the operations endpoint to monitor progress.
When async=false (default): Waits for processing to complete.
Note: If a memory item has a document_id that already exists, the old document and its memory units will be deleted before creating new ones (upsert behavior).
Authentication required — include an
Authorization: Bearer hsk_...header. See Authentication for details.
Request
Responses
- 200
- 422
Successful Response
Validation Error