agent-memory-vault

by mcncarlVerified

Markdown-first shared memory vault for Claude Code and Codex with SQLite, Zvec, Git, closeout, and audit

198
Stars
26
Forks
Python
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/mcncarl/agent-memory-vault

Getting Started

Guides for using skills like agent-memory-vault.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

Agent Memory Vault: Shared Memory for Claude Code and Codex

English | 简体中文

Tests License: MIT Python 3.10+

Agent Memory Vault is a local-first, Git-backed long-term memory system that Claude Code and Codex can safely share. Markdown remains the source of truth; SQLite provides structured and full-text retrieval; optional EmbeddingGemma + Zvec adds local semantic search.

The repository contains only reusable templates, scripts, and fictional examples. Your real memories, paths, credentials, project names, and conversation content stay in your private local vault.

Why it exists

AI coding agents are useful inside one session, but durable collaboration needs more than chat history. This project provides a verifiable memory lifecycle:

  • Start important work by retrieving only the relevant long-term context.
  • Preserve stable facts, decisions, workflows, project state, and agent lessons as readable Markdown.
  • Let Claude Code and Codex use one vault, one Git history, and one retrieval index.
  • Prevent sessions from accidentally committing each other's changes with session-scoped claims.
  • Validate high-impact writes with source checks, content-bound intents, approvals, and immutable receipts.
  • Keep every derived store rebuildable from Markdown.

Obsidian is optional. The vault is an ordinary Markdown directory and works with any editor.

Design

Private Markdown vault (source of truth)
              │
              ├── Git history and rollback
              ├── SQLite metadata + FTS search
              ├── optional EmbeddingGemma + Zvec semantic search
              └── session claims, write intents, closeout, and audit
                         │
                 ┌───────┴───────┐
                 │               │
             Claude Code        Codex

The repository is organized around a small set of auditable components:

templates/vault/                 reusable private-vault template
scripts/bootstrap.py            create a local vault and Git baseline
scripts/memoryctl               shared CLI for Claude Code and Codex
scripts/agent_memory_index.py   SQLite index and full-text search
scripts/agent_memory_search.py  unified keyword + optional vector search
scripts/agent_memory_retrieve.py
                                bounded, revalidated Markdown retrieval
scripts/agent_memory_write.py   host read/prepare/apply/cancel boundary
scripts/agent_memory_closeout.py
                                checks, indexing, audit, and scoped commit
scripts/agent_memory_doctor.py  end-to-end health checks

See Architecture, Privacy, and Automation for the detailed model.

Quick start

Requirements: Python 3.10+ and Git.

git clone https://github.com/mcncarl/agent-memory-vault.git
cd agent-memory-vault
cp .env.example .env
python3 scripts/bootstrap.py --memory-root "$HOME/agent-memory-vault" --write-env
source .env
python3 scripts/agent_memory_evolution.py --init --scan --report
python3 scripts/agent_memory_index.py --init --scan --report
python3 scripts/agent_memory_check.py
python3 scripts/agent_memory_doctor.py

bootstrap.py creates an independent Git repository in the private vault and commits the template baseline. Existing Git history is preserved. Use --no-init-git only when you intentionally do not want Git.

If the source checkout has neither .env nor a runtime TOML file, generated databases and logs stay in the ignored local .agent-memory/ directory. They do not silently reuse another installed memory system.

Windows 10/11

Use the PowerShell installer from the repository root:

powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\install-windows.ps1 `
  -MemoryRoot "$HOME\Documents\Agent Memory Vault"

The installer accepts paths containing spaces or non-ASCII characters, creates a private virtual environment, installs a verifiable runtime, initializes the vault and indexes, and runs the built-in checks. See the complete Windows guide.

Share one vault between Claude Code and Codex

Keep one Markdown vault, one Git baseline, one SQLite database, one optional Zvec index, and one audit schedule. Each host needs only a thin adapter:

  • Codex reads the vault's shared AGENTS.md.
  • Claude Code imports the same file from CLAUDE.md with @/absolute/path/to/AGENTS.md.
  • Claude Code's native auto-memory should remain separate from the formal vault.
  • Both hosts call memoryctl with their own actor and session identity.
python3 scripts/memoryctl --actor codex search "project status" --limit 5

python3 scripts/memoryctl --actor codex prewrite \
  "Stable fact to preserve" \
  --source-class user_direct \
  --knowledge-kind fact \
  --asserted-by user \
  --evidence-ref "current-conversation"

python3 scripts/memoryctl --actor codex claim \
  --file "/absolute/path/to/changed-memory.md"

python3 scripts/memoryctl --actor codex closeout --dry-run
python3 scripts/memoryctl --actor codex closeout

Claims are stored as session hashes. A session closeout processes only the files claimed by that session and explicitly excludes changes owned by other sessions. When there is nothing to process, closeout exits successfully as a no-op; unclaimed memory changes still fail closed.

Retrieval

The unified search combines SQLite/FTS results with the optional Zvec sidecar, deduplicates candidates, and applies orthogonal filters such as project, memory type, track, scope, and status.

python3 scripts/agent_memory_search.py "project closeout" --limit 5
python3 scripts/agent_memory_search.py "preferences" --track user
python3 scripts/agent_memory_search.py "deployment boundary" --current-project example-app

Search indexes are candidate generators, not authorization or truth sources. Host applications should use retrieve, which reopens the current Markdown, validates containment and symlinks, requires strict UTF-8, reapplies scope and status rules, checks for sensitive content, and returns bounded excerpts with current hashes.

Safe writes and closeout

The normal write sequence is:

  1. Run prewrite to classify the source, knowledge type, target, and duplicate risk.
  2. Edit the Markdown source of truth.
  3. Claim the changed files for the current session.
  4. Run closeout --dry-run and review the result.
  5. Run closeout to check, index, audit, and optionally commit only the claimed files.

For protected paths and host applications, the repository also provides a content-bound two-phase workflow: read-targetprepare → explicit user confirmation → apply. It verifies the base Git version, session, target, scope, and raw/canonical hashes before writing, then records an immutable receipt after closeout.

This is designed as a strong accidental-misuse boundary for local agents. It is not a security boundary against malicious software that already controls the local user account.

Privacy and security

  • Formal memory stays in the private vault, outside this public repository.
  • Markdown is canonical; SQLite and vector indexes are disposable derivatives.
  • Search logs retain hashes and classifications rather than raw private queries.
  • Secret-like content is rejected by checks before it enters formal memory.
  • Retrieval revalidates current files instead of trusting stale index excerpts.
  • Deletion evidence requires explicit authorization and a recoverable Trash copy.
  • Runtime manifests and dependency locks make local installations auditable.

Before publishing a fork, run:

python3 -m compileall -q scripts tests
python3 -m unittest discover -s tests -v
AGENT_MEMORY_ROOT="$PWD/templates/vault" \
AGENT_MEMORY_STATE_DB="$PWD/.agent-memory/state.sqlite" \
python3 scripts/agent_memory_index.py --init --scan --report
python3 scripts/agent_memory_check.py --skip-state-db
python3 scripts/agent_memory_doctor.py

Also inspect the Git diff and scan for private paths, credentials, databases, and generated vector data. See Privacy.

Optional semantic retrieval

Keyword search works without large dependencies. To enable fully local semantic retrieval, install the pinned vector environment and configure EmbeddingGemma + Zvec:

python3 -m venv .venv-vector
.venv-vector/bin/python -m pip install -r requirements-vector.lock

The vector layer only recalls candidates. SQLite continues to own structured filtering, and Markdown remains authoritative. The doctor verifies model manifests, dependency locks, vector/index hashes, and offline-query behavior.

Runtime installation and upgrades

For a stable machine-wide entry point, install the current Git version into a private runtime directory:

python3 scripts/install_runtime.py --config-root "$HOME/.config/agent-memory"
cp config/agent-memory.example.toml "$HOME/.config/agent-memory/config/agent-memory.toml"
# Edit memory_root, git_root, and state_db in the TOML file.
"$HOME/.config/agent-memory/scripts/install_runtime.py" \
  --config-root "$HOME/.config/agent-memory" --verify --json

Running the installer again upgrades the runtime without overwriting your private configuration or host adapters.

Project status

Agent Memory Vault is actively maintained and tested on Ubuntu, macOS, and Windows with Python 3.11, plus Ubuntu with Python 3.12. The public template is intentionally free of personal memory and generated state.

Created and primarily maintained by Yichen (@mcncarl).

Contributing

Issues and pull requests are welcome. Please keep changes cross-platform, add tests for behavior changes, and never include real memory, absolute private paths, credentials, generated databases, or vector indexes.

License

Released under the MIT License. Third-party notices are listed in ACKNOWLEDGMENTS.md.

Frequently Asked Questions

What is agent-memory-vault?

agent-memory-vault is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by mcncarl. Markdown-first shared memory vault for Claude Code and Codex with SQLite, Zvec, Git, closeout, and audit. It has 198 GitHub stars.

Is agent-memory-vault safe to use?

Yes. agent-memory-vault passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install agent-memory-vault?

Clone the repository with "git clone https://github.com/mcncarl/agent-memory-vault" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is agent-memory-vault written in?

agent-memory-vault is primarily written in Python. It is open-source under mcncarl on GitHub, so you can review or fork the full source.

Are there alternatives to agent-memory-vault?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agent-memory-vault against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details