Endpoint
Request body
The memory content to store. Can be free-form text.
Memory category. One of:
preferences, decisions, patterns, context, learnings, general, gate-rules, guidelinesFunctional categories (gate-rules, guidelines, preferences, category-summary) bypass normalization.Memory scope. Values:
personal- Only visible to youshared- Visible to your entire team
Optional source reference for project-scoped recall. Format:
project:org/repoMemories with a source_ref get a 1.3x boost when searching from the same project.Optional tags for organization and filtering. Examples:
["api", "authentication"]Optional ISO 8601 timestamp for historical imports. Format:
2023-04-10T17:50:00ZUse this when importing memories with specific event dates (e.g., eval benchmarks).Response
Whether the operation succeeded
Result details from the memory storage operation
Example
Project-scoped memories
Usesource_ref to associate memories with specific projects:
Batch adding
For bulk ingestion, use the batch add endpoint instead, which offers:- Single HTTP request for multiple memories
- Batched embedding generation (100 texts per API call)
- Single database transaction
- Optimized for eval benchmarks and large imports
Error responses
Error message if the request fails
400- Bad request (missing content, invalid timestamp format)401- Unauthorized (invalid or missing API key)500- Internal server error
Implementation reference
Seesrc/cems/api/handlers/memory.py:45-107 for the complete implementation.