{"slug": "give-your-coding-agents-a-memory-you-own", "title": "Give Your Coding Agents a Memory You Own", "summary": "Hugging Face released funes, a durable memory layer for coding agents that indexes and retrieves session traces locally, supporting Claude Code, Codex, pi, and Hermes. The tool, available as a single binary, provides recall and get tools, uses a deterministic pipeline with local embedding and reranking, and can optionally sync memory to a private Hugging Face dataset. It addresses the problem of agents forgetting past decisions by making traces searchable and actionable.", "body_md": "Traces • Updated • 41 • 448\n\n# Give Your Coding Agents a Memory You Own\n\n[Update on GitHub](https://github.com/huggingface/blog/blob/main/funes.md)\n\nEarlier this year, [ Software Forgets: Agent Traces Are the\nMemory](https://huggingface.co/blog/huggingface/agent-traces-as-memory) made the case\nthat coding agents already produce the record we keep losing. As they search a\ncodebase, try approaches, hit errors, read documentation, and change direction, they\nleave behind a dense account of not just\n\n*what*changed, but\n\n*why*.\n\nWhile the diagnosis is correct, traces are only potential memory. The session logs of\nan agent are still just an archive. You cannot `grep`\n\nyour way to *“why did we move\noff the streaming parser?”* across ten thousand turns. For an agent to use those traces\nwhile it works, they need indexing, retrieval, ranking, and exact provenance.\n\nThat is what [funes](https://github.com/huggingface/funes) provides. It is a durable\nmemory layer for your agents (Claude Code, Codex, pi, and Hermes). It is built from the\nsessions already on your machine. It works locally and becomes part of your agent's\nnormal workflow with one command. When you want it to, it can also travel to a Hugging\nFace dataset you own, private by default.\n\n## Add memory to the agent you already use\n\nfunes is a single binary. Its default inference backend has no ML runtime dependency,\nand embedding and reranking happen *on your machine*. Install it:\n\n```\ncurl -fsSL https://huggingface.co/buckets/huggingface/funes/resolve/install.sh | sh\n```\n\nThen add it to an agent:\n\n```\nfunes add claude    # or: codex, pi, hermes\n```\n\nThat one `add`\n\ncommand builds the first index, gives the agent `recall`\n\nand `get`\n\ntools, and installs the automation that indexes each completed turn. Indexing is\nincremental, with new runs adding new turns rather than embedding the whole history\nagain. The older and deeper content can backfill in bounded steps.\n\nFrom there, you just work. When a task touches a past decision, rationale, or finding,\nthe agent can reach for `recall`\n\nitself. You do not need to remember the old session or\npaste its context into the new one.\n\nWith funes added, recall happens inside the conversation. The agent reaches for its memory on its own and names the session behind its answer.\n\n`recall`\n\nreturns the original text, not a summary, and shows exactly where it came from\n(the agent, timestamp, session, and turn). Each result includes a `get`\n\ncommand that\nopens the full turn and its surrounding context.\n\nUnderneath, one deterministic pipeline parses every supported trace into the same\nturn-and-block shape, chunks it, embeds it with a pinned local model, and writes it to\na local **Lance** dataset. A query combines vector and BM25 search, fuses their\nrankings, reranks the candidates with a cross-encoder, reweights them by recency, and\nattaches neighboring chunks.\n\nThat design gives funes three important properties:\n\n**One memory across agents:** Claude Code, Codex, pi, and Hermes all write to the same shape.`recall`\n\nspans their histories, and every hit says which agent produced it.**Raw evidence stays intact:** Nothing is distilled into a fact at write time. A result can always lead back to the turn that produced it.No account or Hub repository is required. A hosted model does not process your sessions for indexing; embedding and reranking run on your machine, and your coding agent does the reasoning.`recall`\n\nis local by default:\n\nThe *agent as a stranger* problem is already solved on one machine. But memory gets\nmore useful when the next agent is running somewhere else.\n\n## A memory is a dataset, not a service\n\nTo make a memory follow your work, bind one when you add funes to an agent:\n\n```\nfunes add codex acme/funes-memory\n```\n\nThe bind publishes your current memory there. funes then keeps it current, indexing each turn locally and publishing at session boundaries. The agent recalls from it throughout. Run the same command on another machine and the memory follows you there.\n\nUnderneath, the local memory is a Lance dataset, and the shared memory is a Hugging Face dataset (private by default) you own.\n\nBefore anything reaches the Hub, credentials have already been redacted during\nindexing. Publishing then scans every chunk again and withholds anything that still\nlooks like a secret. The scanner behind this is documented in\n[ SECURITY.md](https://github.com/huggingface/funes/blob/main/SECURITY.md), including\nwhat it does and doesn't cover.\n\nWhen an agent reads a remote memory, funes caches the dataset files locally, so warm queries return to local speed. The Hub supplies the ownership, access control, versioning, and distribution it already supplies for other datasets. Your memory does not become an account in a separate memory service, and you do not rent it back through an API.\n\n## Ask first, wire later\n\n`recall`\n\nis shaped for agents. When you want to put a question to a memory yourself,\nuse `ask`\n\n. It reads your local memory by default:\n\n```\nfunes ask claude \"what did we decide about the streaming parser\"\n```\n\nOr point it at a shared memory. We published a\n[memory](https://huggingface.co/datasets/huggingface/funes-memory) of funes development,\nso you can ask why funes works the way it does without creating a memory of your own:\n\n```\nfunes ask claude \"why is funes append-only\" --memory huggingface/funes-memory\n```\n\n`funes ask`\n\nis the read-only, one-question sibling of`funes add`\n\n. It recalls the passages, hands them to a coding agent, and returns a grounded answer that names its sources. It does not install an integration or change the agent's persistent setup.\n\nA retrieval miss is not papered over. If the passages do not support an answer, the agent says so. You can rephrase the question or add funes to the agent so it can search the memory iteratively during normal work.\n\n## Switching agents without losing the thread\n\nA shared memory is not tied to the agent or model that created it. Start a task in Claude Code, continue it in Codex next week, and the second agent can recall the first agent's reasoning. Use pi with a local model or one served through the Hugging Face router, then return to Claude.\n\n*Claude makes a decision; a hook indexes it; Codex recalls it in another session. The\nolder hits in the demo are earlier recordings of the same experiment: an append-only\nmemory remembered the rehearsals too.*\n\nThis matters in a few different scopes:\n\n**Across your machines:** Bind each agent to one memory and recall the history from whichever host you are using.**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, naming them on the push. Think of it as a searchable`CLAUDE.md`\n\nthat holds the history of why the project is the way it is, instead of a page someone must keep rewriting. Anyone can read a public memory with`--memory`\n\n.\n\nPublished memories carry a dataset card and the funes tag, making them recognizable\nand [discoverable on the Hub](https://huggingface.co/datasets?other=funes). The Hub\nalready hosts open weights and datasets. funes adds open working memory. It holds\nthe decisions, failed approaches, and rationale behind a project, queryable by another\nagent and traceable to the sessions that produced them.\n\n## The cheapest way out of a long session\n\nA long investigation bloats a session until each turn costs more to carry the context\nthan to do the work. The usual answers are to let the agent compact and carry on, or to\nwrite a handoff and start fresh. Recall is a third, so we measured them against each\nother on the [handoff-vs-recall\nbenchmark](https://huggingface.co/datasets/dacorvo/funes-handoff-recall-benchmark/blob/main/results/README.md):\ntwo tasks whose answer cannot be reconstructed without the session prior knowledge.\n\nCompaction is what most agents do by default, and it was the only one of the three whose result divided: it arrived on one task and never arrived on the other. Where it failed, its summary had flattened the findings that mattered. Recall returns the passages themselves, so a finding does not have to survive summarization.\n\nRecall was the cheapest of the three on both tasks, 8x cheaper than a written handoff on one and 4x on the other.\n\n*The lighter segment of each bar is the one-time charge for preparing the channel, the\nhandoff or the compaction, paid before the first question is asked and counted once. A\ncross marks a channel that never arrives, and so has no cost per success.*\n\n## Stop starting from zero\n\n“To think is to forget differences, generalize, make abstractions.”— Jorge Luis Borges,Funes the Memorious\n\nYour agents already wrote the record. funes lives at\n[ github.com/huggingface/funes](https://github.com/huggingface/funes), one command away\nfrom turning that record into a memory the next agent can read, on whichever machine you\nhappen to be on.\n\n## Built on open source\n\nfunes invents little of this. It leans on open-source embedding models good enough to\nrun locally, on [Lance](https://github.com/lancedb/lance)'s append-only datasets with\ncheap incremental writes, and on the Hub's caching and content-dedup for datasets. The\nwork is in fitting them into a memory an agent can actually use.\n\nfunes is open source too. [Open an issue](https://github.com/huggingface/funes/issues)\nfor anything from an install snag to a recall that missed, or an agent you'd like\nsupported.", "url": "https://wpnews.pro/news/give-your-coding-agents-a-memory-you-own", "canonical_source": "https://huggingface.co/blog/funes", "published_at": "2026-09-03 00:00:00+00:00", "updated_at": "2026-09-03 11:25:58.081015+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "machine-learning"], "entities": ["Hugging Face", "funes", "Claude Code", "Codex", "pi", "Hermes", "Lance"], "alternates": {"html": "https://wpnews.pro/news/give-your-coding-agents-a-memory-you-own", "markdown": "https://wpnews.pro/news/give-your-coding-agents-a-memory-you-own.md", "text": "https://wpnews.pro/news/give-your-coding-agents-a-memory-you-own.txt", "jsonld": "https://wpnews.pro/news/give-your-coding-agents-a-memory-you-own.jsonld"}}