Retain memories
Changed onRetain 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).
Request
- Base URLhttps://hindsight.vectorize.io (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Headers
Request body
Example request
{
"async": false,
"items": [
{
"content": "Alice works at Google",
"context": "work",
"document_id": "conversation_123"
},
{
"content": "Bob went hiking yesterday",
"document_id": "conversation_123",
"timestamp": "2024-01-15T10:00:00Z"
}
]
}Response
Successful Response
Example response
{
"async": false,
"bank_id": "user123",
"items_count": 2,
"success": true,
"usage": {
"input_tokens": 500,
"output_tokens": 100,
"total_tokens": 600
}
}Changes
- warning
removed the optional property
//from the response with the status - info
added the new optional request property
// - info
added the new optional request property
- info
added the new
sharedenum value to the request property/// - info
request property
//list-of-types was widened by adding typesarrayto media typeapplication/json - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- warning
- info
added the new optional request property
// - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info