open source · MIT · written in Rust

Let your coding agents talk to each other.

You probably run more than one agent CLI. Each keeps its own sessions, and none of them can see the others, so when Codex figures something out and Claude needs to know, you're the one copying it across. Crewmesh is an MCP server that takes you out of that loop.

brew install mubashir1osmani/agent-mesh/agent-mesh

macOS, Apple Silicon and Intel. On Linux, build from source with Rust 1.88+.

two agents, two models
// straight from the test suite
codex    ← "Remember this: the deploy key is ORCHID-77"
         → "stored"

opencode ← "What is the deploy key?"
         → "UNKNOWN"

codex    ← "What is the deploy key?"
         → "ORCHID-77"

opencode ← "A peer agent says the key is
            ORCHID-77. Echo it"
         → "ORCHID-77"
The agent-mesh CLI. Works with Claude Code, Codex, opencode, Gemini, Grok and Cursor.

Claude Code, left, hands a testing task to a live Codex session, right. Codex writes and runs the tests, then sends the result back over the mesh. 32 seconds, no sound.

How it works

One hub per user. Every agent joins it.

  1. 01

    Attach it to an agent

    It speaks MCP over stdio, so any MCP client can use it. For Claude Code:

    claude mcp add --scope user agent-mesh -- agent-mesh

    Codex and opencode take a few lines of config. The README has them.

  2. 02

    The hub starts on its own

    The first agent to load Crewmesh launches a hub in the background, on a socket private to you. Every agent after that joins it as a node. You never start it by hand.

  3. 03

    Ask in plain language

    Open a session with codex, ask it to summarize the auth module, and tell me what it said

    Messages to an agent in tmux are typed straight into its session. Claude Code outside tmux picks them up through two hooks. Anything else reads them with check_inbox.

Your agents connect to one local hub, which owns the processes it spawns claude codex grok agent-mesh hub codexspawned claudespawned your sessions tmux nodes
Your own sessions on the left are never counted against the cap and never killed. The hub owns everything it spawns.

Tools

What an agent can do once it's on the mesh

Live nodes

list_nodes
Live agent sessions on this machine, and which one is you
send_message
Message a node by id or name. The reply comes back as a message
check_inbox
Collect messages that were queued for you
spawn_node
Start an agent in its own tmux session, with an optional first prompt and name
peek_node
Read a tmux node's screen without disturbing it
kill_node
Close a node the mesh spawned

Sessions

list_agents
Which agents exist, are installed, and can resume
open_session
Start a fresh conversation with an agent
attach_session
Join a conversation that already exists, and get its transcript
ask_agent
Send a prompt into a session and get the reply, tokens and cost
read_session
Read a conversation without prompting it
get_usage
Tokens and cost spent per agent so far
4agent processes at most by default. Past that, spawns are refused with a list of what's running.
30 minidle and a spawned node is closed. Active work and nodes you're watching aren't cut off.
6 / minmessages between any two nodes, plus a hop limit, so agents can't loop forever.
psagent-mesh ps shows every process the mesh runs and its memory. agent-mesh kill stops it.
Works with
  • Claude Code
  • Codex
  • opencode
  • Gemini
  • Grok
  • Cursor opt-in

Pricing

Free on one machine. Pro when your agents live on several.

Free

$0self-hosted, forever

The local mesh, open source under MIT.

  • Every tool above, for every supported agent
  • Spawn, watch and close agents in tmux
  • Process cap, idle reaping and loop limits
  • Per-agent token and cost tracking
  • OpenTelemetry traces and Prometheus metrics
Get it on GitHub

Pro waitlist

Cross-machine mesh via hosted relay. Everything in Free, plus agents on your other machines.

  • Alerts coming soon
  • Session history coming soon
  • Cost dashboard coming soon

$9per month

$90per year2 months free

Join the waitlist
list_nodes

See every machine

Agents on your other machines show up next to the local ones, tagged with the machine they run on.

send_message

Message across machines

Address a remote node by id or by its name. Replies land in your inbox like any local message.

agent-mesh login

One sign-in

Approve the login in your browser once. Your hub connects to the relay after that.

waitlist

Pro: cross-machine mesh via hosted relay

Your laptop's Claude, asking your desktop's Codex. Pro links the hubs on your machines through a hosted relay, so an agent on one can message a node on another. Pro isn't open yet. Leave your email and we'll write when it is.