--- title: "Shared memory for agent swarms" description: "Shared memory for agent swarms: every agent can check what the others tried, measured and ruled out, with dates and sources, in 1 past.dev project." canonical: https://past.dev/use-cases/agent-swarms last-updated: 2026-11-24 --- # Shared memory for agent swarms Source: https://past.dev/use-cases/agent-swarms past.dev is a memory API. It works as shared memory for agent swarms. Every agent in your swarm saves what it tried, what it measured and what it ruled out, all in 1 place. Before an agent starts a step, it checks what the others already did, and gets a short answer with dates and sources. So your swarm stops repeating itself, and each run starts with the lessons of the last one. ## What you build A swarm of agents that work on 1 goal: a research question, a codebase, a forecast, a security test. One agent plans. Others run experiments or write code. One reviews. They work in parallel, and you run the swarm again and again. What they share is the memory. What one agent finds in minute 1, another agent can use in minute 40. So can every agent in tomorrow's run. You can build the same swarm for cybersecurity. One agent maps the system. Others try attack paths or work through alerts. One checks each finding. With 1 shared memory, every agent can check which paths were tried, which findings are confirmed and which alerts were false. That covers this run and last month's. ## The same swarm without shared memory - **Agents repeat each other.** 2 agents test the same idea, because neither can see that the other already did. - **The orchestrator has to pass everything along.** Each sub-agent gets a summary. It only has what fit in that summary. - **The full log gets too long.** You can put the whole log in every prompt. It works for a short run. On a long run, every call costs more, and the useful lines are hard to find. - **The next run starts from zero.** An idea that failed yesterday gets proposed again today. - **Every agent can read everything.** The agent that tunes the model can also see the test scores it is supposed to be judged on. Cognition wrote about this problem for coding agents. In [Don't Build Multi-Agents](https://cognition.com/blog/dont-build-multi-agents) (June 2025), Walden Yan's first rule is to share context between agents. Sub-agents that can't see each other's work make choices that conflict. His follow-up is [Multi-Agents: What's Actually Working](https://cognition.com/blog/multi-agents-working) (April 2026). ## What past.dev changes - **Every agent can check what the others did.** An agent asks a question in plain words and gets the notes that answer it, whoever wrote them. - **Every agent reads the original notes.** Each agent saves its own findings. The others get them in full, with the author and the date. - **A short answer, every time.** An agent gets only the notes that match its question, within a token budget you set. The prompt stays small as the run gets longer. - **The lessons stay for the next run.** Everything is still there when you start again. And each idea keeps 1 current status: save it again under the same id, and the new status replaces the old one. - **You choose who reads what.** Each agent has its own identity. Put the reviewer's notes in an audience, or keep the test scores away from the agent that tunes the model. ## Measured results - **19% fewer tool calls**: A research swarm made 742 tool calls in a run with a shared memory on past.dev. Without it: 913. 5 runs with past.dev and 5 without, on 1 task of the BixBench3 biology benchmark, measured by team Hanabi. [Read the Hanabi page](/blog/projects/hanabi) - **11% lower cost**: A run of a research swarm cost $3.21 in model calls with a shared memory on past.dev. Without it: $3.60. 5 runs with past.dev and 5 without, on 1 task of the BixBench3 biology benchmark, measured by team Hanabi. [Read the Hanabi page](/blog/projects/hanabi) - **14 more answers found**: The answer was inside the first 2,000 tokens of 1 recall for 20 of 20 questions. With a text search over the session transcripts: 6 of 20. 20 questions with a known answer, measured by the Invariant team. [Read the Invariant page](/blog/projects/invariant) Each number is the team's own measurement, from its public repository. Our own results on public benchmarks are on the [benchmarks page](/benchmarks). ## Set it up with 1 prompt ```prompt Add past.dev memory to my agent swarm. Read the full instructions at https://past.dev/SKILL.md (with curl -fsSL when you can run commands) and follow them. Set it up as 1 shared memory: 1 project for the swarm and 1 identity per agent. Each agent saves what it tried, what it measured and what it ruled out, with the time it happened and a fixed id. Before each step, an agent recalls with its own identity, set in my code. An agent can recall a note once its ingestion is completed. ``` Paste it into Claude Code, Codex, Cursor or another coding agent. It follows our setup instructions and creates a project. You sign in once to keep it. ![Diagram of shared memory for an agent swarm. A planner, two experiment agents and a reviewer each write their findings to one past.dev project with an ingest call, and each reads from it with a recall call under its own identity. An audience named review holds the records that only the reviewer reads. The records of one run stay in the project for the next run.](https://past.dev/images/guides/use-case-agent-swarms.svg) *Every agent saves to the same project and recalls from it as itself. An audience limits who reads a note.* If you use a framework, the [integration guides](/integrations/crewai) show the same calls for CrewAI, LangGraph and the OpenAI Agents SDK. ## Examples - Project: [Hanabi](/blog/projects/hanabi). Sub-agents redo a biology study from raw data. They share their checks, their files and their conventions in 1 memory. - Project: [Artificial Scientist Swarms](/blog/projects/artificial-scientist-swarms). A research swarm keeps 1 note per hypothesis and updates its status as the agents test it. - Project: [Town Trial](/blog/projects/town-trial). 6 agents test a policy idea on a simulated town. They trade dated facts, each with its source. - Project: [GPU Value Scientist](/blog/projects/gpu-value-scientist). 4 agents forecast a price. Each one reads what the others found before the forecast date. - Post: [Agent swarms with a shared memory](/blog/agent-swarms-shared-memory). How 1 team gave each run its notes, and all runs their lessons. ## Frequently asked questions ### When can an agent read a note that another agent saved? As soon as its ingestion is completed. Save in batches, check that each ingestion is completed, then start the next agent. ### How do I stop one agent from reading another agent's notes? Give each agent its own identity, and put the private notes in an audience. An agent only gets back what its identity is allowed to see. ### Does this work for a cybersecurity swarm? Yes. Agents that test an application or work through alerts save each path they tried, each finding and each false positive. The next agent, and the next run, start from that list. Use 1 project per client or per system, because nothing crosses between projects. ## Related - [Coding agents](https://past.dev/use-cases/coding-agents) - [Company brain](https://past.dev/use-cases/company-brain) - [Quickstart](https://past.dev/docs/memory-api/quickstart) - [Benchmarks](https://past.dev/benchmarks) - [Projects built with past.dev](https://past.dev/blog/projects)