matrixorigin/memoria

Secure memory management for AI Agents • Ensures data integrity • Reduces hallucinations • Maintains consistent long-term context

What is Memoria?

Memoria is a persistent memory layer for AI agents that brings Git‑style version control to an agent’s internal knowledge. Every change to an agent’s “memory” (facts, preferences, procedural steps, etc.) is stored as a snapshot, can be branched, merged, or rolled back, and is searchable with a hybrid vector‑plus‑full‑text engine. The system is built on MatrixOne’s copy‑on‑write database, giving it zero‑copy branching and immutable storage.


Core Capabilities

Capability How Memoria Provides It
Git‑level versioning Instant snapshots, branches, merges and point‑in‑time rollback for any memory mutation.
Semantic retrieval Hybrid vector + full‑text search lets agents find memories by meaning, not just keywords.
Self‑governance Automatic detection of contradictory or low‑confidence memories, quarantine, and audit trails.
Privacy Option to run a local embedding model so no data leaves the machine.
Cross‑conversation persistence Memories (facts, preferences, goals) survive across separate sessions.
Full audit trail Every mutation records provenance and can be inspected later.

Who Can Use It?

Memoria works with any MCP‑compatible AI agent. The README lists ready‑made integrations for:

  • Kiro
  • Cursor
  • Claude Code
  • OpenAI Codex
  • Gemini CLI
  • OpenClaw (via a plugin)

You can also call its REST API directly from custom agents.


Getting Started

  1. Cloud (recommended) – Sign up at thememoria.ai, install the CLI, run memoria init -i in Remote mode and provide the token.
  2. Self‑hosted – Use the provided Docker Compose to start a MatrixOne instance and the Memoria API, then run the CLI in Embedded mode.
  3. OpenClaw plugin – Install the plugin and configure it with your cloud or self‑hosted endpoint.

Binaries are also available on the GitHub releases page.


How an Agent Uses It

Memoria exposes a set of MCP tools that an agent can invoke, for example:

  • memory_store – add a new fact or piece of context.
  • memory_retrieve / memory_search – fetch relevant memories at conversation start or on‑demand.
  • memory_branch, memory_checkout, memory_merge – experiment on a separate branch and later merge good results.
  • memory_snapshot, memory_rollback – create a named checkpoint and revert to it if needed.
  • Governance tools (memory_governance, memory_consolidate) automatically clean up contradictions.

Steering rules (e.g., memory, session‑lifecycle, memory‑hygiene) tell the agent when to call these tools.


Architecture at a Glance

  • Remote mode – The agent talks to the Memoria CLI (MCP bridge) which forwards requests over HTTP to the Memoria Cloud service.
  • Embedded mode – The CLI runs a local MCP server that talks directly to a MatrixOne database, handling vector storage, full‑text indexing, and the Git‑for‑Data layer.

Who Might Want It?

  • Developers building autonomous agents that need reliable, auditable state across many interactions.
  • RAG pipelines where the retrieved context should be versioned and reversible.
  • Researchers exploring self‑governing memory systems or data‑centric AI.
  • Enterprises that require strict audit trails and the ability to roll back erroneous updates to an agent’s knowledge base.

License & Community

Memoria is released under the Apache‑2.0 license. The project is open‑source, provides a CI pipeline, and welcomes contributions via the usual GitHub workflow.


TL;DR – Memoria is a Git‑style, version‑controlled memory store for AI agents, offering snapshots, branching, semantic search, and automatic consistency checks, usable via cloud or self‑hosted deployments.

Related

  • Project
  • Project
  • Dispatch
  • Project
  • Project