Local-first persistent memory for AI coding agents. MCP server + HTTP API with SQLite backend, hybrid FTS5 + local embeddings for semantic search.
Cortex Memory demonstrates strong naming conventions (verb_noun pattern: memoria_save, memoria_search, memoria_recall) and comprehensive parameter schemas with type definitions and constraints. All 21 tools have descriptions and input schemas visible in source. However, descriptions vary in quality, some are excellent (memoria_save: 180 chars with clear guidance), others are terse (memoria_get: 28 chars). Output schemas are not documented in the tool definitions; responses are inferred from implementation. Error handling guidance is minimal, tools lack recovery hints for common failure modes. Security considerations around data deletion are present (dry_run defaults) but not consistently applied across destructive operations.
Get full context for a project. Pass start_session=true + goal to also open a session in the same call (recommended at conversation start to save a round-trip).
Delete a memory (soft delete by default)
Close the outcome loop: report whether a memory surfaced by memoria_recall/memoria_hint actually helped, was stale, or misled you. Adjusts the memory's trust_score so good memories rise and bad ones sink in future ranking. Pass the recall_id you received from recall/hint, OR a specific memory_id. One of recall_id or memory_id is required.
Memory hygiene. dry_run=true (default) lists memories at or below threshold relevance. dry_run=false runs decay pass and soft-deletes floor memories older than delete_after_days.
Fetch a single memory by ID
Get a graph representation of memory relationships
Output schemas not documented. Tool definitions lack return type documentation, forcing LLMs to infer response structure. This violates pattern:tool and increases hallucination risk when chaining tools.
Terse descriptions on discovery/utility tools. memoria_get (28 chars), memoria_stats (40 chars), memoria_projects (40 chars) lack context for LLM selection. Descriptions should be 50-200 chars explaining WHAT, WHEN, and WHY.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | <=2025-11-25 | v2 |
PROACTIVE retrieval. Pass the upcoming tool-call args / user prompt / file path being touched as `context`; returns up to 3 short hints (title + snippet + learned) to inject into the agent prompt BEFORE acting. Use this in pre-tool-call hooks. Empty hints means "nothing relevant" — proceed without noise.
Get detailed information about a project
List all projects in the workspace
Have I seen this before? Search bug_fix/discovery/lesson memories matching a symptom (error text, exception, behavior). Returns resolutions and related fixes from same session.
List recent memories
Mark a pending reflection as completed and link it to the newly-saved meta-memory. Call this RIGHT AFTER memoria_save returns the new lesson id.
Mark a pending reflection as dismissed when the cluster does not actually share a useful pattern. Stops it from re-surfacing.
List pending reflection clusters detected by the background clustering job. Each entry contains the SOURCE memories so the agent's LLM can synthesize a meta-lesson and call memoria_save + memoria_reflection_complete. Cortex never calls an LLM itself; reflection synthesis lives in the client agent.
Save a structured memory. Call this AUTOMATICALLY after: bug fixes, architecture decisions, non-obvious discoveries, config changes, established patterns, or learned user preferences. Do NOT wait to be asked.
Search memories. Hybrid (FTS5 + vector KNN + RRF) is the default when the server has MEMORIA_SEMANTIC_SEARCH on — finds memories by meaning, not just keywords. Pass semantic:false to force FTS-only.
End the current session.
Start a new coding session.
Get workspace statistics
Get a timeline of memories for a project
Update an existing memory
No error recovery guidance. Tools lack descriptions of failure modes and recovery steps. E.g., memoria_search should document: 'If no results, try broader query or check project name.' Pattern: recovery-guide.
Destructive operations lack confirmation pattern. memoria_delete and memoria_forget (dry_run=true default) should explicitly document the confirmation-request pattern to prevent accidental data loss.
Parameter relationships undocumented. memoria_feedback requires ONE of recall_id or memory_id, but descriptions don't state this mutual exclusivity. LLMs may pass both or neither, causing silent failures.