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/THRESHOLD-AUDIT.md

Threshold Constants Audit (2026-04-24)

Generated during the 2026-04-24 hardening audit. Pins every escalation / confidence constant to its authoritative file:line so future doc-drift flags can be adjudicated quickly.

There are TWO escalation thresholds, not one

This is the single most common source of confusion for auditors reading STATUS.md and recall_hybrid.py side by side.

Production path — src/cogito/recall_hybrid.py
ConstantValueFile:lineRole
_GAP_THRESHOLD0.1src/cogito/recall_hybrid.py:66top1 − top2 gap; above = confident, skip cheap filter

Call site: recall_hybrid.py:607 — confident = (top1 - top2) > _GAP_THRESHOLD. Calibrated on LongMemEval_S score distributions (runB-flagship, 470q). See comment at recall_hybrid.py:64.

Benchmark path — bench/longmemeval_combined_pipeline_v35.py
ConstantValueFile:lineRole
FLAGSHIP_SCORE_THRESHOLD0.80bench/longmemeval_combined_pipeline_v35.py:78escalate to flagship if top-1 score below this
FLAGSHIP_GAP_THRESHOLD0.07bench/longmemeval_combined_pipeline_v35.py:79escalate to flagship if (top1 − top2) below this
GAP_THRESHOLD0.1bench/longmemeval_combined_pipeline_v35.py:131mirror of prod _GAP_THRESHOLD for the bench copy of the default route

Call site: bench/longmemeval_combined_pipeline_v35.py:913 — escalate, reason = should_escalate_to_flagship(...). Fires ~80% of queries (per v35 notes line 89 and STATUS.md).

Why "doc drift" is a misleading framing

An audit of the README or STATUS.md can easily flag that the prod path uses 0.1 but the documented escalation rule cites 0.80 / 0.07. These are different mechanisms in different codebases:

  • _GAP_THRESHOLD gates whether the default route uses the cheap filter at all. It has nothing to do with the bench's filter → flagship runtime escalation.

  • FLAGSHIP_SCORE_THRESHOLD / FLAGSHIP_GAP_THRESHOLD decide when the bench pipeline escalates from cheap filter to flagship LLM.

Both are "escalation thresholds" by name; neither is the other. The STATUS.md line "80.2% actual vs 10% intended" refers to the bench rule firing, not the prod gap-threshold.

Source-of-truth rules

  1. For production recall behavior, src/cogito/recall_hybrid.py constants win. README and STATUS.md must quote them by file:line.

  2. For benchmark numbers, bench/longmemeval_combined_pipeline_v35.py constants win, and the bench version's name should appear in any STATUS.md line citing a percentage.

  3. If a new shared constant is introduced, add it here and cite back to this file from the README.

  • Escalation rate: 80.2% actual vs 10% intended — refers to FLAGSHIP_SCORE_THRESHOLD + FLAGSHIP_GAP_THRESHOLD firing pattern in bench, not _GAP_THRESHOLD in prod.

  • Verify-guard inactive — unrelated to either threshold; surfaces at bench/longmemeval_combined_pipeline_v35.py:958, guard implementation at :456.

Pin file: do not remove without replacement.

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