Give Your Coding Agents a Memory That Belongs to You
Funes is an open-source Hugging Face tool that transforms coding agent session logs into a searchable, portable memory layer. With a single command, it indexes agent turns locally, provides recall and get tools with full provenance, and supports cross-agent memory for Claude Code, Codex, pi, and Hermes. Memory can sync to a private Hugging Face dataset you own.
If you use coding agents like Claude Code, Codex, pi, or Hermes, you have probably run into the same frustration: an agent solved a hard problem last month, and now nobody—including the agent itself—can find the reasoning behind that decision. Funes, an open-source tool from Hugging Face, fixes this by turning the session logs your agents already generate into a searchable, portable memory layer. This article walks through how it works, why it beats simple session logs, and what makes it different from yet another hosted service.
Traces Are Everywhere, But They Are Not Memory Yet
Earlier this year, the article Software Forgets: Agent Traces Are the Memory made a compelling point: coding agents already record everything worth keeping. As they explore a codebase, try and abandon approaches, hit errors, read documentation, and pivot, they leave a detailed trail of not just what changed, but why it changed.
The diagnosis is right, but there is a gap between a trace and a memory. Session logs are just an archive sitting on disk. You cannot grep your way to an answer for "why did we abandon the streaming parser?" across ten thousand conversation turns. For an agent to actually use this material while working, the traces need indexing, retrieval, ranking, and precise provenance—and that is exactly what funes provides.
Funes is a durable memory layer for agents that works locally, is built from sessions already on your machine, and drops into your agent's normal workflow with a single command. If you choose, it can also sync to a Hugging Face dataset you own, private by default.
One Command Adds Memory to Your Existing Agent
Funes ships as a single binary. Its default inference backend has no ML runtime dependency, and both embedding and reranking happen on your own machine. You install it, then attach it to an agent with the `add` command.
That single command does three things: it builds the initial index, gives the agent `recall` and `get` tools, and sets up automation that indexes each completed turn. Indexing is incremental—new runs only embed new turns rather than reprocessing the entire history—and older content backfills in bounded steps.
From that point on, you simply work. When a task touches a past decision, piece of rationale, or finding, the agent reaches for `recall` on its own. You never need to remember which old session held the answer or paste context forward by hand.
The `recall` tool returns the original text, not a summary, and shows exactly where it came from: the agent, timestamp, session, and turn. Every result includes a `get` command that opens the full turn plus its surrounding context.
Under the hood, one deterministic pipeline parses every supported trace format into the same turn-and-block shape, chunks it, embeds it with a pinned local model, and writes everything to a local Lance dataset. A query blends vector and BM25 search, fuses the rankings, reranks candidates with a cross-encoder, reweights by recency, and attaches neighboring chunks.
Three properties follow from this design:
- One memory across agents. Claude Code, Codex, pi, and Hermes all write the same shape, so `recall` spans their histories, and every hit names which agent produced it.
- Raw evidence stays intact. Nothing is distilled into a "fact" at write time, so any result can lead back to the turn that produced it.
- Local by default. No account or Hub repository is required. No hosted model processes your sessions during indexing; embedding and reranking run locally, and your coding agent does the reasoning.
That solves the "agent as a stranger" problem on one machine. But memory gets more useful when the next agent runs somewhere else.
Your Memory Is a Dataset, Not a Service
To make a memory travel with you, bind one when adding funes to an agent. The `bind` command publishes your current memory, after which funes keeps it current—indexing each turn locally and publishing at session boundaries—while the agent recalls from it throughout. Run the same command on another machine and the memory follows you.
Technically, your local memory is a Lance dataset and the shared memory is a Hugging Face dataset (private by default) that you own.
Security is handled in two passes. Credentials are redacted during indexing before anything reaches the Hub, and publishing then rescans every chunk and withholds anything that still resembles a secret. The scanner is documented in SECURITY.md, including what it does and does not cover.
When an agent reads a remote memory, funes caches the dataset files locally, so warm queries return to local speed. The Hub provides ownership, access control, versioning, and distribution—the same services it already provides for other datasets. Your memory never becomes an account in a separate service you rent back through an API.
Ask First, Wire Later
`recall` is designed for agents, but you can query a memory yourself with `ask`. By default it reads your local memory, or you can point it at a shared one. The team published a memory of funes' own development, so you can ask why the tool works the way it does without building a memory first.
`funes ask` is the read-only, one-question sibling of `funes add`: it retrieves passages, hands them to a coding agent, and returns a grounded answer that names its sources. It installs no integration and changes nothing about the agent's persistent setup.
Notably, a retrieval miss is not papered over. If the passages do not support an answer, the agent says so. You can rephrase, or add funes to the agent so it can search the memory iteratively during normal work.
Switching Agents Without Losing the Thread
A shared memory is not tied to the agent or model that created it. Start a task in Claude Code, continue it in Codex a week later, and the second agent recalls the first agent's reasoning. This matters at several scales:
- Across machines. Bind each agent to one memory and recall the history from whichever host you are on.
- Across a team. A new teammate's agent can retrieve months of decisions on day one, including dead ends and rationale that never made it into a pull request.
- Alongside an open-source project. A maintainer can publish the sessions behind a release and reference them on the push—a searchable CLAUDE.md that holds the project's history rather than a page someone must keep rewriting. Anyone can read a public memory with `--memory`.
Published memories carry a dataset card and the funes tag, making them discoverable on the Hub. The Hub already hosts open weights and datasets; funes adds open working memory, queryable by another agent and traceable to the sessions that produced it.
The Cheapest Way Out of a Long Session
A long investigation bloats a session until each turn costs more to carry context than to do work. The usual answers are letting the agent compact and carry on, or writing a handoff and starting fresh. Recall is a third option, so the team measured all three on the handoff-vs-recall benchmark: two tasks whose answers cannot be reconstructed without prior session knowledge.
Compaction was the only approach with divided results—it succeeded on one task and never arrived on the other, because its summary flattened the findings that mattered. Recall returns the passages themselves, so a finding never has to survive summarization.
Recall was also the cheapest of the three on both tasks: 8x cheaper than a written handoff on one and 4x on the other.
Stop Starting From Zero
"To think is to forget differences, generalize, make abstractions." — Jorge Luis Borges, Funes the Memorious
Your agents already wrote the record. Funes lives at github.com/huggingface/funes, one command away from turning that record into a memory the next agent can read—on whichever machine you happen to be on.
Built on open source: funes invents little of this itself. It leans on open-source embedding models good enough to run locally, on Lance's append-only datasets with cheap incremental writes, and on the Hub's caching and content-dedup for datasets. The real work was fitting them into a memory an agent can actually use. Funes is open source too—open an issue for anything from an install snag to a missed recall, or an agent you would like supported.

Comments (0)