--- title: "Invariant: shared memory for research agents" description: "Invariant runs Claude Code agents from several people on one research question. past.dev is their shared memory of papers, results and sessions." canonical: https://past.dev/blog/projects/invariant last-updated: 2026-11-18 --- # Invariant: shared memory for research agents Projects, November 17, 2026. The past.dev team. Abay Bektursun and Ali Rad built Invariant with a third teammate at the Iterate AI Research Hackathon. In Invariant, several people and their Claude Code agents work on one research question as one team. Before an agent starts work on an idea, it asks a shared memory on past.dev whether the team already read or tried it. Demo video: [Invariant demo video](https://www.youtube.com/watch?v=njOn-79axbc). The demo video of the Invariant team. The preview image shows the page of one finding on the team site. - Built by: Abay Bektursun ([GitHub](https://github.com/abaybektursun), [LinkedIn](https://linkedin.com/in/abay), [X](https://x.com/abaybektursun)), Ali Rad ([GitHub](https://github.com/frustea), [LinkedIn](https://www.linkedin.com/in/alierad/)) - Event: [Iterate AI Research Hackathon](https://iterate.inc/ai-research), Wefunder, San Francisco, November 14 and 15, 2026 - Live site: https://invariant.team - Code on GitHub: https://github.com/abaybektursun/iterate-hack ## The project Invariant is a set of tools and rules for a research team of AI agents. Several people run Claude Code agents and their subagents on one research question. The rules for all the agents are in one file, [AGENTS.md](https://github.com/abaybektursun/iterate-hack/blob/main/AGENTS.md). The file has the rules to claim a task, to post a result, and to check a new idea against the memory of the team. At the hackathon, the question was: how much of the gain from RL training can a base model reach with no training? The team used the Olmo 3 base model from AI2 and its RL-Zero-Math version, which AI2 trained with RL on math. MATH-500 is a set of 500 math problems. With no training, the best score of the base model on this set is 93.2%. The best score of the RL model is 95.0%. But each model got its best score with different settings. With the same settings for both models, the RL model solved 475 of the 500 problems and the base model solved 450. This is a gap of 5.0 points. Many agents read papers and run GPU jobs at the same time. If two agents read the same paper or test the same idea, the team loses time and compute. A board in DynamoDB holds the exact state of the work: open tasks, ideas, results and votes. An agent claims a task on the board before it starts. The memory on past.dev answers a different question: did the team already read or try this? Each agent asks this question in different words, so the team needs a search by meaning that returns dated sources. ## How the memory works Invariant calls the past.dev REST API from one file, [past.py](https://github.com/abaybektursun/iterate-hack/blob/main/tools/past.py). It uses two endpoints: `POST /api/v1/ingest` to write and `POST /api/v1/recall` to read. Each person has one `identity`, and all the agents of that person read with it. The two scripts that write, paper.py and board.py, send no `identity` and no `audience`. So each identity can read all the records of the team. The past.dev plugin for Claude Code also writes each session to past.dev when the session ends. | What goes into memory | Who writes it | When | |---|---|---| | Each finding from a paper, with a quote | A subagent that reads the paper | After it reads the full paper | | Each board post of the kind "result" or "knowledge" | The main Claude Code agent of a person, through `tools/board.py` | When the agent posts it on the board | | The typed prompts and the replies of a session | The past.dev plugin for Claude Code | When the session ends | ### Each finding has a quote and the date of the paper A subagent reads one paper in full. Then it writes each finding with [paper.py](https://github.com/abaybektursun/iterate-hack/blob/main/tools/paper.py). If the quote is not in the text of the paper, the script stops with an error. The `timestamp` of the record is the date of the paper. This is a simplified version of the write in paper.py: ```python call("POST", "ingest", { "id": finding_id, "label": f"{title}, {where}", "content": f"{title} ({date}, {url})\n" f"{where}: {finding}\nQuote: \"{quote}\"", "timestamp": f"{date}T00:00:00Z", # the date of the paper "metadata": {"paper": paper_id, "who": who}, }) # no identity and no audience ``` ### Agents search the memory before they start work on an idea AGENTS.md has this rule: before an agent starts work on an idea, it runs `python3 tools/recall.py "{the idea}"`. [recall.py](https://github.com/abaybektursun/iterate-hack/blob/main/tools/recall.py) sends one recall and asks for 2,000 tokens at most. It prints each result with its date and its source. The plugin can also recall automatically, but the team turned this off, so that the context of each agent stays small. ## What memory changed No agent ran without memory, so the team did not measure the effect of memory on the research result. The team describes what the memory returned and what the agents did next. In the nine hours after the first recall, the agents and the scripts of the team sent 571 recalls. ### A finding from a teammate changed the reading plan of Abay's agent A teammate's agent posted a finding about one paper. About 5.5 hours later, Abay's agent found this post in the memory. So Abay's agent left that paper out of its reading plan. 1. A teammate's agent: Reads the Goodfire paper "Neurons as an Interpretable Basis" in full. At 21:45 UTC on November 14, it posts the finding on the board. 2. A teammate's agent: The same command sends the post to past.dev. Record: `board:knowledge-e6bc68`. 3. Abay's agent: Asks the memory about Goodfire papers on interpretability, at 03:13 UTC on November 15. 4. past.dev: Returns the teammate's post, with its date and its source. Record: `board:knowledge-e6bc68`. 5. Abay's agent: Opens the post on the board 11 seconds later. 6. Abay's agent: At 03:14 UTC, starts to read the Goodfire papers from the last six months. It leaves out the paper from step 1, because the team already read it. The read at 03:13 UTC on November 15. Source: the demo data and the README of the team. ### Recalls showed earlier work before agents repeated it The page of the team about past.dev also shows these three reads. The team took them from the Claude Code transcripts of its agents. RLVR is RL with verifiable rewards. | Time (UTC) | The agent asked about | past.dev returned | What the agent did next | |---|---|---|---| | Nov 14, 21:31 | The paper "On the Direction of RLVR Updates for LLM Reasoning" | A record from a teammate that names this paper | It saw that ten papers were already in the memory, so it searched only for other papers | | Nov 15, 02:16 | Whether the base model can match the RL model if it samples from a sharper distribution | A finding from the same paper, written by the agent of a teammate | It wrote that its first idea was already published, and it checked a second idea | | Nov 15, 03:27 | An idea: the RL model writes the first tokens, then the base model continues | A finding about a close method, from the paper "Sparse but Critical" (arXiv 2603.22446) | It dropped the idea before any GPU job | ### Recall returned all 20 known answers inside 2,000 tokens The team tested 20 questions with a known answer. Each answer is a score from a post on the board. For each question, the team ran one past.dev recall and one grep over 271 session transcripts (446 MB). The test counts an answer as found only if the score is in the first 2,000 tokens of the output. | Method | Answer inside the first 2,000 tokens | |---|---| | past.dev recall (20 questions) | 20 of 20 | | One grep over the transcripts (20 questions) | 6 of 20 | The recall test of the team. One square is one question with a known answer from the board. At the median, one recall returned 1,985 tokens. The grep had the answer somewhere in its output for 17 of the 20 questions. But at the median, one grep returned 121,074 tokens. NOTE: The team lists the limits of this test. It is one run of 20 questions from a template. The test checks only the output of the search, and no agent used this output to answer. Also, the two methods searched different data: the grep searched session transcripts, and the recall searched the records of the team in past.dev. ### The team lists the limits of the memory - If the team had no work on the subject of a question, recall still returned records with a loose relation to the question. The agent had to judge these records. - For one question about one experiment of the team, recall put two papers above the result of the team. - A new record was ready for recall after about 1 minute. On Saturday night, with 30 to 40 records in the queue, the delay was 10 to 15 minutes. - The team posted a corrected number as a new board post. Both versions stay in the memory, and in the test, recall returned the first version. ## Try Invariant 1. Open [invariant.team](https://invariant.team) and select Read the findings. 2. Open [the team page about past.dev](https://monitor.invariant.team/pastdev) to see a replay of four recalls. 3. Read [recall.py](https://github.com/abaybektursun/iterate-hack/blob/main/tools/recall.py) and [paper.py](https://github.com/abaybektursun/iterate-hack/blob/main/tools/paper.py) to see each call to past.dev. To give agents one shared memory, start with the [quickstart of the Memory API](/docs/memory-api/quickstart). Thank you to Abay, Ali and the whole Invariant team for building with past.dev at the hackathon.