Skip to main content
Glama
Perseus-Computing-LLC

Perseus Vault Codex

Official

Perseus Vault Codex

Persistent, encrypted, local-first memory for OpenAI Codex agents.

Codex never forgets. Perseus Vault gives your Codex agent persistent encrypted memory — so it remembers your project conventions, past decisions, and debugging context across every session.

CI License: MIT | Built for OpenAI Build Week — Developer Tools track


The problem

Every Codex session starts from zero. The agent re-learns your build commands, re-discovers your conventions, and re-derives the same architectural context you explained yesterday. Memory is the missing primitive for coding agents.

Existing memory stores don't fit a developer's machine: mem0 is cloud-dependent, cognee is Python-only with no encryption at rest, Letta manages memory but doesn't encrypt local storage, Chroma is a vector DB, not structured agent memory. None are single-binary, zero-infra, and encrypted.

Related MCP server: Conectica

The answer

perseus-vault-codex is a tiny MCP server that wraps Perseus Vault — a single 12 MB binary, fully local, AES-256-GCM encrypted at rest, with FTS5 keyword + hybrid recall and no API keys, no cloud, no telemetry. Install it and any Codex session gains five memory tools:

Tool

What it does

perseus_remember

Save a fact, decision, convention, or gotcha across sessions.

perseus_recall

Retrieve relevant past context (FTS5 + hybrid ranking).

perseus_forget

Remove a stale or wrong memory.

perseus_reflect

Synthesize an insight from stored memories (RAG via your OpenAI/GPT-5.6 key).

perseus_status

Store health: memory count, encryption state, DB location.

Install

# 1. Install the wrapper (zero Python dependencies)
pip install perseus-vault-codex            # from PyPI, or from source (below)

# 2. Install the Perseus Vault binary (single static binary, no deps) and put it on PATH
#    https://github.com/Perseus-Computing-LLC/perseus-vault/releases

# 3. Register it with Codex (non-destructive; backs up your config)
perseus-vault-codex-setup

Install from source (works today, before the PyPI release):

git clone https://github.com/Perseus-Computing-LLC/perseus-vault-codex
cd perseus-vault-codex
pip install -e .
perseus-vault-codex-setup

That's it. On first run the server auto-creates an encrypted vault at ~/.perseus-vault/codex/memory.dbno config required.

Configure in Codex

perseus-vault-codex-setup writes this into ~/.codex/config.toml:

[mcp_servers.perseus-vault]
command = "perseus-vault-codex"
args = []

Restart Codex (or start a new session) and the five perseus_* tools are available. To enable perseus_reflect synthesis, expose your OpenAI key:

[mcp_servers.perseus-vault.env]
OPENAI_API_KEY = "sk-..."
OPENAI_MODEL = "gpt-5.6"

See examples/codex_config.toml for every option.

Example usage

Inside a Codex session:

you> Set up the project. First, check what you already know.

codex> [calls perseus_recall {"query": "project build and test conventions"}]
       I recall from a previous session:
       - This project formats with `ruff format` and lints with `ruff check`.
       - We chose SQLite + FTS5 over Postgres for the local dev store.
       Running `ruff check` before I start...

you> We just decided to switch auth to short-lived JWTs with refresh tokens in Redis.

codex> [calls perseus_remember {"category": "decision", "key": "auth",
        "text": "Auth uses short-lived JWTs; refresh tokens live in Redis."}]
       Remembered. I'll apply that convention going forward — including in
       future sessions.

Tomorrow, in a brand-new session, perseus_recall "auth" returns that decision. The context survived.

Try the demo

PERSEUS_VAULT_BIN=/path/to/perseus-vault python scripts/demo.py

It simulates two separate Codex sessions: session 1 learns three project facts and tears the vault process down completely; session 2 — a fresh process — recalls them, reflects on them, and reports encrypted status. Sample output is in docs/.

Architecture

Codex (GPT-5.6)  ──MCP stdio──▶  perseus-vault-codex  ──MCP stdio──▶  perseus-vault binary
                    5 tools        (this package)        55+ tools      SQLite+FTS5, AES-256-GCM

Two hops on purpose: Perseus Vault exposes 55+ low-level memory tools; this package collapses them into five verbs a coding agent can reason about, and the binary does the encrypted storage and retrieval. Full write-up: docs/architecture.md.

Benchmarks

Measured against the real perseus-vault binary (v2.17.0), encrypted at rest — full methodology and reproducible harness in benchmarks/:

  • Recall is fast and accurate at scale. Seeding 10,000 developer memories, recall runs at p50 7 ms (p95 27 ms) with 5/5 recall@10 on distinctive needle memories (1,000-memory corpus: p50 1.3 ms). The recall hot path — what a Codex agent hits every task — stays in single/low-double-digit milliseconds.

  • The engine scales to 1,000,000 memories. A separate 2× H100 validation (run #619, results/scale_1m_2xh100.json) embedded ~1M memories (995,562 persisted, 0 errors) and hit hybrid recall@5 = recall@10 = 1.00 over 2,000 semantic queries, at sub-second latency (p50 479 ms). This is an engine-scale result on GPU, not the laptop path — reported separately and honestly (keyword-only recall is near-zero on that semantic workload; hybrid carries it).

  • Persistent memory cuts context tokens ~72%. Over a 30-session horizon, recalling the top-k relevant memories per task uses 110,493 fewer tokens (72.5% reduction) than re-priming each new session with the full project knowledge base — per-unit token costs measured with tiktoken against real vault recalls.

Every number is measured or explicitly labeled as a stated assumption; nothing is hardcoded. Reproduce with python benchmarks/bench_recall.py and python benchmarks/bench_token_savings.py.

How Codex was used

Codex was used during Build Week as an implementation and verification partner. In the final review session, it read the complete wrapper and its tests, ran the suite against the real perseus-vault 2.17.0 binary, exercised the two-session demo, and checked a unique marker was absent from the raw default database file. It also hardened stdout-EOF recovery in the subprocess client and added a regression test. Those are review-session contributions; this README does not attribute all pre-existing code to that session.

See SUBMISSION.md for the precise verification record and benchmark caveats.

Development

git clone https://github.com/Perseus-Computing-LLC/perseus-vault-codex
cd perseus-vault-codex
pip install -e ".[dev]"
pytest -q                                   # unit tests (no binary needed)
PERSEUS_VAULT_BIN=/path/to/perseus-vault pytest -q   # + integration tests

About

Built by Perseus Computing LLC. Perseus Vault is the only fully-local, encrypted memory store for AI agents, with existing integrations for Haystack, LangChain, LlamaIndex, CrewAI, Pydantic AI, and Google ADK. MIT licensed.

Available Tools

5 tools
perseus_forgetA

Remove a stale or incorrect memory. Soft-deletes by (category, key) — the memory is hidden from recall but recoverable. Use the key shown in a prior perseus_recall / perseus_remember result.

ParametersJSON Schema
NameRequiredDescriptionDefault
keyYesThe memory's key.
reasonNoOptional note on why it's being removed.
categoryNoThe memory's category (default 'codex-memory').

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses soft-deletion, recoverability, and the effect on recall queries. It could be improved by mentioning any side effects or limits, but the core behavioral traits are well described.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that efficiently conveys the tool's purpose, mechanism, and usage hint. No superfluous words, and the most critical information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple forget tool with 3 parameters and no output schema, the description covers the core behavior, recoverability, and relationship to sibling tools. It could be expanded with success/failure indicators, but is largely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3). The description adds meaning by explaining that 'key' and 'category' form a composite key for soft-deletion and that 'reason' is an optional note, which goes beyond the schema's property descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Remove a stale or incorrect memory'), the mechanism ('soft-deletes by (category, key)'), and distinguishes from siblings by referencing prior perseus_recall/perseus_remember results, which aids selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells the agent to use the key from prior perseus_recall/perseus_remember results, providing clear context. However, it does not state when to avoid using this tool or mention alternatives like perseus_status or perseus_reflect.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

perseus_recallA

Retrieve relevant memories from past Codex sessions. Call this at the start of a task, or whenever you need project context you might have learned before, e.g. 'how do we run tests here', 'what did we decide about auth'. Uses FTS5 keyword + hybrid ranking; returns the most relevant memories with a score.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoRanking mode (default 'hybrid').
limitNoMax memories to return (default 5).
queryYesWhat you want to remember about (natural language).
categoryNoOptional: restrict recall to one category.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses use of FTS5 keyword + hybrid ranking, and that it returns scored results. Lacks explicit statement that it is read-only, but 'retrieve' implies non-destructive behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, no wasted words. Front-loaded with primary purpose and usage guidance. Efficient and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having 4 parameters and no output schema, the description explains the tool's purpose, when to use it, ranking mechanism, and that results include scores. Minor gap: could mention result sorting by relevance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all parameters. The description adds minimal extra meaning beyond schema (e.g., 'Uses FTS5 keyword + hybrid ranking' but does not clarify parameter interactions). Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it retrieves memories from past sessions, with specific use cases and examples. Distinguishes from siblings (remember, forget, reflect, status) by focusing on retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to call ('at start of task', when needing project context) and provides example queries. No exclusion criteria, but sibling tools cover different operations, so usage is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

perseus_reflectA

Synthesize an insight from stored memories. Given a question, Perseus Vault recalls the most relevant memories and asks the configured LLM (your OpenAI/GPT-5.6 key by default) to produce a grounded answer citing them. If no LLM is configured, returns the assembled memory context so you can reason over it yourself.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe question to reflect on, e.g. 'what are this project's conventions?'
top_kNoHow many memories to ground the answer in (default 8).

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses use of optional LLM and returns either grounded answer or memory context. With no annotations, the description carries the burden; it covers key behaviors without contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three front-loaded sentences with no filler. First sentence captures core purpose, followed by clear procedural explanation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers main behavior, LLM optionality, and return format. Lacks edge cases or error handling, but is adequate given tool simplicity and lack of output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds value by explaining the roles of query and top_k in the reflection process, and the optional LLM configuration impact.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it synthesizes an insight from stored memories, using a question to recall relevant memories and produce a grounded answer. Distinguishes from sibling tools like perseus_recall (raw retrieval) and perseus_remember (storage).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly describes when to use (given a question) and behavior when LLM is not configured. No explicit when-not or alternative mentions, but context implies use for synthesis vs. raw recall.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

perseus_rememberA

Save a fact, decision, convention, or piece of context to persistent encrypted memory so it survives across Codex sessions. Call this whenever you learn something durable about the project: build commands, code style, architectural decisions, gotchas, or the user's preferences. Idempotent per (category, key).

ParametersJSON Schema
NameRequiredDescriptionDefault
keyNoOptional stable identifier. Re-using a key updates that memory instead of creating a duplicate. Auto-generated if omitted.
tagsNoOptional tags for later filtering.
textYesThe fact or context to remember, in plain language.
categoryNoOptional grouping, e.g. 'convention', 'decision', 'gotcha'. Defaults to 'codex-memory'.
importanceNoOptional salience 0.0–1.0 (higher ranks sooner in recall).

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that memory is 'persistent encrypted memory' surviving sessions, and notes idempotency per (category, key). This adds behavioral context beyond the input schema, though it omits details like rate limits or return format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is exceptionally concise: only two sentences. The first sentence precisely explains the tool's function, and the second provides usage guidance and the idempotency property. Every word serves a purpose, with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (5 parameters, no output schema), the description covers core aspects: purpose, idempotency, and encryption. It could mention what the tool returns (e.g., a confirmation), but the key behavioral traits are addressed. The sibling tools imply recall capability.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions. The main description adds value by explaining idempotency behavior for key and category ('Re-using a key updates that memory'), and describing 'text' as 'in plain language.' This supplements the schema, justifying a score above the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Save a fact, decision, convention, or piece of context to persistent encrypted memory.' It specifies the verb 'save' and the resource 'persistent encrypted memory,' and provides concrete examples of what to save. This differentiates it from siblings like perseus_forget and perseus_recall.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises when to call this tool: 'Call this whenever you learn something durable about the project.' It lists examples such as build commands and code style. However, it does not explicitly state when not to use it or compare with alternatives, though the idempotency hint ('Idempotent per (category, key)') provides useful context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

perseus_statusA

Report the health of the memory store: how many memories are stored, whether encryption at rest is active, the database location, and whether reflect (LLM synthesis) is available. Zero-argument.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so description carries full burden. It clearly states the tool is read-only and non-destructive by reporting health info. It lacks details on response format or any side effects, but the listed specifics are sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with front-loaded purpose, no wasted words. Efficiently communicates what the tool does and its zero-arg nature.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-arg tool with no output schema, the description covers the main purpose and lists key information. Could mention return format (e.g., 'returns a JSON object'), but overall adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has zero parameters with 100% schema coverage. The description explicitly confirms 'Zero-argument', adding value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('Report') and lists exact resources (memories stored, encryption, database location, reflect availability). It clearly distinguishes from siblings (forget, recall, reflect, remember) by focusing on health/status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for checking health/status, but does not explicitly state when to use it vs alternatives or provide exclusions. The zero-argument note helps clarify simplicity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedperseus_forget
    • First observedperseus_recall
    • First observedperseus_reflect
    • First observedperseus_remember
    • First observedperseus_status

TDQS

A4.4/5.0
Disambiguation5/5

Each tool serves a unique memory operation: storing, recalling, forgetting, synthesizing, or checking status. No two tools overlap in purpose.

Naming Consistency5/5

All tools follow a consistent 'perseus_verb' pattern, making their actions immediately clear.

Tool Count5/5

Five tools is an ideal size for a memory system, covering essential operations without redundancy or omission.

Completeness4/5

Core CRUD operations are present (create, read, soft-delete), and reflect provides synthesis. Missing explicit update, but idempotent remember can achieve the same effect.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A local-first MCP server that gives AI coding agents persistent memory and controlled commands. Features a git-backed markdown knowledge vault with FTS5 search, surgical section edits, token-aware context budgeting, and a sandboxed command engine with human approval gates. Works with Claude Code, Cursor, Copilot, Gemini, and more.
    53
    10
    1
    Apache 2.0
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    An MCP server that enables multiple AI models (Claude, ChatGPT, Gemini) to share and persist context via a local-first vault of markdown files and SQLite index, allowing seamless cross-AI memory.
    -
  • A
    license
    A
    quality
    A
    maintenance
    Local-first MCP server that gives any AI coding agent per-project memory, workflow intelligence, and always-on, lossless token & context optimization.
    37
    18
    4
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Perseus-Computing-LLC/perseus-vault-codex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server