A new protocol for AI coding agents to collaborate across sessions and computers: 'agent-comms'
The open-source 'agent-comms' answers the chronic problem of AI coding agents whose memory resets when a session closes, using work-context capsules and a WebSocket relay. It is a new project, so this post separates what has been verified from what is still missing.
Agents whose memory resets when a session closes: how do we fix that?
If you use AI coding agents like Claude Desktop, Antigravity or Cursor, you run into the same inconvenience. When you open a new session partway through the same task, or move to another computer, the agent forgets the context it had picked up so far, and you end up explaining everything from the beginning again, over and over. The open-source project agent-comms is a toolkit that puts forward a solution to exactly this problem.
The core idea is simple: copy the agent's "knowledge in its head" into a file and carry it into the next session or another computer. On top of that, the project adds a mesh for real-time multi-agent collaboration and organizes the whole thing as a protocol called the Agent Handover & Relay Protocol (hereafter AHRP).
Two solutions for two chronic problems
The developer splits the problem the project is trying to solve into two broad parts. One is context loss between sessions. When you start a new chat or switch devices, the agent's working memory and judgment are reset.
The other is multi-agent coordination. It is hard for agents running on different computers to exchange state or split up work.
Each problem has its own tool.
Context Capsule (out-of-session handoff) is a mechanism that moves work state outside the session. It bundles the task roadmap the agent set up, the architecture decisions it adopted, the hypotheses it tried and discarded, and even uncommitted git diffs into a small, portable bundle, then generates a briefing so the next session can pick up right away while saving tokens. Its distinguishing feature, according to the README, is that it puts working-tree changes into the bundle without polluting the git commit history.
AHRP Live Relay (in-session collaboration) is a channel that connects multiple agents in real time. A lightweight WebSocket-based relay server mediates peer discovery, publish/subscribe messaging and cross-computer remote procedure calls (RPC). A single agent-comms demo command launches a demo in which two agents on the same network discover each other and communicate in real time, and the README says it supports multi-device testing across Windows, macOS and Linux. I could not confirm whether the experiment records are public.
Why this protocol is needed now
Many tools are already taking on agent-to-agent communication. The limits of existing approaches, as the developer lists them in a comparison document, are clear.
Microsoft's AutoGen Core is strong at distributed communication, but it is held back by framework lock-in: every agent has to use the AutoGen runtime. Mixed setups, such as an Antigravity agent on a laptop and a Claude agent on a remote server, are hard to connect naturally, and it does not manage working-tree state or uncommitted diffs. LangGraph is strong at persisting state outside the session through checkpoints, but it needs a central database, and its schema is not one that spans heterogeneous agents.
From the standard-protocol angle, MCP (Model Context Protocol) has emerged as the de facto standard for connecting agents and tools. But its original design is one-way, from agent to tool, so it has no semantics for agents talking to each other as peers or for handling task graphs and git patches. Handing work off through a git branch is the common approach, but it has the weakness that abandoned reasoning paths and uncommitted hypotheses disappear. The key to agent-comms is closing this gap with a combination of an open-schema capsule and a real-time relay.
Three kinds of memory inside the capsule
AHRP's Context Capsule consists of one JSON document and a markdown briefing that both people and agents can read. The state to be carried over is stored in three layers.
The epistemic state comes first. What the agent learned while exploring, verified facts, hypotheses it tried and discarded, requirements such as environment variables or compiler versions, and constraints that prevent repetition are each recorded under categories such as finding, rejected, gotcha, environment and constraint.
Next is the procedural state, which holds the goal, the subtasks that are done or in progress, and the exact instruction for what to do next. Last is the physical workspace state, where modified files, uncommitted diffs and newly created untracked files are bundled in as actual patches.
Thanks to this structure, it is much lighter than sending the conversation history between agents as is. The comparison document points out that an agent exploring a codebase can produce raw logs of 50,000–150,000 tokens, and it insists that handing all of that over is both a token bomb and a source of context degradation.
How to use it
Below is the usage flow from the repository README. I did not run it myself for this post. You can install it by cloning the repository from GitHub and running pip install, or with a one-line script. Before you end a session, use the capsule pack command to leave the task ID, a summary, the next task and lessons learned.
agent-comms capsule pack \
--task "AUTH-01" \
--summary "Migrated auth module to JWT; integration test pending" \
--next "Run pytest tests/test_auth.py" \
--learning "finding:PyJWT requires algorithms=['HS256']"
Calling capsule unpack "AUTH-01" on another computer restores the uncommitted files and the work briefing. In Claude Desktop, Claude Code, Antigravity and Cursor, you can attach it as an MCP server, so a handoff happens just by asking, in natural language, to save the progress on AUTH-01 as a capsule.
What stage is it at now?
Honestly, this project is still at the seed stage. When I checked the repository's front page, it showed an MIT license, 1 star, 20 commits and no release tag. It is early code from a single developer, and the README had no section on limitations. I could not confirm the identity of the repository owner, and this post only carries over what is written in the README and in the spec and comparison documents.
Things to weigh before adopting it
The first thing that stands out is where the comparison document comes from. The document that lays out the limits of AutoGen, LangGraph, MCP and git handoffs lives inside the agent-comms repository. That means the person who evaluated the competing tools is the author of this tool, so it is safer to read each assessment as a summary from the author's side. In particular, figures such as the 50,000–150,000 tokens the document cites are only a statement that an agent exploring a codebase can easily reach that much, not a benchmark with stated measurement conditions.
The second is what goes into the capsule. The capsule bundles uncommitted git diffs into patches as they are. If API keys or .env values are mixed into the code you are working on, those values can end up in the bundle too, and the moment you move the bundle to another computer, where it is stored and who can access it become new things to manage. The README does not seem to explain relay authentication or encryption. The spec document mentions bearer-token authentication on the WebSocket handshake and TLS termination at a reverse proxy. But there is no explanation of end-to-end encryption of the capsule contents themselves, so you have to check that yourself before opening the relay outside a private network.
The third is conflicts at restore time. With a git branch, git tells you about conflicts, but a capsule unpacks a patch into the working tree on another computer, so what happens when the original has changed in the meantime matters. I could not confirm this in the documents.
It is worth trying under these conditions: what your team misses most in the next session is the "this approach doesn't work" record an agent gains through trial and error, and you use the tool only inside a trusted personal network. Conversely, for a repo shared by many people or a working folder with a lot of secrets, it is better to wait until there is an official release and a security explanation.
If you want to check the actual code, look at the README of the agent-comms repository and the AHRP protocol spec.
Reference links
Related posts
The open source tool teaching AI agents to 'write less', ponytail
ponytail is an open source tool that teaches AI coding agents YAGNI-based minimalism. Benchmarks show 54% fewer LOC, 22% fewer tokens, and maintained safety, with install guides and tunable commands.
A new framework for AI agent evaluation: what the Agent Behavior standard says
The Agent Behavior standard, which documents the repeated behavior of AI agents and uses it as an evaluation criterion, has been released. A distinguishing feature is its open format, which helps you evaluate the behavior of long-running agents, hard to capture with a single performance metric, by splitting it into a flow of verification, judgment, execution and recovery.
OpenVINO First Run: CPU Match Check Was 0
OpenVINO 2026.4.1 in an offline ARM64 sandbox passed CPU compile (23.737ms median), yet cpuInferOk was 0 in all 5 runs and GPU compile hit RuntimeError; compares standalone vs backend criteria.
Written by AI from public sources; numbers and claims are checked against those sources before publishing.