One shared, durable memory for all your AI coding agents โ MCP, local-first, zero-dependency.
Project description
๐ณ Yggdrasil
One shared, durable memory for all your AI coding agents.
Claude Code, Codex, and any MCP host remember your projects โ decisions, lessons, status โ across sessions, tools, and projects.
Quickstart ยท How it works ยท Commands ยท FAQ ยท Comparison
Every new chat, your AI forgets. You re-explain the project, the decisions, the gotchas โ every time, in every tool. Yggdrasil is a tiny always-on memory brain that any agent plugs into. Open a new session in any project, with any AI, and it already knows what you decided, what broke, and what's still open โ and it quietly learns from your work in the background.
$ cd ~/projects/checkout-api && claude # a brand-new session
๐ณ Yggdrasil (injected automatically at session start)
You are Yggdrasil โ your persistent assistant across tools and projects.
Open follow-ups & status:
โข [project_status] payments refactor: idempotency keys added; open: e2e tests
Durable memory for `checkout-api`:
โข [debugging_lesson] webhook 401 โ signing secret rotated; update env + redeploy
> "have I solved a flaky websocket reconnect anywhere before?"
๐ณ recall โ found in project `realtime-dash`:
refresh the token *before* opening the socket, then retry with capped backoff.
No "let me remind you what we did yesterday." It's just there.
โ Without Yggdrasil
- ๐ You re-explain project context to the AI in every new chat.
- ๐งฉ Lessons learned in one project never reach the next one.
- ๐ค Switch from Claude Code to Codex โ the new tool knows nothing.
- ๐๏ธ Hard-won debugging insights vanish when the session ends.
โ With Yggdrasil
- ๐ง Persistent memory โ decisions, lessons, and status survive across sessions.
- ๐ Any agent, one brain โ Claude Code, Codex, any MCP host share the same memory.
- ๐ Cross-project recall โ "this looks like what you did in project B โ reuse it?"
- ๐ฑ Self-learning โ a local model consolidates memory in the background (zero API tokens).
- ๐ชช A soul โ give it a name and personality; it shows up the same in every tool.
- ๐ 100% local & private โ your memory lives on your machine. No cloud, no account.
๐ Quickstart
Requirements: macOS, Python 3.10+ (or let
uv/npxfetch Python for you). Optional (for semantic search): Ollama.
Install with whatever you already use โ every channel installs the same engine:
| Tool | Command |
|---|---|
| uv (recommended) | uvx --from yggdrasil-memory ygg install |
| npm / npx | npx yggdrasil-memory install |
| pipx | pipx install yggdrasil-memory && ygg install |
| pip | pip install yggdrasil-memory && ygg install |
| Homebrew (macOS) | brew install VonderVuflya/tap/yggdrasil && ygg install |
| from source | uvx --from git+https://github.com/VonderVuflya/yggdrasil.git ygg install |
Registry channels go live as each is published (see RELEASING.md); the from source line works against this repo today.
npxanduvxcan fetch Python for you.
That's it. ygg install:
- ๐ detects your CPU/RAM/GPU and recommends models that fit your machine (or choose
nonefor a zero-config, lexical-only setup), - ๐ generates a private auth token (never hardcoded),
- ๐๏ธ installs an always-on background service (auto-starts at login, restarts on crash),
- ๐ค registers the memory tools with Claude Code and Codex,
- ๐ช (optional) enables a session-start hook that auto-injects your project memory.
Check the install any time with ygg doctor; upgrade later with ygg update.
Prefer to just try the engine first, without installing a service?
uvx --from git+https://github.com/VonderVuflya/yggdrasil.git ygg serve --reset --db /tmp/ygg.sqlite # runs on :42069
๐ง How it works
Yggdrasil is memory + tools โ the intelligence is your LLM. It just makes sure the right memory is in front of the right agent at the right moment.
Claude Code / Codex / any MCP host
โ (MCP tools: ygg_search, ygg_recall, ygg_remember โฆ )
โผ
โโโโโโโโโโโโโโโโโโโโโโโ SessionStart hook injects
โ Yggdrasil engine โโโโโโ identity + project memory + open follow-ups
โ (always-on daemon) โ
โ SQLite + FTS5 โ background local model (optional)
โ + optional vectors โโโโโโถ dedupes / links / consolidates memory
โโโโโโโโโโโโโโโโโโโโโโโ
โ materializes to
โผ
๐ Obsidian vault (human-readable, editable)
- Engine โ a stdlib-only HTTP server over SQLite + FTS5. Zero dependencies, ~21 MB RAM.
- Retrieval โ lexical by default; add a local embedding model for semantic + cross-lingual search.
- Governance โ duplicates / stale / conflicting memories are surfaced for review; changes are non-destructive (archive, never delete).
- Obsidian โ every memory is also a Markdown note you can read and edit.
โญ Features
- ๐ง Durable cross-session memory for any MCP-compatible agent.
- ๐ Cross-project recall + a proactive "you solved this before" contract.
- ๐ Hybrid retrieval โ BM25 + optional dense embeddings, fused; cross-lingual (e.g. ENโRU).
- ๐ชช Identity / persona injected every session (the "Jarvis feel").
- ๐ Status & follow-ups surfaced at session start โ "what's the status of X?" answers instantly.
- ๐ฑ Background self-learning โ a small local model consolidates memory (propose-safe by default).
- ๐งน Governance loop โ review queue + non-destructive archive/merge.
- ๐ Obsidian materialization โ readable, editable, portable.
- ๐ Local-first & private โ no cloud, no account, your data stays put.
- ๐ชถ Zero hard dependencies โ pure Python stdlib; optional local models via Ollama.
๐ ๏ธ Commands
Memory ops โ ygg <command> (agent-facing)
| Command | What it does |
|---|---|
health |
Check the engine is alive |
bootstrap --project P |
Pull a project's memory before starting work |
search --project P --query "โฆ" |
Project-scoped search (--type, --limit, --json) |
recall --query "โฆ" |
Cross-project search โ "have I done this anywhere?" |
remember --project P --type debugging_lesson --content "โฆ" |
Save a durable memory (secret-guarded, deduped) |
materialize --id ID --project P |
Export one memory to an Obsidian note |
Service & setup โ ygg <command> (lifecycle)
| Command | What it does |
|---|---|
install |
Guided wizard โ background service + MCP registration |
recommend |
Show the hardware-aware model catalog |
status ยท start ยท stop ยท restart ยท logs |
Manage the always-on daemon |
hooks ยท unhooks |
Enable/disable the SessionStart auto-bootstrap hook |
consolidate ยท unconsolidate |
Schedule/remove background memory consolidation |
token ยท uninstall |
Print the auth token ยท remove service + registration |
MCP tools (what agents see): ygg_health, ygg_bootstrap, ygg_search, ygg_recall, ygg_remember, ygg_materialize.
๐ Use it with your agent
- Claude Code โ after
ygg install, the tools are registered (/mcpshowsyggdrasil) and the SessionStart hook auto-injects memory. Just open a project and work. - Codex โ registered too; approve the
ygg_*tool call once per session. - Any MCP host โ point it at
ygg mcp(stdio) withYGG_ENGINE_URL+YGG_ENGINE_TOKEN.
Give it a personality โ edit ~/.yggdrasil/identity.json:
{ "name": "Jarvis", "persona": "concise, proactive, dry wit", "user_facts": ["prefers TypeScript", "ships small PRs"] }
๐ Footprint & quality
Footprint (measured, 13 memories): ~21 MB RAM, ~0% idle CPU, zero dependencies (Python 3.10+ stdlib). Disk โ tens of KB per memory. Dense search is optional and adds a local Ollama model (e.g. all-minilm, 45 MB).
Retrieval quality (eval/ygg_eval.py, recall@1):
| Mode | recall@1 | paraphrase | crosslingual (ENโRU) |
|---|---|---|---|
| lexical (default) | 0.77 | 0.63 | 0.00 |
dense ยท all-minilm (45 MB, EN) |
0.83 | 0.88 | 0.00 |
dense ยท paraphrase-multilingual (~560 MB) |
0.94 | 0.88 | 0.80 |
keyword and identifier queries are 1.0 in every mode; with the multilingual model recall@3 = 1.0 (every target in the top 3). 35 labelled cases across a dev/holdout split. Run it yourself: python3 eval/ygg_eval.py.
โ FAQ
Does it send my code or memory to the cloud?
No. The engine, the database, and the optional models all run locally. No account, no telemetry. Your memory never leaves your machine.
How is this different from Context7 / RAG over docs?
Context7 fetches up-to-date public library docs (the latest React/Next.js API). Yggdrasil remembers your own work โ your decisions, lessons, and project status. They're complementary; run both. See comparison.
Does it automatically remember everything?
No โ by design. Retrieval is automatic; writing is deliberate (the agent calls ygg_remember for durable lessons). Auto-capturing everything pollutes memory, so we don't. A background model consolidates what's already saved (propose-only by default).
Do I need a GPU or an API key?
No. The default is pure lexical search โ zero dependencies, instant. Semantic search is opt-in and uses a local model via Ollama (no API key). The installer recommends a model that fits your hardware.
How many tokens does it cost my agent?
Very few. Session start injects ~300 tokens of memory; each tool call returns a small snippet. All the heavy work (indexing, embeddings, consolidation) runs off-LLM on your machine.
Can I edit or delete memories by hand?
Yes. Memories materialize to Markdown notes in an Obsidian vault โ read, edit, or remove them like any file. The engine never hard-deletes; it archives (reversible).
Is it production-ready?
It's an honest alpha: the happy path and the full governance loop are covered by passing gates (scripts/run_gates.sh). Not yet hardened for multi-user/production.
๐ Yggdrasil vs alternatives
Most "AI memory/context" tools own a different layer of the stack. The one nobody filled โ durable, cross-session, cross-agent memory of your own work โ is exactly where Yggdrasil sits. It doesn't compete with these; it's the memory they all plug into.
| Tool | The layer it owns | Overlap with Yggdrasil | Better together |
|---|---|---|---|
| Context7 | fresh public library docs (read-only) | none | Context7 gives a library's current API; Yggdrasil recalls your decisions & lessons |
| autoresearch | autonomous experiment loop (edit โ train โ measure โ keep/revert) | none โ it's the loop, not memory | Yggdrasil is the long-term memory the loop lacks: recall what you already tried, remember each result across nights & forks โ integration |
| context-mode & in-context compressors | in-session context compaction / sandboxed analysis | none โ per session | Yggdrasil persists the conclusions across sessions, tools & machines |
| plain LLM memory | per-session scratch | partial | Yggdrasil is durable, cross-project, governed & local |
Capability matrix:
| Yggdrasil | Context7 | Plain LLM memory | |
|---|---|---|---|
| Knows your decisions/lessons | โ | โ | โ ๏ธ within one session |
| Up-to-date public library docs | โ (use Context7) | โ | โ |
| Cross-session & cross-agent | โ | โ | โ |
| Cross-project recall | โ | โ | โ |
| Writes/accumulates your memory | โ | โ (read-only) | โ ๏ธ |
| Local & private | โ | โ๏ธ hosted | depends |
| Self-consolidating | โ | โ | โ |
TL;DR: these tools fetch docs, run experiments, or compress one session. Yggdrasil is the durable memory of your own work that they were all missing โ use it with them and you only win.
๐บ๏ธ Roadmap
- ๐ Relation graph (
SOLVES/SUPERSEDES/CONTRADICTS) for richer reasoning. - ๐ฐ๏ธ Multi-device sync โ continue literally from any machine.
- ๐งช Stronger optional models for safe autonomous consolidation.
- ๐ง Linux/Windows service installers (currently macOS launchd).
๐ค Contributing
Issues and PRs welcome. Run scripts/run_gates.sh and python3 -m unittest discover -s tests before submitting โ all gates must stay green.
๐ License
Elastic License 2.0 โ see LICENSE. You may freely use, modify, self-host, and redistribute Yggdrasil. You may not sell it as a product or offer it to others as a hosted/managed service. It is source-available โ not OSI open source.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yggdrasil_memory-0.3.0.tar.gz.
File metadata
- Download URL: yggdrasil_memory-0.3.0.tar.gz
- Upload date:
- Size: 79.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9eb527b0bb1f669355822408c2051611c2c996db95c1840643e8259983a7151a
|
|
| MD5 |
f89c60f184afaad64d9bf20827b44410
|
|
| BLAKE2b-256 |
d0f382e9ed8db1c60f5a7866e95a3ea224f405a7fb840cb428469f2732099459
|
File details
Details for the file yggdrasil_memory-0.3.0-py3-none-any.whl.
File metadata
- Download URL: yggdrasil_memory-0.3.0-py3-none-any.whl
- Upload date:
- Size: 79.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24faf9b0b474cbec2b6f4bdbc021eafcda243051bd0d41b42ec6e6affb90c80a
|
|
| MD5 |
2d6af2ccce0a6c83d0adc1c657de6bc3
|
|
| BLAKE2b-256 |
3aecea40b99960fd1bb16c088c86680c7db5e8aac3b3c4e4ef23a0ecf7227dd2
|