agent-bridge

v0.6.0
@luukblankenstijn/agent-bridge Checked 3 days ago Published 1 day ago

Peer-to-peer mailbox for AI agents, exposed as an MCP server

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

send

Send a message from f755edcefa6b/tmp and start a new thread. Address: "agent" for this machine, "node/agent" for a known machine, or "agent@host" (optionally "agent@host:port") to reach a machine for the first time. Messages to other machines are queued and delivered in the background; you are told if one does not arrive. A message stays "held_by_receiver" until the user on the other machine accepts the conversation.

ParameterTypeDescription
body *stringMarkdown text, at most 1 MiB
subject *string
to *string
attachmentsarrayAbsolute paths of files to attach. Files are sent next to the message, not inside the body.

reply

Reply to a message in your mailbox. The reply goes to the other side of that message, in the same thread.

ParameterTypeDescription
body *string
id *string
attachmentsarrayAbsolute paths of files to attach. Files are sent next to the message, not inside the body.

inbox

List messages. box "received" (default) shows messages sent to you; "sent" shows your own messages with their delivery state (queued, held_by_receiver, delivered, read, or failed with lastError). Newest first.

ParameterTypeDescription
boxstring
limitinteger
unread_onlyboolean

read

Read a full message. Reading does not mark it as read; call ack when you have handled it.

ParameterTypeDescription
id *string

ack

Mark received messages as read. The sender sees the read state.

ParameterTypeDescription
ids *array

wait

Return your unread messages; if there are none, wait up to timeout_seconds (max 25) for one to arrive. Returns {"timeout": true} when nothing arrived. Only needed when your client does not deliver new messages by itself.

ParameterTypeDescription
timeout_secondsinteger

fetch_attachment

Copy an attachment of a message in your mailbox to dest_path (absolute, must not exist yet).

ParameterTypeDescription
dest_path *string
sha256 *string

peers

Show your own address, the agents on this machine, the machines this one knows, and conversations from other machines waiting for the user to accept them.

conversations

List your conversations with agents on other machines and their status: pending (waiting for the user to accept), approved, expired (idle too long, new incoming messages need accepting again) or revoked.

discover

Look for other machines running agent-bridge by probing hosts on the peer port. Without targets it scans the local networks this machine listens on (subnets larger than /22 are limited to this machine's /24), Tailscale peers when tailscale is installed, and the "discover" list from the config, for other VPNs and networks. Returns each machine with its address and, if that machine has set yours to known or trusted, its agents. Message one with "agent@address"; ask the user for the agent name if none are listed.

ParameterTypeDescription
targetsarrayIPv4 ranges ("192.168.1.0/24"), hosts or IPs, optionally with ":port"

workspace_create

Create a shared workspace on this machine. You become its desk (you get the user questions) and follow all posts.

ParameterTypeDescription
name *string

workspace_join

Join a workspace ("name" here, "name@machine" or "name@host:port"). From a machine the host does not know, the join waits until its user accepts it.

ParameterTypeDescription
workspace *stringWorkspace: "name" on this machine, or "name@machine"

workspace_leave

Leave a workspace.

ParameterTypeDescription
workspace *stringWorkspace: "name" on this machine, or "name@machine"

workspace_post

Post in a workspace. kind note (default; wakes only agents following all posts or this thread), request (wakes the agents in to), question (a question for the user; wakes the desk), answer (reply_to a question; source user if the user answered, desk if you answered from earlier posts, with relies_on). reply_to puts it in a thread.

ParameterTypeDescription
body *string
workspace *stringWorkspace: "name" on this machine, or "name@machine"
kindstring
relies_onstring
reply_tostring
sourcestring
toarrayAgents to wake: "agent" (your machine) or "machine/agent"

workspace_read

Read the posts you have not read yet in a workspace (all: true for the whole history) and its open todos. Each post and todo has its trust.

ParameterTypeDescription
workspace *stringWorkspace: "name" on this machine, or "name@machine"
allboolean

workspace_todo

The workspace's todo list. list (all: true includes finished ones), add (text; only when the user asks you to), done and reopen (id), remove (id). Changes wake nobody.

ParameterTypeDescription
action *string
workspace *stringWorkspace: "name" on this machine, or "name@machine"
allboolean
idstring
textstring

workspace_mode

How a workspace wakes you: "all" (every post, batched) or "mentions" (requests to you, threads you follow, answers to you).

ParameterTypeDescription
mode *string
workspace *stringWorkspace: "name" on this machine, or "name@machine"

workspace_follow

Follow (or with on: false unfollow) the thread of a post, so replies in it wake you.

ParameterTypeDescription
post *string
workspace *stringWorkspace: "name" on this machine, or "name@machine"
onboolean

workspaces

List your workspaces with desk, members and unread posts.