Store Memory
store_memoryStore memory in one of two modes — single-memory (set top-level content) or batch (set memories: [...] for up to 500).
Instructions
Store memory in one of two modes — single-memory (set top-level content) or batch (set memories: [...] for up to 500).
Mode 1 — Single (default): pass top-level content plus any optional fields (tags, importance, metadata, type, confidence, embedding, t_valid, t_invalid, etc.).
Mode 1b — Supersede/correct: pass top-level content plus supersedes_memory_id. The server stores the replacement, marks the old memory invalid with t_invalid=now, merges supersede metadata, and associates old → new with INVALIDATED_BY (default) or EVOLVED_INTO.
Mode 2 — Batch: pass memories: [{ content, tags?, importance?, metadata?, timestamp?, type?, confidence? }, ...] to store up to 500 memories in one request. Faster for bulk ingestion (imports, benchmark seeding). Batch mode does NOT accept embedding, t_valid, or t_invalid per-item — use single mode for those.
Content size guidelines (per item):
Target: 150-300 characters (one meaningful paragraph)
Maximum: 500 characters (auto-summarized if exceeded)
Hard limit: 2000 characters (rejected)
Format: "Brief title. Context and details. Impact/outcome."
When to use:
After making a decision: store the reasoning and outcome
When discovering a pattern: store the pattern and where it applies
After fixing a bug: store the root cause and solution
When learning user preferences: store what they prefer and why
For bulk ingestion (imports, seeding): use batch mode
Examples:
store_memory({ content: "Chose PostgreSQL over MongoDB for user service. Need ACID for transactions.", tags: ["architecture", "database"], importance: 0.9 })
store_memory({ content: "User prefers early returns over nested conditionals.", tags: ["code-style"], importance: 0.7 })
store_memory({ content: "User now prefers SQLite for small local tools.", supersedes_memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", supersede_reason: "Correction from user" })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Single-memory mode. Tags to categorize the memory (e.g., ["project-name", "bug-fix", "auth"]) | |
| type | No | Single-memory mode. Memory type for classification | |
| content | No | Single-memory mode (XOR with `memories`). The memory content to store. Be specific: include context, reasoning, and outcome. | |
| t_valid | No | Single-memory mode only. ISO 8601 timestamp when the memory becomes valid. Not supported in batch mode. | |
| memories | No | Batch mode (XOR with `content`). Up to 500 memory objects to store in one call. Each item supports content (required), tags, importance, timestamp, type, confidence, metadata. Batch mode does NOT support `embedding`, `t_valid`, or `t_invalid` per-item — use single-memory mode for those. | |
| metadata | No | Single-memory mode. Optional structured metadata (e.g., { files_modified: ["auth.ts"], error_type: "timeout" }) | |
| embedding | No | Single-memory mode only. Optional embedding vector for semantic search (auto-generated if omitted). Not supported in batch mode. | |
| t_invalid | No | Single-memory mode only. ISO 8601 timestamp when the memory expires. Not supported in batch mode. | |
| timestamp | No | Single-memory mode. Optional ISO timestamp (defaults to now) | |
| confidence | No | Single-memory mode. Classification confidence (0-1, default 0.9 when type provided) | |
| importance | No | Single-memory mode. Importance: 0.9+ critical decisions, 0.7-0.9 patterns/bugs, 0.5-0.7 minor notes | |
| updated_at | No | Single-memory mode. ISO 8601 last-updated timestamp | |
| last_accessed | No | Single-memory mode. ISO 8601 last-accessed timestamp | |
| supersede_reason | No | Single-memory supersede mode. Optional reason stored on the old memory's metadata. | |
| supersede_relation | No | Single-memory supersede mode. Relationship to create from old memory to new memory. | INVALIDATED_BY |
| supersedes_memory_id | No | Single-memory supersede mode. Existing memory ID that this new memory replaces or corrects. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qdrant | No | Batch-mode result: Qdrant indexing summary from the server. | |
| stored | No | Batch-mode result: number of memories stored. | |
| message | Yes | Confirmation message | |
| memory_id | No | Single-mode result: unique ID of the stored memory (use for associations) | |
| enrichment | No | Batch-mode result: enrichment status from the server. | |
| memory_ids | No | Batch-mode result: IDs of the stored memories. | |
| query_time_ms | No | Batch-mode result: server-reported execution time in milliseconds. | |
| association_created | No | Supersede-mode result: whether old → new association was created. | |
| superseded_memory_id | No | Supersede-mode result: ID of the old memory marked invalid. |