v0.1A local mesh for coding agents

Stop
copy-pasting
context
between
your agents.

Route a question to the agent already working in the relevant repo. Get an answer grounded in live project context. Move focused messages between local agents, not codebases.

Read the protocol
S00
None.
Servers
S01
None.
Ports
S02
Go binary.
Runtime
FIG. 01 - BEFORE / AFTERSHEET 1 / 4
Before Human-ferried contextSection A
AGENT Aweb-frontneeds schemaHUMANyoucopy / pasteFOREIGN REPOpayments-apicold-read tokensCOSThigh per hopLATENCYhuman-pacedQUALITYguesses
After Agent-to-agent via meshSection B
AGENT Aweb-frontfull / d4e5f6AGENT Bpaymentsfull / a1b2c3msg_001 askmsg_002 replyLOCAL FILESYSTEM~/.agent-mesh/myapp/nodes/a1b2c3/inbox/msg_001.jsonweb-front/.mesh/currentTRANSPORT: NATURAL-LANGUAGE JSON / NO DAEMON / NO PORT
FULL = asks and answersRESPONDER = answers onlyDOTTED = file write
FIG. 02 - Live transcript

One question. The right repo. A grounded answer.

Two local sessions / loops in browser
Terminal 1 / web-frontend~/projects/web-frontend
Terminal 2 / payments-api~/projects/payments-api
Scripted transcript / type-on renderReply consumes the original inbox query
Section 03 - Protocol
Three steps / zero infrastructure

How it works.

01
Join

Register the session as a node.

Each agent declares its project, mode, agent type, and optional capability contract. Agent Mesh writes node metadata to ~/.agent-mesh/<mesh>/nodes/<node-id>/meta.json and records the active mesh in <project>/.mesh/current.

mesh join myapp --project payments-api \--agent codex --mode full \--role "Backend API expert" \--topics "rest-api,postgres,auth"
02
Ask

Query a chosen peer.

Use mesh peers --json to inspect projects, node IDs, modes, and contracts. Then send a question to a specific project or node ID with --to. Context helps the answering agent stay concise.

mesh peers --jsonmesh ask "What is the response shape for /users?" \--to payments-api \--context "Updating frontend types"
03
Reply

The expert answers from live context.

The peer sees the query in its inbox, answers from the project state already in its context, writes the response for the asker, and consumes the original inbox message.

mesh inboxmesh reply msg_001 "UserResponse now has displayName \and createdAt. See commit abc123."
Section 04 - Topology
Hover a node for its capability contract

The mesh, observable.

payments-apiFULLweb-frontFULLshared-libRESPONDERinfraRESPONDERmobile-appSTALE
Readout / node inspector

payments-api

Mode: full

Backend API expert. REST endpoints, DB schema, auth, payments.

Topics: rest-api / postgres / auth / payments

Legend

FULL asks, broadcasts, and replies. RESPONDER answers inbox messages only. STALE is heartbeat state, not a mode.

$ mesh peers
NODE     PROJECT       MODE       STATE
a1b2c3   payments-api  full       active
d4e5f6   web-front     full       active
g7h8i9   shared-lib    responder  active
k0m1n2   infra         responder  active
p3q4r5   mobile-app    full       stale
Section 05 - Design principles
Small pieces / inspectable state

Boring. By design.

+--+
|::|
+--+

Agent-agnostic protocol

Anything that can run shell commands and read files can participate. Host integrations are convenience layers over the same mesh CLI.

[][][]
[][][]
[][][]

File-based transport

Messages are plain JSON in directories. You can inspect the system with ordinary shell tools.

x---x
| * |
x---x

Context stays local

Source code stays inside its project. Agents exchange bounded questions and answers through local files.

+------+
| role |
+------+
   |
   +-- auth
   +-- schema
   `-- billing

Capability contracts

Nodes publish roles and topic lists so other agents can choose the right expert before sending a query.

[R]
 |
[R]

Responder mode

Stable projects can answer questions without initiating asks or broadcasts of their own.

> * <
  |
 [ ]

Human-in-the-loop

Inbound questions are visible. Teams can decide when agents answer automatically and when a person reviews.

Section 06 - Quick start
Install once / connect repos in plain English

Connect repos. Let your agents talk.

Install Agent Mesh once. Then open a supported coding agent in each repo and tell it what that project knows. Your agent handles the local registration.

01
Once per machine

Install Agent Mesh.

Choose a binary install path once. The release installer is the fastest route; Go is available when you prefer to build from source.

You → terminal / release installer
curl -fsSL https://raw.githubusercontent.com/mertbarutcuoglu/agent-mesh/main/install.sh | shmesh --version

Both options install the local mesh binary used by supported coding agents.

02
In your first repo

Tell your agent what it knows.

Open Codex, Claude Code, Pi, or another supported agent in the project. Give it a shared mesh name and the expertise it should advertise.

You → Codex / payments-api

Join the acme-dev mesh for this repo. You are the backend expert for auth, payments, and Postgres.

Use the same mesh name for every repo that should be able to communicate.

03
In your next repo

Join, then ask.

Open an agent in the second repo. It can join the mesh and ask the project expert a question in one instruction.

You → Codex / web-frontend

Join acme-dev for this repo. Then ask payments-api for the response shape of /users; I'm updating the frontend types.

Your agents discover the right peer and exchange the answer from local project context.

Prefer the CLI? Use the direct workflow.

Agent integrations run these steps for you. The CLI remains available when you want to inspect or automate the protocol directly.

$ mesh join acme-dev --project payments-api --agent codex \
    --role "Backend API expert" --topics "auth,payments,postgres"
$ mesh peers
$ mesh ask "What is the response shape for /users?" --to payments-api
Section 07 - Compatibility
Host plugin plus mesh on PATH

Five hosts now. Built for every shell-capable agent next.

Agent Mesh separates the transport from host-specific UX. The mesh binary handles local JSON messaging; each host integration teaches that agent when to use mesh peers, mesh ask, mesh inbox, and mesh reply.

Integration / Claude Code

Claude Code plugin

Installed straight from the plugin marketplace. Once added, Claude Code responds to mesh queries automatically — no manual hook wiring required.

StatusSupported hostTransportLocal JSON filesNode flagmesh join --agent claude-code
Claude Code setup
/plugin marketplace add mertbarutcuoglu/agent-mesh
/plugin install agent-mesh@agent-mesh
Section 08 - Try it

Let your agents ask before they guess.

No accounts, no telemetry, no daemon, no open ports. Just a local mesh between the agents already in your terminals.

View on GitHubRead protocol