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/full-reference.md

Fidelis Memory 0.3.0rc1 reference

Install and run

python3 -m pip install "fidelis-memory==0.3.0rc1"
ollama pull nomic-embed-text
fidelis init
fidelis mcp install --client codex

Use fidelis-server for foreground operation. Default HTTP address: http://127.0.0.1:19420. Both client and server honor FIDELIS_PORT before the legacy COGITO_PORT. The MCP stdio command is fidelis mcp serve (or fidelis-mcp). It discovers tools without loading the memory store.

Record model

A record contains original text and a stable ID. The service sets recorded_at; the caller may declare valid_from, valid_to, event_at, source, and supersedes IDs. Corrections create new records. Earlier records remain available and receive temporal status such as superseded, expired, or not_yet_valid. Declared dates and links are not independent verification of truth.

as_of excludes records with a known recorded_at later than the requested instant, ignores later correction links, and evaluates validity at that instant. Backdating validity does not backdate recording time. Legacy records with unknown recording times remain visible and are labeled unknown; they cannot establish what the system knew at a particular earlier time.

HTTP endpoints

JSON POST requests use Content-Type: application/json.

EndpointRequestBehavior
GET /health—Version, availability, store/queue state; does not require eager model boot
POST /store{"text":"fact"}Verbatim write; optional temporal fields, ID and metadata
POST /query{"text":"question","limit":5}Fast local vector search with temporal presentation
POST /get{"id":"record-id"}Full record and correction chain
POST /recent{"limit":10,"kind":"all"}Latest recorded entries; kind:"corrections" selects replacements
POST /recall_hybrid{"text":"question","limit":5,"top_k":5,"tier":"zero_llm"}Explicit hybrid retrieval
POST /recall_b{"text":"question","limit":5}Legacy decomposed zero-LLM retrieval
POST /recall{"text":"question","limit":5}Legacy retrieval with optional configured LLM filtering
POST /add{"text":"raw material"}Optional model extraction; separate from verbatim store
POST /replay{}Request queued-write replay

Retrieval requests accept as_of as an ISO-8601 timestamp. The normal current view retains historical records with explicit labels; callers should inspect status, not assume every hit is current. Limits bound the result count.

Example correction through HTTP:

{"text":"The Atlas release window starts at 10:00 UTC.","supersedes":["earlier-id"],"valid_from":"2026-02-01T00:00:00Z"}

The supersedes target must exist in the configured namespace. HTTP clients should check both status codes and response bodies. Memory operations can return 503 when the backing store cannot load; health/discovery remain available.

Read-only CLI browsing

The CLI exposes the same bounded /recent and point-lookup /get paths. These commands require a running fidelis-server and do not load or scan the store in the client process.

fidelis recent
fidelis recent --limit 20 --kind corrections --since 2026-09-01T00:00:00Z
fidelis get RECORD_ID

recent accepts a limit from 1 to 50 and kind as all or corrections. Human-readable output includes stable IDs, record text, timestamps, temporal status, sources, and correction links when present. Add --raw to either command to print the service JSON payload for scripting. An unavailable service, invalid request, or unknown record exits nonzero with an explicit error.

Write acknowledgements

  • stored: the write landed.

  • duplicate: an identical existing record was found; no new record was written.

  • rejected: screening or validation refused the write.

  • queued: the write is durably awaiting replay; it has not landed in the store.

Temporal declarations matter to identity: repeating text with different validity or correction declarations is not necessarily an identical write. A rejected secret must not be treated as safely retained elsewhere. Screening recognizes common secret patterns and obvious noise, not all sensitive information.

Optional /add extraction may preserve input verbatim if extraction returns no facts. Read degraded in the response; successful storage does not prove that model extraction succeeded.

MCP contracts

Exactly six tools are exposed: fidelis_recall, fidelis_store, fidelis_correct, fidelis_get, fidelis_recent, fidelis_health.

  • Recall requires query, defaults to limit:5, and accepts mode:"fast" or mode:"thorough". Fast calls /query; thorough calls /recall_hybrid with tier:"zero_llm". It does not silently escalate to a generative model.

  • Store accepts text and optional temporal/source metadata.

  • Correct takes the old id and replacement text. Already-superseded IDs are refused unless the caller explicitly chooses force:true.

  • Get takes id and returns the full record plus correction links.

  • Recent accepts limit, kind (all or corrections), and optional since.

  • Health reports availability; a lazy, unloaded store is not an empty corpus.

The old four-tool surface and cogito_* compatibility tool names are retired. Reconfigure standing instructions and restart MCP clients on upgrade. JSON-RPC batches are accepted only when the negotiated protocol supports them (2025-03-26); malformed input must not terminate the stdio service.

Retrieval architecture

The default MCP path is a bounded vector search, followed by temporal/status handling. It uses the local nomic-embed-text model; zero-LLM means no generative model, not an absence of learned embeddings or local compute.

Thorough retrieval assembles candidates using multiple dense subqueries and, with the hybrid extra, applies BM25 within that candidate pool. It merges rankings through reciprocal rank fusion; BM25 does not independently search the entire corpus. Without BM25 the dense path remains available. Install the extra with:

python3 -m pip install "fidelis-memory[hybrid]==0.3.0rc1"

Legacy optional filter/flagship tiers can call configured model endpoints. They are not the default MCP modes. Historical benchmarks of those pipelines must not be attributed to the redesigned fast path. Full QA evaluation is deferred.

Local configuration and boundaries

Environment variables override file configuration. fidelis-server --config PATH selects an explicit JSON config; otherwise .cogito.json then ~/.cogito/config.json are searched.

  • COGITO_STORE_PATH: vector store directory, default ~/.cogito/store.

  • COGITO_COLLECTION: Chroma collection.

  • COGITO_USER_ID: local namespace, not authentication.

  • FIDELIS_QUEUE_DIR / COGITO_QUEUE_DIR: queue directory.

  • COGITO_OLLAMA_URL: embedding/model service endpoint.

  • COGITO_EMBED_MODEL: embedding model; keep one model per collection.

  • FIDELIS_RETRIEVAL_TELEMETRY_LOG: optional retrieval diagnostics location.

Never expose the local HTTP service to untrusted networks. Local data is not application-encrypted. Back up the entire configured store and queue before an upgrade; preserve the old environment for rollback. See SECURITY.md.

Native Gemini extension

Alternatively, install the release-pinned native extension:

gemini extensions install https://github.com/hermes-labs-ai/fidelis --ref=v0.3.0rc1

gemini-extension.json pins the same PyPI package as the MCP registry manifest.

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