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.

CHANGELOG.md

Changelog

0.3.0rc1 — 2026-09-21

Time-aware verbatim records, explicit corrections, truthful write outcomes, and a six-tool MCP surface with fast zero-LLM recall. Public install/startup safeguards are retained. MCP names change; see upgrade notes. Historical benchmark scores are not evidence for the redesigned default path.

Unreleased

  • Clarify that quickstart recall searches the whole shared store and may return notes saved before the demo.

  • Pin supersession fail-open, cache reload, annotation, and ephemera filtering contracts with server-free unit tests.

  • Clarify the benchmark case-file roles, disposable-server requirement, and quickstart service use in contributor documentation.

  • Add read-only fidelis recent and fidelis get CLI commands with bounded options, correction metadata, raw JSON output, and explicit failures.

  • Add five server-free worked examples under examples/real-world/ (correction chain, retraction/ephemera read filter, write-gate screening, MCP client config, benchmark hardset hit@5), re-verified by tests/test_real_world_examples.py.

v0.2.0

  • Start the local HTTP service and MCP stdio surface without a reachable Ollama instance. Health and protocol-discovery requests remain available; memory-backed operations report a degraded/unavailable store until the local embedding service is reachable.

  • Make fidelis init refuse existing service-label and port collisions by default, preserve existing service environment settings during re-init, and offer explicit port and label overrides for intentional coexistence.

  • Honor FIDELIS_PORT on both the HTTP server and MCP client, preventing a configured non-default port from splitting the client and server.

  • Add a portable Claude plugin root that pins the released package and exposes the existing read-only MCP tool surface.

  • Coordinate package, runtime, MCP/plugin manifests, citation, current install instructions, container metadata, and release tests at 0.2.0. The version-specific Zenodo identifier is intentionally omitted until an archive for this release exists.

v0.1.0 — 2026-09-13

  • Promote Fidelis Memory from the 0.0.x sequence to its first minor release. The supported product contract is local-first, verbatim memory retrieval for Codex, Claude Code, GitHub Copilot CLI, Gemini CLI, and OpenClaw on the currently gate-tested macOS and Ubuntu paths.

  • Coordinate package, Python, citation, CodeMeta, MCP Registry, Gemini extension, installation-documentation, and public-install-test versions at 0.1.0.

  • Add a public user-fit matrix, a release-readiness record with explicit acceptance criteria, and an outcome-gated 0.2.0 roadmap.

  • Replace the manually maintained passing-test-count badge with the live GitHub Actions status badge so release documentation cannot advertise an obsolete count.

  • Preserve the historical v0.1.0 and v0.2.0 changelog entries under the clearly labeled cogito-ergo predecessor-package section so they cannot be mistaken for current Fidelis package releases.

v0.0.97 — 2026-09-12

  • Release the Gemini CLI extension: v0.0.96 was tagged before gemini-extension.json landed, so the bare-URL install resolved the latest GitHub release and failed with "Configuration file not found". v0.0.97 is the first tag and release archive that carry the manifest.

  • Pin the user_id namespace boundary in tests and document that it is not an identity; add glama.json for the Glama registry ownership claim.

  • Package Fidelis as a native Gemini CLI extension: gemini-extension.json at the repository root launches the MCP Registry package (uvx --from fidelis-memory==0.0.97 fidelis mcp serve) and GEMINI.md tells the model when to call fidelis_orient and fidelis_recall. gemini extensions install https://github.com/hermes-labs-ai/fidelis registers the server without a manual pip install. tests/test_gemini_extension.py binds the manifest to server.json and pyproject.toml so a release bump cannot leave it on an older wheel.

v0.0.96 — 2026-09-10

  • The bundled MCP server now answers the base-protocol ping request with an empty result instead of -32601 method not found. Gemini CLI's gemini mcp list pings after connecting, so a healthy Fidelis server — tools listed, tools working — was reported as Disconnected. No tool, lifecycle, or transport behaviour changed; unknown methods are still refused.

  • Add fidelis mcp install --client gemini and fidelis mcp uninstall --client gemini, which register the bundled stdio MCP server through Gemini CLI's native gemini mcp add / gemini mcp remove (v0.1.19+). --scope user (default) targets ~/.gemini/settings.json, --scope project targets ./.gemini/settings.json. Gemini owns the write because it reads that file as JSON-with-comments and round-trips a user's comments; Fidelis only reads it back, to check ownership before replacing or removing an entry and to prove what the run changed. gemini mcp add overwrites a same-named entry unasked and gemini mcp remove exits 0 for an absent name, so a silent no-op or an unexpected entry is reported as a failure rather than as success.

  • Add fidelis mcp install --client openclaw and fidelis mcp uninstall --client openclaw. OpenClaw keeps outbound MCP servers under mcp.servers in a JSON5 config (~/.openclaw/openclaw.json, or $OPENCLAW_CONFIG_PATH), so Fidelis neither rewrites that file nor parses it — a strict-JSON rewrite would drop the user's comments and trailing commas, and a strict-JSON read of the same file cannot say what is in it at all. Both directions are delegated to OpenClaw's own CLI with $OPENCLAW_CONFIG_PATH pinned: writes to the documented openclaw mcp add / openclaw mcp unset, and every ownership check and read-back to openclaw mcp show fidelis --json, falling back to openclaw mcp list --json to tell "no such server" apart from "could not be read". Install and uninstall refuse to touch an mcp.servers.fidelis entry that does not name the bundled server unless --force is passed, and never shell out to write before refusing. Success is never inferred from an exit code: a change the CLI reports as successful but that the read-back does not prove exits non-zero, and a state OpenClaw cannot report is treated as unknown — never as "no entry there", and never as a success, even under --force. The openclaw binary is required, because it owns the write and is the only reader that can be trusted with a JSON5 config.

  • The Gemini CLI and GitHub Copilot CLI ownership check no longer crashes on a hostile string in a hand-edited config: an embedded NUL (\u0000 is valid JSON) or an unresolvable ~user in the entry's arguments used to escape install and uninstall as a traceback instead of the ownership refusal. Such an entry is now treated as foreign, and left alone unless --force is passed, the way OpenClaw entries already were.

  • OpenClaw ownership no longer matches on any string anywhere in an entry — only on command naming a Python interpreter (this process's own, by exact path, or a plausible name like pypy3 elsewhere) paired with exactly one argument naming the bundled script, the one shape openclaw mcp add actually writes. A foreign server that merely references the script path in env, a header, a URL, or an unrelated argument is no longer recognized as Fidelis's own and installed over or removed without --force. Install also verifies the read-back entry's command, argument, and enabled state match what was requested, not just that it belongs to Fidelis — a stale entry from a prior install (wrong interpreter, left disabled) could otherwise read back as "ours" even when openclaw mcp add silently left it untouched. Diagnostics for a refused or unexpected entry now show only its launch-shaped fields (never argument values, env, or headers), so a credential on the entry is never echoed to stderr.

  • Add fidelis mcp install --client copilot and fidelis mcp uninstall --client copilot, which register the bundled stdio MCP server in GitHub Copilot CLI's documented mcp-config.json (~/.copilot or $COPILOT_HOME) with atomic writes, backups, and ownership checks that preserve unrelated entries. The copilot binary is not required at configuration time. fidelis mcp uninstall --force removes an entry that does not look like ours, for the case where the ownership check is wrong.

  • Atomic config rewrites now keep the destination file's permission bits, and a config Fidelis creates is 0600. Previously every rewrite reset an mcp-config.json or settings.local.json to the umask default, widening a file that can hold MCP env secrets.

  • Config backups no longer overwrite each other when two mutations land in the same second, so an install immediately followed by an uninstall keeps both restore points.

v0.0.95 — 2026-09-02

  • Add a portable fidelis mcp serve entry point and official MCP Registry metadata for uvx-based installation.

  • Add the PyPI README ownership marker required for the io.github.hermes-labs-ai/fidelis-memory registry namespace.

v0.0.94 — 2026-09-02

  • Add supported Codex MCP installation and removal through the shared codex mcp configuration, with exact ownership checks that preserve unrelated entries.

  • Add fidelis_orient, a deterministic MCP tool that selects a bounded evidence lane, returns retrieved records without rephrasing them, and abstains when a turn lacks a known referent or historical-context cue.

  • Add citation and CodeMeta metadata and align the agent-facing llms.txt retrieval headline with the shipped zero-LLM benchmark evidence.

v0.0.93 — 2026-08-05

  • Publish the Hermes Labs distribution to PyPI as fidelis-memory.

  • Make Fidelis Memory the user-facing product name across package metadata and primary documentation, while preserving the fidelis repository, import, and CLI names for compatibility.

  • Replace the GitHub-source install path in primary documentation with the version-pinned PyPI installation command.

v0.0.92 — 2026-08-04

  • Preserve /add input verbatim when the extraction model returns no facts, expose the degraded fallback through HTTP and CLI, and apply the same no-silent-loss rule during queued-write replay.

  • Correct every current install surface to use tagged GitHub source; the PyPI project named fidelis is unrelated to Hermes Labs Fidelis.

  • Align public package status with v0.0.91 and remove a dead benchmark link.

  • Narrow local-data and compliance wording to the demonstrated boundary.

  • Default mem0 telemetry off for direct server launches so SIGTERM completes cleanly, while preserving explicit opt-in; document the remaining Chroma settings and extend CI coverage through Python 3.14.

  • Remove cross-project proof language from current Fidelis presentation.

  • Add a regression test for the public installation contract.

fidelis era

v0.0.91 — 2026-06-18 (public release)

  • Public open-source release on GitHub + Zenodo DOI.

  • Repo hygiene only: relativized benchmark paths, removed run-log artifacts, refreshed module naming, added Zenodo metadata. No API changes vs v0.0.9.

v0.0.5 — 2026-04-24 (first release as fidelis, renamed from cogito-ergo)

Package rename: cogito-ergo → fidelis. Version reset for the new PyPI package. The old cogito-ergo PyPI entries (0.0.8 and 0.3.0) remain published but are now deprecated pointers to this package. Note: a prior cogito-ergo v0.0.5 also exists in the changelog below — these are different packages; the version numbers do not collide on PyPI.

Headline: zero-LLM is the default retrieval tier. The repositioning reflects what the benchmark numbers actually show — the zero-LLM path is the production moat (83.2% R@1 at $0, fully local); the LLM tiers are benchmark-tuned and held as experimental until calibration is fixed.

Rename details
  • PyPI package: cogito-ergo → fidelis

  • Import name: from cogito → from fidelis

  • CLI: cogito ... → fidelis ..., cogito-server → fidelis-server

  • Data paths kept as ~/.cogito/ for backward-compat with existing deployments

  • Env vars kept as COGITO_* for backward-compat

  • ChromaDB collection names kept as cogito_memory to avoid data loss

Default change (breaking for callers relying on default tier)
  • recall_hybrid() default tier flipped from filter to zero_llm. Callers that relied on the filter default must pass tier="filter" explicitly. Affects: fidelis recall-hybrid CLI, POST /recall_hybrid, recall_hybrid(...) Python API.

Features
  • New since parameter on /recall and fidelis recall --since — ISO-8601 timestamp filter applied after Stage 2.

Observability & reliability
  • New fidelis.telemetry module: escalation-rate log + rate() summariser. Makes the 80%-vs-10% calibration miss measurable at runtime. Crash-safe.

  • degrade.replay_queue corrupt-file branch now covered by tests.

Tests
  • tests/test_zero_llm_regression.py — 4 tests pin zero-LLM default: no filter/flagship invocation, works without LLM config, matches explicit-tier output, handles empty corpus.

  • tests/test_telemetry.py — 5 tests for the new observability module.

  • tests/test_verify_guard.py — regression pin for the documented verify-guard-inactive bug; xfail until fixed.

  • tests/test_graceful_degrade_corruption.py — replay_queue corruption.

  • Test baseline: 61 → 72 passing + 2 defensive skips.

Benchmarks (for reference, not default-path claims)
  • recall_hybrid at tier="flagship" hits 96.4% R@1 on LongMemEval_S (470 questions, runP-v35, 2026-04-18). Escalates on ~80% of queries under current calibration vs 10% intended — known limitation documented in STATUS.md and docs/RELEASE-SCOPE.md. Do not use the 96.4% number as a cost-model baseline.

  • Zero-LLM per-category R@1 (now the default): single-session-assistant 100%, knowledge-update 96%, single-session-user 95%, multi-session 83%, single-session-preference 67%, temporal-reasoning 66%.

Docs
  • README repositioned: zero-LLM leads, LLM tiers labeled experimental, per-category table published.

  • docs/THRESHOLD-AUDIT.md — pins prod vs bench escalation constants.

  • docs/RELEASE-SCOPE.md — in-scope / held-for-later with unlock criteria.


cogito-ergo era (predecessor package, retained for history)

v0.3.0 — 2026-04-16

  • New recall_hybrid path: BM25 + dense + RRF with tiered LLM escalation. Port of the architecture that reached 93.4% R@1 on LongMemEval_S (up from the 56% mem0 baseline). Superseded by v0.3.1 (96.4%).

  • New POST /recall_hybrid HTTP endpoint and fidelis recall-hybrid CLI.

  • New tiers: zero_llm (no LLM, fastest), filter (cheap rerank, default), flagship (stronger model, 4x larger snippets).

  • New env vars: COGITO_FLAGSHIP_ENDPOINT, COGITO_FLAGSHIP_TOKEN, COGITO_FLAGSHIP_MODEL, COGITO_FLAGSHIP_TIMEOUT_MS, COGITO_HYBRID_COSINE_WEIGHT. Optional [hybrid] extra for bm25s.

  • Existing /recall and /recall_b behavior is unchanged. The hybrid path is strictly opt-in.

v0.2.0 — 2026-03-28

  • Dual-pipeline recall: zero-LLM recall_b (RRF multi-query) feeds recall (integer-pointer LLM filter)

  • Snapshot layer for high-fidelity context injection

  • Combined eval harness (bench/)

  • Technical extraction prompt baked into default config (no external prompt file needed)

  • Qwen3/qwen3.5 support via native Ollama /api/chat with think:false

v0.0.5 — 2026-03-28

  • Fixed benchmark attribution: qwen3.5:2b filter model (not claude-haiku-4-5)

  • Added Hermes Labs PyPI metadata (author, homepage, keywords)

  • Added agents.md for AI agent discoverability

  • Updated llms.txt with full API shapes and integration notes

  • Added "Built by Hermes Labs" ecosystem section to README

v0.1.0 — 2026-03

  • Initial two-stage integer-pointer recall pipeline

  • mem0 + ChromaDB vector store backend

  • HTTP server with /recall, /add, /snapshot endpoints

  • fidelis calibrate for vocab map generation

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