Skip to main content

agent-mem-vault: memory your coding agents share, and you can read, link and fix in Obsidian

ci PyPI python license wiki

Memory your coding agents share, and you can read, link and fix in Obsidian.

agent-mem-vault is an MCP server that turns an Obsidian vault into the long-term memory of your coding agents. Claude Code, Codex and any other MCP client record decisions, risks and project snapshots as notes in the vault, and keep two short cards per project: what the last session did, and which work threads are open. They read them back in the next session, in the next tool, on the next day. You see the same memory in Obsidian, and you can correct it there.

flowchart LR
    CC["Claude Code"] <-->|"MCP, stdio"| S["agent-mem-vault<br/>MCP server"]
    CX["Codex"] <-->|"MCP, stdio"| S
    AN["Any MCP client"] <-->|"MCP, stdio"| S
    S <-->|"read, atomic write"| V[("Obsidian vault<br/>one Markdown note per record")]
    V --- O["Obsidian<br/>graph, backlinks, Bases dashboard"]
    V -.->|"optional autocommit"| G["git history"]
    Y(("You")) -->|"read and edit notes"| O

Try it in 60 seconds

The repository ships a demo vault with synthetic records for two fictional projects: decisions with a supersedes chain, a rejected idea, open risks, snapshots, companion cards with open threads, hub notes and the dashboard. You need uv and, to see the graph, Obsidian.

git clone https://github.com/kursatdinc/agent-mem-vault && cd agent-mem-vault
export AGENT_MEM_VAULT_VAULT="$PWD/examples/demo-vault"

uv run agent-mem-vault doctor                                    # 10 records, 0 issues
uv run agent-mem-vault list --namespace project/harbor-api --kind decision
uv run agent-mem-vault search "backfill" --namespace project/harbor-api

Then in Obsidian choose Open folder as vault and pick examples/demo-vault. Open the graph view to see the decision chain, _dashboards/memory.base for the active decisions and risks, and project-harbor-api/_companion/ for the open threads. Edit a note, run doctor again, and the change is picked up.

Install

You need uv and an Obsidian vault (create one in Obsidian, for example ~/agent-memory; running git init inside it is optional).

Claude Code:

claude mcp add agent-mem-vault -s user \
  --env AGENT_MEM_VAULT_VAULT="$HOME/agent-memory" \
  -- uvx agent-mem-vault

Codex (~/.codex/config.toml):

[mcp_servers.agent-mem-vault]
command = "uvx"
args = ["agent-mem-vault"]
env = { AGENT_MEM_VAULT_VAULT = "/Users/you/agent-memory" }

Check the setup:

AGENT_MEM_VAULT_VAULT="$HOME/agent-memory" uvx agent-mem-vault doctor

To run the development version straight from GitHub, replace uvx agent-mem-vault with uvx --from git+https://github.com/kursatdinc/agent-mem-vault agent-mem-vault.

Then ask your agent to "record this decision", "what did the last session leave open?" or "what are the open risks in this project?". It uses the tools below. More snippets are in examples/.

Why

  • Agents forget. Every new session starts cold, and the reasoning behind yesterday's choice is gone.
  • Agents don't talk to each other. What Claude Code decided is invisible to Codex, and the other way round.
  • Agent memory is a black box. It hides in JSON files or databases you can't read, review or fix. A wrong "memory" quietly steers every later session.

What you get

One memory for all your agents.

  • Claude Code and Codex read and write the same records.
  • Every session starts from the same brief: the last-session card, the open threads, the latest snapshot and what was decided since.
  • Open work is one line per thread (- <branch or topic>: <status>; next: <step>), removed when the thread is done, so the list stays short instead of growing into a pile.

Memory that stays current.

  • Decisions are accepted or superseded; risks are open, mitigated or resolved, with an optional review date.
  • Superseding a record closes it, and the brief says Consolidation due when the latest snapshot is more than a week old.

Memory you can see.

  • Every record is a note in your vault.
  • Obsidian's graph shows how decisions supersede each other and which records belong to which project.
  • A generated Bases dashboard lists the active decisions and risks.

Memory you can correct.

  • Edit a note in Obsidian and the next query sees it.
  • Mark a decision rejected, with a reason, and it stops steering agents but stays on record.
  • Mark a record private and it stays out of automatic context.

Typed, not a transcript dump. Records are decision, risk, snapshot, note, assumption and task, plus optional receipt. Agents can therefore ask precise questions: "open risks in this project", "what did we decide about caching", "what is still open".

Yours. Memory is plain Markdown in a folder you own. Put the vault in git and you get a full audit trail for free. Everything works offline, and Obsidian does not need to be open.

How it compares

agent-mem-vault Obsidian-plugin MCP servers (for example obsidian-local-rest-api) Embedding-based memory (for example mem0)
Where memory lives One Markdown note per record in your vault Your vault, served by a plugin Memory service built on an LLM and an embedding model
Obsidian has to be running No Yes: the server runs inside Obsidian Not applicable
Needs an LLM or embedding API key No No Yes, per its README (OpenAI models by default)
Readable and editable as notes, with graph and backlinks Yes, in Obsidian Yes Not stored as notes
Memory-specific schema: kinds, supersedes, decision and risk lifecycle Yes No: general vault access Memories
Hand edits are protected by revision checks Yes Not applicable Not applicable

Notes: the other columns summarize each project's public README; check their docs for current behavior. The Obsidian-plugin servers offer broader vault access (live metadata, the active file, the command palette) than this project, which is narrowly a memory store. Embedding services find related memories by meaning, while this project matches stemmed keywords in titles, content and tags.

Tools

Group Tools
Write save_memory, save_context, create_snapshot, update_memory
Read get_project_brief, search_memory, list_contexts, read_latest_context, get_links
Companion (on by default) get_companion, update_companion
Health list_issues
Optional write_receipt (receipts)
  • Records are grouped by namespace. Without one, a call uses project/<git root name> of the directory the server runs in.
  • Every listing line ends with id <8 characters>, and every id parameter takes that prefix.
  • Free-text search is stemmed, so "caching" finds "cache" and "cached".
  • Memory content is written in English.

Every parameter is documented in the tools reference.

How it looks

agent-memory/                         # your Obsidian vault
├── project-harbor-api/
│   ├── project-harbor-api.md         # generated hub: every record of the project
│   ├── _companion/last-session.md    # what the last session did, what is unverified, next step
│   ├── _companion/threads.md         # one line per open work thread
│   ├── decision/2026-03-06-move-order-storage-to-postgresql-234bc139.md
│   └── risk/2026-03-08-migration-script-locks-the-orders-table-728f9c30.md
├── project-lantern-mobile/
│   └── ...
└── _dashboards/memory.base           # active decisions and risks, all records
---
id: 234bc139-823f-5c1c-b7bb-d37ea1c3ee3c
kind: decision
namespace: project/harbor-api
agent: claude-code
title: Move order storage to PostgreSQL
created: 2026-03-06T09:01:00Z
updated: 2026-03-08T09:02:00Z
revision: 2
visibility: internal
validity: valid
tags: [storage]
status: superseded
supersedes: ['[[project-harbor-api/decision/2026-03-02-use-sqlite-for-the-first-release-d61740a1]]']
superseded_by: '[[project-harbor-api/decision/2026-03-08-pin-postgresql-16-in-ci-and-production-eb0b3836]]'
agent-written: true
---
The pilot grew to three workers, which SQLite cannot serve safely. PostgreSQL gives concurrent writers and point-in-time recovery.

<!-- avm:related:start -->
## Related
- Supersedes [[project-harbor-api/decision/2026-03-02-use-sqlite-for-the-first-release-d61740a1|Use SQLite for the first release]]
- Superseded by [[project-harbor-api/decision/2026-03-08-pin-postgresql-16-in-ci-and-production-eb0b3836|Pin PostgreSQL 16 in CI and production]]
<!-- avm:related:end -->

Configuration

~/.config/agent-mem-vault/config.yaml. Every key is optional, and environment variables win. A copy with comments is in examples/config.yaml.

vault: ~/agent-memory              # or AGENT_MEM_VAULT_VAULT
default_namespace: default         # outside a git repo; or AGENT_MEM_VAULT_DEFAULT_NAMESPACE
redact_secrets: true               # or AGENT_MEM_VAULT_REDACT_SECRETS
features:
  visibility: true                 # private records stay out of automatic context
  receipts: false                  # immutable records of finished work, with file/commit refs
  companion: true                  # per-project "last session" and "open threads" cards
  hooks: false                     # session-start brief and stop nudge for Claude Code / Codex
  git_autocommit: false            # commit every change in the vault's git repo (never pushes)
companion:
  max_chars: 3000

With hooks on, agent-mem-vault hook print-config --client claude|codex prints the snippet to add to your client settings. The hook command must be on your PATH: run uv tool install agent-mem-vault once. The server never edits client settings itself.

Upgrading from 1.x

2.0 removes handoffs. Run agent-mem-vault migrate --dry-run, then agent-mem-vault migrate --apply to move the old handoff notes to <project>/_archive/handoffs/, and re-register the hooks with hook print-config. The full list of changes and steps is in the changelog.

Guarantees

  • No lost writes. Two agents writing at once are serialized by a file lock, and every file is replaced atomically.
  • No silent overwrites. Updates check the record's revision. A note you edited by hand is never overwritten; the agent gets a conflict and re-reads.
  • Broken notes are reported, not dropped. A note with invalid frontmatter shows up in list_issues and doctor, untouched.
  • Hands off your setup. It never writes .obsidian/, never launches Obsidian, never pushes git and makes no network calls.
  • Secrets stay out. Token, key and password patterns are redacted before anything is written.

Documentation

Development

uv sync
uv run ruff check
uv run pytest -q

Requires Python 3.12+ on macOS or Linux; file locking uses fcntl, so Windows is not supported yet. See CONTRIBUTING.md. Releases follow docs/RELEASING.md.

Star History

Star History Chart

License

MIT © 2026 Kürşat Dinç

Metadata

Release files for agent-mem-vault 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-mem-vault 2.0.0
File Size Uploaded Provenance Actions
agent_mem_vault-2.0.0.tar.gz 151.1 kB With provenance Details for agent_mem_vault-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-mem-vault 2.0.0
File Interpreter ABI Platform Actions
agent_mem_vault-2.0.0-py3-none-any.whl Python 3 none any Details for agent_mem_vault-2.0.0-py3-none-any.whl

Total release size: 192.9 kB

Release files / agent_mem_vault-2.0.0.tar.gz

Download URL agent_mem_vault-2.0.0.tar.gz
Size 151.1 kB
Tags Source
SHA-256 checksum
How to use checksums
94c3fcdce8fc4c77d5bc550ee8e6119bb498cc3bb7157bccb9d49b08a3265940
BLAKE2b-256 checksum
How to use checksums
21d28d76ff6f674d12e91bf9c6e69f3e0086d6bc749fd727945aad7359cf1331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / agent_mem_vault-2.0.0-py3-none-any.whl

Download URL agent_mem_vault-2.0.0-py3-none-any.whl
Size 41.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
355ba4734cf9f017eb7ced0eb854070f5569beb8484dc1853ab72a8d4a9e0482
BLAKE2b-256 checksum
How to use checksums
9f9c66f155638b99f6f720bf6c60a8497aac5996eb8211854fa4bf1baed00b99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for agent-mem-vault 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_mem_vault-2.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page