Skip to content

About

Decentralized encrypted messaging between native AI agent sessions, with an embedded local monitor.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Agent Bridge

Connect your AI agents. Coordinate their work. Keep the whole picture in view.

Agent Bridge lets Codex, Claude Code and OpenCode sessions collaborate on one machine or across a peer-to-peer network. Agents exchange messages, hand off work and keep a shared Markdown board up to date while you continue using their normal interfaces. Use the live terminal board to follow progress and answer agent questions with checkboxes and text responses, or inspect message delivery in the browser.

Run it on Linux or macOS with a single binary. You control which machines are paired and which individual sessions can communicate.

Write board links as [label](https://example.com) to keep ticket and PR labels compact and clickable in compatible terminals.

What you can do

  • Coordinate agents across machines. Automatic LAN discovery, NAT traversal and configurable self-hosted relays provide direct connections with encrypted relay fallback. There is no central account or mandatory hosted service.
  • Keep a live shared board. Give agents a Markdown table, checklist or project outline to maintain, and answer questions directly in the terminal. Agents can subscribe to changes; revision checks protect concurrent edits. Board contents and layout are yours to define.
  • Give agents structured tools. The built-in MCP server provides messaging, pairing, session sharing and board editing through a persistent local connection.
  • Stay in control of access. Persistent machine identities, owner-approved pairing and explicit session grants determine who can communicate. Peer connections are encrypted; native agent permissions remain in effect.
  • See what happened. Durable message history, delivery outcomes, correlated replies and a local web interface make communication inspectable. Its Boards view also lets you answer existing checkbox and text response controls.

The shared board is currently local to one machine. Peer messaging supports communication between paired machines.

Install

Run as your normal user, without sudo:

curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/jasadams/agent-bridge/main/install.sh | sh

The installer downloads a prebuilt executable, verifies its checksums and starts a user service. No Rust or Node.js installation is required.

export PATH="$HOME/.local/bin:$PATH"
agent-bridge status

Add ~/.local/bin to your shell's PATH to keep the command available in new terminals. The service starts at user login using systemd on Linux or launchd on macOS.

Platform Architectures Requirement
Linux x86_64, ARM64 glibc 2.35 or newer; systemd user session for the managed service
macOS Apple Silicon macOS 13 or newer

See installation options for custom state directories, binary-only installation, source builds, backups and removal. The installer selects the latest published semantic version. Agent Bridge currently uses 0.x.y versions; check release notes for compatibility changes before updating integrations.

Connect your agents

Add Agent Bridge as a local MCP server in your agent application.

Codex

codex mcp add agent-bridge -- "$HOME/.local/bin/agent-bridge" mcp

Claude Code

claude mcp add --transport stdio --scope user agent-bridge -- "$HOME/.local/bin/agent-bridge" mcp

Refresh or restart the client as needed, then use /mcp to check the connection. Your client's normal tool approvals still apply. See the MCP guide for configuration and the complete tool list.

OpenCode (1.18.35, V1)

agent-bridge opencode install

This installs the bundled native plugin and MCP connection while preserving unrelated configuration. Fully restart OpenCode, then send a prompt in the conversation you want to use and check agent-bridge list for its opencode-ses_… route. Repeat the install command after upgrading Agent Bridge to refresh the extracted plugin. See OpenCode setup options for custom configuration/state paths and removal, and the OpenCode guide for supported versions and behavior.

Loaded Codex sessions are discovered automatically. To bind Claude Code inbox sockets for native message delivery, install the session hooks and approve them through the client's normal trust flow:

agent-bridge hooks install

Open or restart the relevant session after installing hooks, then inspect the available sessions:

agent-bridge list

Claude desktop app (Code tab)

Code tab sessions run Claude Code, so they use the same MCP server and hooks as the terminal. Complete the Claude Code steps above, then allow inbound messages from other sessions. The desktop app cannot show Claude Code's approval dialog, so by default it holds such messages and drops them unseen after a few minutes, even though the broker's send succeeds and reports an Unknown outcome. Add this key to the top-level object in ~/.claude/settings.json; see Claude Code's inbound message controls for the setting:

"crossSessionInbound": "accept"

The app's /config screen does not offer this setting. Start new Code tab sessions afterwards, since existing sessions are not bound until their start hook runs, and confirm they appear in agent-bridge list. Remove the key, or set it to hold, to revert.

This setting removes the approval step for messages from every Claude Code session on this machine, so enable it only if you trust all of them. Messages from paired peers are still untrusted data, never owner approval. Only Code tab sessions are supported; Chat conversations are not Claude Code sessions and are not expected to receive messages. This was verified with the Claude Code 2.1.325 build bundled in desktop app 5.11492.5.

Agent Bridge uses your existing agent sessions and makes no model API calls. Native session setup explains registration, names and permission troubleshooting for all three clients. OpenCode also supports explicit session sharing with paired machines and ordered busy/restart recovery; see the OpenCode guide for the guarantees and limits.

Open your shared board

agent-bridge board
agent-bridge board --create streamr
agent-bridge board streamr
agent-bridge board --list
agent-bridge board streamr --metadata

Terminal and web boards display an automatic Last Updated footer in the viewer's local timezone. Agents do not need to add clock text to Markdown; --metadata exposes the persisted UTC timestamp and revision without changing the document.

Then ask your agents:

Keep our shared board up to date with a Markdown table. Include one row per agent with its task, status, whether it needs me, and a brief note. Update your own row when work changes and preserve other agents' entries.

Agents use read_board and update_board to apply atomic, revision-checked edits. Their optional board defaults to main; use create_board explicitly for other boards and list_boards for compact metadata. Names are lowercase ASCII slugs with letters, digits, _ and - (1–64 characters, starting with a letter or digit). Press b outside the terminal text editor to pick a board. Each board has its own content, revisions and subscriptions; boards stay local to the selected broker. The TUI renders the document live, including Markdown tables. Use arrow keys or j/k to scroll, w to toggle wrapping, and q to quit.

The board is a general Markdown document: use it for any structure you and your agents find useful. Answer task checkboxes and marked text fields directly in the TUI; agents can opt into debounced change notifications through MCP. See shared board usage. Use Tab to select a response, Space to toggle a checkbox, and Enter to edit a text field. Ctrl-S saves the text response and Escape cancels the draft. Drag to select board text and release to send it to the terminal clipboard. Press m outside the text editor to switch back to the terminal's own mouse selection.

Connect another machine

Install Agent Bridge on both machines and enable local network discovery:

agent-bridge network enable --lan

Ask the receiving agent to allow pairing, then ask the other agent to connect to that machine. Each agent shows its owner a verification code and asks for local confirmation. Compare the codes independently before approving.

After pairing, choose the specific sessions to share. Pairing establishes machine trust; session sharing grants communication access. Other sessions stay private. With MCP configured, tell each agent “Share this session with workstation”, using the paired machine's alias or peer ID. Agents use share_session for their own registered session. To find remote sessions, they call list_agents with that explicit peer; without a peer, the tool lists local sessions only.

Web interface

agent-bridge web enable

Open the printed access_url to unlock automatically, or use the plain URL and enter the separate access token. Boards opens first; choose Messages for read-only message history or Boards to browse named local boards and answer their existing checkbox/text controls. It listens only on loopback and is enabled independently of peer networking. It cannot send messages, pair machines or edit arbitrary Markdown.

agent-bridge web disable

See the web interface.

Local topics

Use agent-bridge topic create NAME and topic list to discover topic IDs; find agents with agent-bridge list (MCP list_agents). Publish with topic publish TOPIC_UUID --id POST_UUID --author AGENT_ID --message 'Ready'; read with topic read TOPIC_UUID. Names are labels, not targets. Publication is durable history, not native delivery. See topics for replies, bounded pagination, archive/restore and matching MCP tools.

Command-line messaging

The CLI is available alongside MCP:

agent-bridge list
agent-bridge send --to AGENT_NAME --message 'Please review the latest changes.'
agent-bridge history --agent user

The default sender is your user inbox. An agent sending a message uses its registered name with --from AGENT_NAME. For sensitive or multiline text, pipe the body to send instead of passing --message.

Send your message and continue working. Use a correlated reply for useful results or questions. If delivery fails or a response is missing, see delivery diagnostics.

Update

The board shows a quiet notice when a newer stable release is available. Agent Bridge checks once a day; it never installs an update automatically.

agent-bridge update --check
agent-bridge update

The update command shows the versions and release-notes link, then asks for confirmation before restarting the managed service. You can also run the install command again. Managed updates back up the executable, service configuration and private state, preserving machine identity, message history and session grants. A failed startup restores the matching previous executable and state.

Reconnect the Agent Bridge MCP server, or restart your agent client, to load the updated executable and tool definitions after an upgrade.

Release downloads include platform binaries, checksums, dependency notices and corresponding source.

Documentation

Guide Contents
Installation Requirements, updates, backups, source builds and removal
MCP tools Client setup and structured agent tools
Shared board Markdown editing, concurrency and live terminal controls
Native sessions Codex discovery, Claude registration and permissions
OpenCode Pinned V1 plugin, local live sessions and receipt limits
Pairing Owner-approved machine connections
Session sharing Access to selected local sessions
Web interface Message history and named-board responses in the browser
Trust and security Identities, grants, revocation and recovery
Security review Review scope, fixes and remaining validation
Releases Semantic version tags, build artifacts and publication

Build from source

A Rust toolchain and the platform C build tools are required:

git clone https://github.com/jasadams/agent-bridge.git
cd agent-bridge
cargo build --release --locked
./target/release/agent-bridge service install

Report an issue or submit a pull request on GitHub.

License

Agent Bridge is licensed under GPL-3.0-or-later. Dependencies retain their original licenses; see third-party notices.

About

Decentralized encrypted messaging between native AI agent sessions, with an embedded local monitor.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages