Skip to main content

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.

Elastic License 2.0 Python 3.10+ zero deps MCP local-first alpha

Quickstart ยท How it works ยท Commands ยท FAQ ยท Comparison

English ะ ัƒััะบะธะน ็ฎ€ไฝ“ไธญๆ–‡ Espaรฑol Franรงais


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/npx fetch 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. npx and uvx can fetch Python for you.

That's it. ygg install:

  1. ๐Ÿ” detects your CPU/RAM/GPU and recommends models that fit your machine (or choose none for a zero-config, lexical-only setup),
  2. ๐Ÿ”‘ generates a private auth token (never hardcoded),
  3. ๐Ÿ›Ž๏ธ installs an always-on background service (auto-starts at login, restarts on crash),
  4. ๐Ÿค registers the memory tools with Claude Code and Codex,
  5. ๐Ÿช (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 (/mcp shows yggdrasil) 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) with YGG_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

yggdrasil_memory-0.3.0.tar.gz (79.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yggdrasil_memory-0.3.0-py3-none-any.whl (79.9 kB view details)

Uploaded Python 3

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

Hashes for yggdrasil_memory-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9eb527b0bb1f669355822408c2051611c2c996db95c1840643e8259983a7151a
MD5 f89c60f184afaad64d9bf20827b44410
BLAKE2b-256 d0f382e9ed8db1c60f5a7866e95a3ea224f405a7fb840cb428469f2732099459

See more details on using hashes here.

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

Hashes for yggdrasil_memory-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24faf9b0b474cbec2b6f4bdbc021eafcda243051bd0d41b42ec6e6affb90c80a
MD5 2d6af2ccce0a6c83d0adc1c657de6bc3
BLAKE2b-256 3aecea40b99960fd1bb16c088c86680c7db5e8aac3b3c4e4ef23a0ecf7227dd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page