Generated banner for Fidelis Memory
Generated logo for Fidelis Memory

Fidelis Memory

Memory serverOfficial Hermes Labs project

Created by Hermes Labs

Published in hermes-labs-ai/fidelis. Publisher page

25 GitHub stars

What it is

Zero-LLM agent memory for Claude Code and AI agents: local-first BM25, dense-vector, and reciprocal-rank-fusion retrieval. Returns original passages verbatim by default. Available on PyPI as fidelis-memory. Apache-2.0.
— the description by Hermes Labs

AutoGineer overview, from the brain’s own files

Fidelis is a local-first memory infrastructure designed to provide AI agents with persistent, accurate recall of stored notes. Unlike systems that rely on generative models to summarize or rewrite information, Fidelis focuses on returning original passages verbatim. It operates as a background service on the user's machine, utilizing a vector store and hybrid retrieval techniques—including BM25 and dense-vector search with reciprocal rank fusion—to ensure high-fidelity recall. By integrating via MCP, it allows agents to store, recall, correct, and inspect memory records without requiring external API keys or cloud-based storage, making it suitable for developers and autonomous agents that need to maintain context across sessions.

How it works

Memory model: Vector store

AutoGineer overview, from the brain’s own files

Fidelis runs as a background service on the user's machine, managing a local store of text and Markdown notes. When a user or agent saves a note, it is indexed using local embeddings. The system provides an MCP interface for agents to interact with this memory. Retrieval is performed through a combination of keyword-based BM25 search and dense-vector search, which can be fused to find relevant passages. The system supports versioning through corrections, allowing records to be superseded without deleting historical data.

Folders
FolderRoleFiles
.githubagent-config5
assetsattachments1
docsdocs19
examplesexamples18
scriptsscripts1
srcsource-code42
teststests67
.agentsfolder1
.hermesfolder3
Formulafolder1
benchfolder144
claude-pluginfolder4
experimentsfolder30
extensionsfolder1

Requirements

Runtimes: Python >=3.10

Databases: Chroma

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. Not scanned by AutoGineerIts dependencies are installed by pip or uv when you run it and were not scanned by AutoGineer (3 declared). https://pypi.org/project/fidelis-memory/
  2. Created by Hermes Labs. Published in hermes-labs-ai/fidelis. Licence: Apache License 2.0.

Usage

AutoGineer overview, from the brain’s own files

  • Install the Fidelis memory server and initialize the background service.
  • Connect the agent to the Fidelis MCP server.
  • Use the 'fidelis_store' tool to save important facts or decisions.
  • Use the 'fidelis_recall' tool to retrieve original text based on natural language queries.
  • Use 'fidelis_correct' to update or supersede existing records while maintaining history.
  • Inspect memory status and availability using 'fidelis_health'.
“Use Fidelis to find my Atlas billing migration note. What must happen before we retry? Quote the relevant text.”
The agent queries the Fidelis memory server and returns the exact sentence: 'Do not retry until the idempotency fix is verified.'
“Store this note: The API endpoint for the user service has changed to /v2/users.”
The agent uses the fidelis_store tool to save the fact, which is then indexed and available for future retrieval.

Documentation by Hermes Labs

<!-- mcp-name: io.github.hermes-labs-ai/fidelis-memory -->

<div align="center">

Fidelis Memory

<img src="assets/fidelis-memory-artwork.png" width="420" alt="Fidelis Memory mascot" />

Your agent can forget a summary. Fidelis brings back the note.

Local memory for Codex, Claude Code, and other agents: save text across sessions and retrieve the original passage when it matters.

by Hermes Labs

PyPI · Connect an agent · Technical reference

</div>

A project summary might say “billing migration rolled back.” The original note says why it failed and do not retry until the idempotency fix is verified. When your next session depends on that condition, the missing sentence matters.

Fidelis stores your Markdown and text notes and retrieves their stored wording. Its default retrieval does not ask a generative model to rewrite your memory.

Try it with one note

This path supports Python 3.10+, macOS or Ubuntu, and a local Ollama service. Start Ollama if needed (ollama serve in a separate terminal). No model API key is required. The current release is 0.3.0rc1.

ollama pull nomic-embed-text
python3 -m venv ~/.venvs/fidelis
source ~/.venvs/fidelis/bin/activate
python3 -m pip install "fidelis-memory[hybrid]==0.3.0rc1"
fidelis init

demo_dir=$(mktemp -d)
cat > "$demo_dir/atlas.md" <<'NOTE'
Atlas billing migration:
Duplicate charges appeared in staging. Rolled back.
Do not retry until the idempotency fix is verified.
NOTE

fidelis watch "$demo_dir" --once
fidelis recall-hybrid "Atlas billing migration retry condition" --tier zero_llm

fidelis watch and fidelis recall-hybrid use the background service started by fidelis init.

Look for both the rollback and the retry condition in the retrieved text. This is retrieval of a saved note, not a generated answer. For your own files, replace "$demo_dir" with a notes directory. If retrieval fails, run fidelis health and confirm Ollama has nomic-embed-text available. Keep the virtual environment after fidelis init; the background service uses it.

What this changes on your machine: fidelis init installs a per-user background service (launchd on macOS, systemd --user on Linux) that starts fidelis-server automatically at login. fidelis watch sends the note to that server, which saves it in the local store at ~/.cogito/store by default, not in the temporary demo directory. fidelis recall-hybrid also queries that same running server and searches the whole shared store, so its results can include notes you saved earlier, not only the demo note. The watcher also records ingested files in ~/.fidelis/watched.json. To remove the default service on macOS, run fidelis init --uninstall; it stops the service and deletes the launchd plist only. On Linux, find the installed unit with systemctl --user list-unit-files '*fidelis-server*', then run systemctl --user disable --now <unit>, delete that unit file from ~/.config/systemd/user/, and run systemctl --user daemon-reload. Neither path deletes your data. The store is shared by everything you save with Fidelis, so deleting ~/.cogito/store erases all of it, not just the demo note; do that only on a throwaway install. Also delete the temporary demo directory ($demo_dir), and ~/.fidelis/watched.json if you want its record of the file path gone.

Connect an agent

Once the note is retrievable locally, install the MCP connection for your client:

fidelis mcp install --client codex
# Or, for Claude Code:
fidelis mcp install

Restart the client and try: “Use Fidelis to find my Atlas billing migration note. What must happen before we retry? Quote the relevant text.”

The client gets tools to recall, store, correct, fetch, and inspect memory. It decides when to call them; installing the connection does not make every turn recall automatically. Other clients and uninstall commands include Cursor, Gemini CLI, Copilot CLI, and OpenClaw. A separate Pi extension provides prompt-time recall.

What Fidelis preserves

  • Original wording. watch, store, and other verbatim write paths keep the text you supplied, so retrieval can return the condition that a summary might omit.

  • Local retrieval. Fast vector search is the default MCP recall path. Explicit hybrid search combines keyword and vector results without a generative LLM at its zero_llm tier; local embeddings still require Ollama.

  • Corrections over time. A correction can supersede a prior record without erasing it. Recall can show validity and historical status instead of silently replacing the old note.

Fidelis also has optional extraction and model-assisted routes. Those can transform or filter inputs; use the verbatim path when the original wording is the point. Retrieved text can still be wrong or out of date, and your agent's model provider may see it when answering.

Current scope

Fidelis 0.3.0rc1 is a single-machine pre-release, not a hosted team memory service. The LongMemEval-S retrieval run measured whether the redesigned default path retrieved material across 470 questions; it did not measure answer accuracy. See the results, user-fit guide, and security policy for deeper detail.

Full reference · Upgrade notes · Contribute · Changelog

Apache-2.0. Hermes Labs builds agentic infrastructure for autonomous systems.

docs/ROADMAP_CODEX.md

Roadmap: code-grounded read of the retrieval fork

1. Is the per-type-index design sound?

Partly. The core idea, separate storage for atomic facts vs session-like memories, is sound because the current code already has two materially different retrieval assumptions: /recall is built around short candidate snippets and integer-pointer filtering (src/cogito/recall.py:67-105), while /recall_hybrid adds BM25, prefixed embeddings, and route-specific reranking (src/cogito/recall_hybrid.py:203-317, src/cogito/recall_hybrid.py:519-637).

What is missing in the design and would bite:

2. Is the skeptic right about the 21pt regression?

On the regression itself: yes. bench/eval.py runs /recall_hybrid directly as mode E (bench/eval.py:358-368), and the status/docs consistently report 54% vs 75%.

On the architect’s diagnosis: only partly proven from code.

  • “BM25 hurts short facts” is plausible and code-consistent. The hybrid stage always fuses BM25 runs into RRF when bm25s is present (src/cogito/recall_hybrid.py:264-303). That is structurally different from /recall, which uses multi-query dense recall plus cosine rerank and no BM25 (src/cogito/recall.py:48-64, src/cogito/recall_b.py:313-343). On a corpus of short fact strings, extra lexical runs can easily perturb rank-1.

  • “150-char filter truncation hurts session content” is true as a code fact: /recall shows only 150 chars per candidate to the filter (src/cogito/recall.py:87-91). But it does not explain the 21pt regression on cogito’s atomic eval, because that eval compares /recall against /recall_hybrid, and hybrid mostly keeps Stage 1 order for default-route queries at tier="filter" (src/cogito/recall_hybrid.py:607-613). The 21pt drop is therefore much more likely a Stage 1 mismatch than a filter-snippet issue.

  • For session retrieval, the bigger code-grounded mismatch is elsewhere: the 96.4% benchmark (runP-v35) relies on turn chunking and dedup back to sessions (bench/longmemeval_combined_pipeline_flagship.py:140-188), while the production port explicitly omits turn chunking and session-date scaffolds (src/cogito/recall_hybrid.py:20-24). That gap is more important than the 150-char fact.

3. Fork recommendation

Fast-ship is the right fork.

Reason: the codebase today cleanly supports the narrow claim that /recall_hybrid is an opt-in LongMemEval-derived path and leaves /recall untouched (src/cogito/server.py:175-193, CHANGELOG.md:3-15). It does not yet support the broader dispatcher claim because typed writes, migration, dual-index querying, and valid cross-path merge semantics are missing. Shipping the benchmark result as workload-specific is honest; trying to ship workload-aware dispatch now would be architecture-first, evidence-second.

4. Concrete engineering roadmap

  1. Measure real memory length/type distribution before tuning thresholds. Where: add a bench/CLI script over memory.get_all() like snapshot.py/calibrate.py do (src/cogito/snapshot.py:53, src/cogito/calibrate.py:53). Acceptance: report count, p50/p90/p99 length, newline distribution, turn-marker rate, and provisional buckets <200, 200-399, 400-799, 800+. Effort: 2-3h.

  2. Add typed-write plumbing without changing default behavior. Where: src/cogito/server.py, src/cogito/config.py, new classifier helper. Acceptance: /store returns mem_type; config can target legacy single collection or typed collections; existing installs still default to legacy mode. Effort: 5-7h.

  3. Implement explicit migration, not implicit dispatch. Where: new CLI command plus reuse of memory.get_all()/write paths. Acceptance: migrate legacy collection to {collection}_atomic and {collection}_session, verify count parity, leave legacy untouched until success. Effort: 6-8h.

  4. Fix cross-path merge semantics before any dual-index default. Where: dispatcher layer around recall() and recall_hybrid(). Acceptance: merged results use source-aware ordering, not stale cosine scores after rerank; add tests proving LLM-reranked items are not re-sorted by obsolete score. Effort: 4-6h.

  5. Add medium-length and structured-memory falsifier tests. Where: bench/eval.py plus new fixture file alongside bench/eval_cases.json. Acceptance: dedicated cases for 200-800 char narratives and JSON/YAML/code blobs; report Path A vs Path B separately. Effort: 4-6h.

  6. Add paraphrase and typo perturbation tests. Where: bench harness only; no benchmark rerun required for roadmap, but this is the next measurement gate. Acceptance: reproducible generated variants and per-path pass/fail thresholds checked in. Effort: 4-5h.

  7. Only then prototype dispatcher policy. Where: query-time dispatch layer plus API surface. Acceptance: measured improvement over legacy on typed corpora, no regression below current /recall floor on atomic eval, and no claim of “auto” until tests above pass. Effort: 6-10h.

5. What to commit now vs hold

Commit now: the opt-in v0.3.0 hybrid path as an explicitly workload-specific feature. The server endpoint is isolated, /recall is unchanged, and the changelog already describes it that way (CHANGELOG.md:5-15).

Hold: any dispatcher, “generalizable” positioning, or default-routing changes. The current repo does not yet implement the storage split or the merge semantics needed to support that claim.

6. What the agents missed

  • The benchmark/production mismatch is larger than “150-char truncation.” The benchmark’s win depends on turn chunking and session-level dedup (bench/longmemeval_combined_pipeline_flagship.py:140-188); production hybrid explicitly removed those pieces (src/cogito/recall_hybrid.py:20-24).

  • The dispatcher design assumes score comparability that the code does not preserve after reranking.

  • bench/results-guard-2026-04-17.json is only 30 questions, not a full verification run, so it should not be used as evidence of the final claim.

  • bench/eval.py scores positive cases by keyword hit threshold, not exact answer matching (bench/eval.py:24-33, bench/eval.py:180-201). That is fine for regression tracking, but it widens uncertainty when arguing about small deltas or cross-workload transfer.

367 files · 337 not served here

Advantages

  • Retrieves original passages verbatim by default, avoiding potential inaccuracies introduced by generative summarization. evidence: README.md
  • Supports hybrid search combining BM25 and dense-vector retrieval for improved accuracy. evidence: README.md
  • Maintains historical integrity by allowing corrections to supersede records without erasing the original data. evidence: README.md

Limitations

  • Requires a local Ollama service for embedding generation. evidence: README.md
  • Currently a single-machine pre-release and not a hosted team memory service. evidence: README.md
  • Retrieved text may still be outdated or incorrect depending on the quality of the stored information. evidence: README.md

Security

Risk level: Low risk

This brain runs

Agent instructions that run or fetch something (4)

  • .agents/skills/fidelis/SKILL.md: Wiring an MCP memory tool into Claude Code, Codex, GitHub Copilot CLI, Gemini CLI, or OpenClaw via `fidelis mcp install`
  • .agents/skills/fidelis/SKILL.md: Executable name is `fidelis`, not `fidelis-memory` — `uvx fidelis-memory` fails;
  • .agents/skills/fidelis/SKILL.md: use `uvx --from fidelis-memory fidelis <cmd>`.
  • .agents/skills/fidelis/SKILL.md: install `fidelis-memory`.

Git hooks (1)

  • .pre-commit-config.yaml: bash -c 'git grep -nE "rbr_lpci" -- ":!.pre-commit-config.yaml" && exit 1 || exit 0'

MCP servers (3)

  • claude-plugin/.mcp.json (fidelis): uvx --from fidelis-memory==0.3.0rc1 fidelis mcp serve
  • gemini-extension.json (fidelis): uvx --from fidelis-memory==0.3.0rc1 fidelis mcp serve
  • mcp.json (fidelis): uvx --from fidelis-memory==0.3.0rc1 fidelis mcp serve
  • Low risk: network-instructions (.agents/skills/fidelis/SKILL.md:5)

Attribution and licence

Created by
Hermes Labs
Declared authors
  • Hermes Labs (declared in pyproject.toml)
  • Rolando Bosch Rodriguez (declared in CITATION.cff)
Publisher
Hermes Labs (Official Hermes Labs project)
Source
hermes-labs-ai/fidelis · commit 9504c4a
Licence
Apache License 2.0 (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Hermes Labs.

Install from source

337 of its files are not served here, so there is no ZIP. hermes-labs-ai/fidelis at 9504c4a