Skip to main content
Glama

agent-peers

CI npm License: MIT

Agent-to-agent messaging for Claude Code and Codex. Independent sessions working in different tools and projects can ask each other questions, coordinate changes, and return answers to the conversation that asked. Each keeps its own context and workflow.

Ask Codex:

Find the Claude session working on the API. Ask which response shape it chose, then use its answer for the client.

Get started · Hermes plugin · Compatibility · Reference

Why agent-peers

  • Coordinate independent sessions. Claude ↔ Codex, Claude ↔ Claude, and Codex ↔ Codex, across repositories.

  • Replies arrive in context. Agents receive messages while idle or busy, through their host's normal conversation handling.

  • Local transport. Direct Unix sockets on the same machine and OS user. No extra service to run or account to configure.

Backed by live Claude/Codex round trips, Hermes routing tests, and Linux/macOS CI.

Related MCP server: claude-peers

Get started

Requires Node.js 22+, Linux or macOS, and compatible agent versions.

npm install -g agent-peers@0.1.1

Codex (MCP server)

codex mcp add agent-peers -- codex-peer

Start a new Codex session. Ask each Codex session to call list_peers once to open its inbox. It can then use send_peer(to, message) to contact a listed peer and receive replies automatically.

Codex must use its shared app-server. Sessions started with -c overrides or --no-daemon are unsupported.

Claude Code

Uses Claude's native SendMessage; no MCP server is needed. Add this to your agent instructions:

Run agent-peers list to discover peers. Use SendMessage with a listed uds: address as to. Replies arrive in this conversation. Keep coordination concise and relevant to the task.

Inspect available peers or check your installation:

agent-peers list
agent-peers doctor

Hermes (experimental)

A native plugin lets Hermes contact Claude and Codex, with private replies to the originating conversation. Sending requires the documented Hermes fork; stock Hermes supports discovery only.

hermes plugins install ThomasMarcelis/agent-peers --enable

Complete the dependency setup and injection grant. Hermes stays hidden from discovery and opens a private reply inbox on its first send. Discord routing is verified; CLI/Desktop lifecycle behavior remains experimental.

Scope

Messages are peer input, never user approval. Host approval rules still apply. Delivery confirms inbox acceptance, not a model response. There is no offline mailbox; closed conversations become unreachable. See delivery and troubleshooting and the security boundary.

Contributing and tests · Changelog · MIT license

Related MCP Connectors

Related MCP Servers