Mori (森)
Mori is a self-hosted, agent-neutral shared-memory layer for AI coding agents. It provides provenance-scoped memory so that decisions and patterns curated by humans are surfaced to agents only where they apply, preventing cross-contamination across repos and sessions. It is for teams and individuals running multiple AI coding agents who need consistent, governed institutional memory.
✨ Key features
- Provenance-scoped memory prevents cross-repo contamination.
- Dream pipeline auto-distills session events into structured memories.
- Session grounding loads shared context at session start.
- Memory search with ranked full-text search (SQLite FTS5/Postgres).
- Web dashboard for browsing and searching memories.
- Governance with capability-scoped keys, versioning, and audit logs.
🎯 Use cases
- Give coding agents shared context across multiple repos.
- Preserve decisions and patterns across sessions and devices.
- Prevent agents from using APIs that don't exist in the current repo.
- Coordinate multiple agent instances working on different layers.
- Curate and review agent-generated memories before they become canonical.
📦 Installation
🧰 Requirements: Requires a server deployment (cloud or local) with SQLite or Postgres, and an LLM provider API key for the dream pipeline.
Deploy your server
macOS (Homebrew):
brew tap fjwood69/mori
brew install mori
mori-setup # wizard: API key, LLM provider, start service
Or run locally with Docker Compose:
git clone https://github.com/fjwood69/mori.git
cd mori
cp deploy/homelab/.env.example deploy/homelab/.envdocker compose -f deploy/homelab/docker-compose.yml up -dConnect your agent
Claude Code — install as a plugin (recommended). Inside Claude Code, run:
/plugin marketplace add fjwood69/mori
/plugin install mori@mori
You'll be prompted for your Mori server URL and API key on enable. Then /reload-plugins or restart.
🚀 Usage
Verify
curl http://localhost:8968/health
# {"status":"ok","service":"mori-advisor"}
Use in a session
After installing the plugin, start a session and run:
/brief
This loads shared context at session start. To search memories:
/pensieve <query>
⚠️ Good to know
Mori provides visibility and awareness, not enforcement; it cannot control what an agent does, and the governed playbooks feature is built and benchmarked but not yet a shipped product surface.
❓ FAQ
How does Mori prevent cross-contamination between repos?
Mori uses provenance scoping (MORI_BRIEF_SCOPE, on by default) to only surface memories that are valid for the current repo, preventing agents from chasing phantom APIs from other repos.
Can Mori enforce that an agent follows a decision?
No, Mori provides shared context and awareness but cannot enforce agent behavior. Enforcement is a separate problem addressed by future governed playbooks.
What LLM providers are supported?
The README mentions Novita, DeepInfra, and OpenAI as examples, but any OpenAI-compatible endpoint can be used by setting MORI_BASE_URL.
Is Mori self-hosted?
Yes, every Mori instance is deployed into your own account, either on cloud platforms like Railway, Render, or Cloud Run, or locally with Docker Compose.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.