CtxVault
Open-source Python 3.10+ MIT Licensed

Local memory infrastructure for AI agents

Store knowledge and skills in typed vaults
you compose, control and query — entirely local.

pip install ctxvault
Get started →

The vault

The building block of CtxVault.

  • A directory on your machine
  • Semantic (knowledge) or Skill (procedures)
  • Public or restricted access
  • Attached to one or more agents
Configurable topology

Define any agent–vault architecture

Memory slots can be public or restricted, shared across agents or private to one. Attach agents to vaults, control who can read and write, and compose the topology that fits your use case — from a single vault to a multi-agent system with layered access boundaries.

CtxVault architecture: agents, vaults, access boundaries, CLI observability
Typed memory

Semantic and procedural vaults

Cognitive architectures such as ACT-R and CoALA separate long-term memory into declarative knowledge and procedural skills. CtxVault makes this distinction structural: semantic vaults store what the agent knows, skill vaults store how it should act. Both participate in the same topology.

Semantic and procedural memory vaults

Core principles

Typed memory

Semantic vaults hold knowledge — what the agent knows. Skill vaults hold procedures — how the agent behaves. The distinction is structural, not a metadata label.

Structural isolation

Every vault is an independent index. Restricted vaults are attached to specific agents. The boundary is part of the architecture, not a rule in a config file.

Persistent across sessions

Context written in one session is retrievable days later. "Financial constraints" matches "cut cloud costs by 15%" written three days prior.

Observable by default

Every vault is a plain directory on your machine. Read it, edit it, query it through the CLI. Contribute documents alongside what agents write.

Local-first

No cloud, no telemetry, no external services. Vaults live on disk. What you connect to that knowledge base is your choice.

Three interfaces, one vault layer

CLI

Human-facing

Monitor vaults, inspect agent-written content, add documents, query knowledge bases directly.

HTTP

Programmatic

Connect LangChain, LangGraph, or any pipeline via REST. Full CRUD, semantic search, agent write support.

MCP

Autonomous agents

Any MCP-compatible client gets direct vault access. The agent handles list, query, write, and read_skill on its own.

vs. alternatives

CtxVaultChromaDB + customLangChain MemoryMem0
Vault isolationyou build it
Access controlyou build it
Typed memory
Agent-written memoryyou build itpartialpartial
CLI observability
Local-firstcloud
MCP serveryou build it

Quickstart

# Initialize vaults
ctxvault init knowledge
ctxvault init skills --type skill

# Add documents, index, and query
ctxvault index knowledge
ctxvault query knowledge "what decisions were made last week?"

# Inspect skills
ctxvault skills skills
ctxvault skill skills "Weekly Engineering Update"

# See everything
ctxvault vaults

Examples