Programming agents now keep a detailed record of their work: they explore code, test solutions, find errors, consult documentation, and change direction. The problem is that this record usually ends up archived, with no practical way to consult it when a related task appears.
Hugging Face proposes a solution with funes, a durable memory layer for agents such as Claude Code, Codex, pi, and Hermes. The tool turns previous sessions into local, searchable memory, with exact references to the source of each decision.
From archived traces to useful memory
Saving ten thousand conversation turns does not mean an agent can answer what happened in a specific decision. Why was a streaming parser abandoned? What error caused the approach to change? Which solution was rejected, and why?
Answering questions like these requires several pieces: indexing, search, ranking, and verifiable provenance. Funes brings that process together in a single tool and takes advantage of the sessions already stored on your machine.
Its basic installation is straightforward:
curl -fsSL https://huggingface.co/buckets/huggingface/funes/resolve/install.sh | sh
funes add claude
You can also integrate it with codex, pi, or hermes. The initial command creates the index, provides retrieval tools to the agent, and installs the automation that indexes each completed turn.
Indexing is incremental. New sessions add turns to the index without processing the entire history again, while older content can be incorporated progressively in controlled steps.
How an agent retrieves information
When a task touches on a past decision, the agent can query its memory within the conversation. You do not need to remember the session name or manually copy large blocks of context.
The recall function returns the original text, not a summary. It also shows the agent that produced the information, the date, the session, and the corresponding turn. Each result includes a get command to open the complete turn along with its nearby context.
Under the hood, funes normalizes agent traces into a common structure of turns and blocks. It then splits the content, generates embeddings with a fixed local model, and stores the data in a local Lance dataset.
The search combines several methods:
- Vector search, to find related ideas even when they do not use the same words.
- BM25, to locate relevant textual matches.
- Rank fusion, which combines the results from both searches.
- Cross-encoder, which reorders the candidates using a more precise evaluation.
- Recency reweighting, to give more importance to recent information.
- Neighboring context, which incorporates fragments close to the result found.
The result aims to balance semantic relevance, literal matching, and temporal context. This is not simply a matter of searching for a word in a log file.
A shared memory for multiple agents
One of the most interesting ideas is that the memory does not belong to a single agent. Claude Code, Codex, pi, and Hermes write in the same format, so their histories can be searched from a single memory.
You can start a task in Claude Code, continue it in Codex the following week, and let the second agent retrieve the first agent’s decisions. You can even switch between local models and hosted services without losing the reasoning accumulated so far.
This tackles an everyday problem: the agent in front of you often behaves like a stranger when faced with decisions made yesterday. Funes tries to make every new session aware of the path already taken without loading the entire previous conversation into the context.
Memory does not replace the agent’s reasoning. It gives the agent evidence so it can reason with a history that was previously hidden.
Local memory and synchronization with Hugging Face
Funes works locally by default. Indexing, embeddings, and reranking run on your machine, without a hosted model processing your sessions to build the index.
If you want to carry your memory between machines, you can link it to a Hugging Face dataset:
funes add codex acme/funes-memory
Local memory is stored as a Lance dataset, while shared memory is stored as a Hugging Face dataset, private by default. The system publishes changes at the end of each session and keeps indexing local.
On another machine, you can run the same command to retrieve that memory. The remote dataset files are cached locally, so later queries can approach the speed of a local search.
The advantage is that the Hub provides ownership, access control, versioning, and distribution without forcing you to use a separate memory service. Your history does not become an account inside a new platform or a resource you later have to rent through an API.
Security and original evidence
Before publishing information to the Hub, funes removes credentials during indexing. It then analyzes each fragment again and retains any content that still appears to be a secret.
The project documents this process in SECURITY.md, including its limitations. This is important: no secret detector should be treated as an absolute guarantee. Human review is still necessary before sharing work sessions.
The decision to preserve the original text also has practical implications. Funes does not turn every finding into a summarized data point at the moment it is saved. If an answer seems questionable, you can return to the exact turn that produced the conclusion and review the complete reasoning.
ask lets you query without installing an integration
If you only want to ask a one-off question, you can use funes ask:
funes ask claude "what did we decide about the streaming parser"
You can also query a shared memory:
funes ask claude "why is funes append-only" --memory huggingface/funes-memory
funes ask is the read-only version of funes add. It retrieves passages, gives them to a programming agent, and returns a grounded answer that identifies its sources. It does not install an integration or modify the agent’s persistent configuration.
If the memory does not contain enough evidence, the system should not invent an answer. The agent can say that it found no supporting evidence, let you rephrase the question, or suggest an integration that performs iterative searches during normal work.
What changes for teams and open projects
The value of this memory grows when it stops being individual. On a team, a new member could consult months of decisions from their first day, including approaches that were rejected and the reasons that never made it into a change request.
In an open-source project, maintainers could publish the memory behind a specific version. It would be somewhat like a CLAUDE.md that not only explains how the project works, but also why it ended up working that way.
Published memories include a dataset card and the funes tag, making them easier to recognize and discover on the Hub. The proposal expands how datasets can be used: they no longer contain only data or models, but can also preserve decisions, failed experiments, and development context.
Recall versus compaction and handoffs
Long sessions eventually become expensive. As they grow, every turn needs to carry more context, until the agent spends more resources remembering than solving. The usual responses are to compact the session or write a handoff before starting another one.
Hugging Face compared those alternatives with recall in a handoff-versus-retrieval benchmark. The evaluated tasks required prior knowledge from the session and could not be solved by reconstructing the context from scratch.
Compaction was the only one of the three options whose result was split: it solved one task, but not the other. When it failed, the summary had removed important findings. Recall, by contrast, retrieves the original passages, so a conclusion does not need to survive a synthesis.
According to the shared measurement, recall was the cheapest option in both tasks: eight times less expensive than a written handoff in one of them and four times less expensive in the other.
The idea brings to mind a phrase from Jorge Luis Borges’s Funes the Memorious: thinking also involves forgetting differences and building abstractions. For agents, the challenge is choosing what to abstract without losing the evidence that explains a decision.
A memory you can inspect and move
Funes does not build every component of its system from scratch. It relies on open embedding models that can run locally, Lance’s append-only datasets, and the Hub’s caching and deduplication functions.
The contribution lies in connecting those pieces to the real workflow of a programming agent. The goal is not to accumulate conversations for the sake of accumulating them, but to let a future session find a decision, consult its source, and continue the work.
For individual developers, this can reduce repeated research. For teams, it can preserve knowledge that would normally disappear between sessions. And for open projects, it can make visible the technical history that rarely fits into formal documentation.
The tool is open source and available on GitHub. You can report installation issues and retrieval errors or request compatibility with other agents. The question is no longer whether agents generate memory, but who can consult it, verify it, and retain control over it.
