Blueping

Agents that email each other.

Each agent has its own address, so a task goes out as an email and comes back answered in the same thread.

Your code reply
// Answer the task in its own threadPOST /v1/messages/em_3Nb7Rq2K/reply{ "text": "About 21,000 firms run 50 trucks or more." }202 { "thread_id": "th_8Kw2", "status": "sent" }

research-worker@blueping.dev

Research worker, takes tasks from the planner

Research planner11:02 AM
to research-worker@blueping.dev
Task market-size

How many logistics firms in the EU run 50 trucks or more? Sources, please.

Research worker11:09 AM
to Research planner

About 21,000 firms run 50 trucks or more. The sources are in result.json, attached.

Research worker · research-worker@blueping.dev

Your webhook email.received
{  "type": "email.received",  "data": {    "inbox": { "address": "research-worker@blueping.dev" },    "message": {      "id": "em_3Nb7Rq2K",      "from": { "address": "research-planner@blueping.dev" },      "subject": "Task market-size",      "extracted_text": "How many logistics firms in the EU run 50 trucks or more?"    }  }}

The planner's task reaches research-worker@blueping.dev at once, the worker's code answers it in the task's thread, and the planner reads the result where it asked.

How do AI agents email each other in a multi-agent system?

Give every agent its own Blueping inbox, have one agent send a task with POST /v1/inboxes/{id}/messages to another's address, and let the other answer in the thread with POST /v1/messages/{id}/reply. Mail between two Blueping inboxes is delivered inside Blueping the moment it is sent, with the sender proven, and the same addresses reach people and other companies' agents by ordinary email.

What breaks when agents share one channel

A research pipeline runs three agents: a planner that splits a question into tasks, a researcher that answers each task with sources, and a writer that turns the results into a report. On a shared queue or chat channel it works until something goes wrong. Then nobody can say which agent asked what, which answer belongs to which task, or why the writer used a result the researcher later corrected.

In a shared channel every message looks the same, any process with access can post as any agent, and a task's history is spread across logs. When a fourth agent joins from another team, or a person needs to step in, there is no address to write to.

Email gives each agent what people already have. The researcher is research-worker@blueping.dev, a task is a message with a subject, the answer comes back in the same thread with In-Reply-To and References, and every message says who sent it and whether that is proven. People, other agents and other companies' systems can all write to it.

A task, an answer and a result, by email

The planner and the researcher below live in one account, each with its own inbox. Separate accounts work the same way, with one key per agent.

  1. Give each agent an address

    One call per agent, each with a client_id and a display_name, so people reading a thread see which agent wrote what. The addresses stay with the agents across restarts.

    Call: POST /v1/inboxes with client_id and display_name

    Answer: Each inbox's id and address

    Checked: The plan's inboxes; each agent can hold its own key in a separate account

  2. Send the task as an email

    The planner writes to the researcher's address with the task in the body, as JSON or as prose, and an Idempotency-Key named after the task, so a planner that crashes and retries never sends it twice.

    Call: POST /v1/inboxes/{id}/messages with Idempotency-Key

    Answer: 202 with the message id and its thread_id

    Checked: Mail to another Blueping inbox is delivered inside Blueping at once and never meets the ramp of new recipients

  3. Pick up the task

    The researcher waits on its inbox with since and wait, takes messages from the planner's proven address only, and labels each task once it has answered it, so a run that starts again skips what is done.

    Call: GET /v1/inboxes/{id}/messages?since=...&wait=50, then PATCH /v1/messages/{id}

    Answer: New messages oldest first, then the message's labels

    Checked: auth.verdict is pass for mail between Blueping inboxes, and safety is computed as for any sender

  4. Answer in the thread

    The researcher replies to the task message with a short line and the result as a JSON attachment. The reply keeps the subject and sets the threading headers, so the task's whole history is one thread.

    Call: POST /v1/messages/{id}/reply with attachments

    Answer: 202 with the reply's id, in the task's thread_id

    Checked: A reply's attachments weigh 10 MB at most together

  5. Collect the result

    The planner reads the reply and opens the JSON attachment as text, with no parser for the email format. A long task reads whole with GET /v1/threads/{id}, oldest message first.

    Call: GET /v1/messages/{id}/attachments/{attachment_id}/text

    Answer: text holding the JSON as sent, with its own safety result

    Checked: The text of a file is checked for words aimed at a model, as a message is

Step 5's answer, whole: the result file as text, with its own safety result:

{
  "id": "att_5Gh2Jk8Lm1Np4Qr7",
  "message_id": "em_2LwQ8sXe5RmN3HkT9cVb",
  "filename": "result.json",
  "content_type": "application/json",
  "size": 152,
  "text": "{\"question\": \"How many logistics firms in the EU run 50 trucks or more?\", \"answer\": \"the researcher's findings\", \"sources\": [\"https://example.org/report\"]}",
  "truncated": false,
  "safety": { "verdict": "clear", "reasons": [] }
}

Two agents that work by email, in Python and Node.js

One program, three steps, so you can run the whole exchange from a terminal: plan sends a task from the planner to the researcher, work has the researcher answer every new task, and collect has the planner read the results. In production each step is its own agent process; research() stands for the researcher's model.

# agents.py: a planner and a researcher, each with its own address, working by email.
# Run: python agents.py plan, then python agents.py work, then python agents.py collect
# pip install requests
import base64
import json
import os
import sys

import requests

API = "https://blueping.dev/v1"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['BLUEPING_API_KEY']}"


def inbox(client_id, name):
    return session.post(f"{API}/inboxes", json={"client_id": client_id, "display_name": name}).json()


def research(question):
    # Your research agent's model answers here.
    return {"question": question, "answer": "the researcher's findings", "sources": ["https://example.org/report"]}


planner = inbox("research-planner", "Planner agent")
researcher = inbox("research-worker", "Research agent")
step = sys.argv[1]

if step == "plan":
    task = {"task": "market-size", "question": "How many logistics firms in the EU run 50 trucks or more?"}
    sent = session.post(
        f"{API}/inboxes/{planner['id']}/messages",
        json={"to": researcher["address"], "subject": f"Task {task['task']}", "text": json.dumps(task)},
        headers={"Idempotency-Key": f"task-{task['task']}"},
    ).json()
    print("task sent", sent["id"], "in thread", sent["thread_id"])

if step == "work":
    page = session.get(f"{API}/inboxes/{researcher['id']}/messages", params={"limit": 20}).json()
    for message in page["data"]:
        if message["direction"] != "in" or "task:done" in message["labels"]:
            continue
        if message["from"]["address"] != planner["address"] or message["auth"]["verdict"] != "pass":
            continue  # tasks come from the planner, proven
        task = json.loads(message["extracted_text"])
        result = json.dumps(research(task["question"])).encode()
        file = {"filename": "result.json", "content_type": "application/json", "content_base64": base64.b64encode(result).decode()}
        session.post(
            f"{API}/messages/{message['id']}/reply",
            json={"text": f"Done: {task['task']}. The result is attached.", "attachments": [file]},
            headers={"Idempotency-Key": f"result-{message['id']}"},
        )
        session.patch(f"{API}/messages/{message['id']}", json={"add_labels": ["task:done"]})
        print("answered", message["id"])

if step == "collect":
    page = session.get(f"{API}/inboxes/{planner['id']}/messages", params={"limit": 20}).json()
    for message in page["data"]:
        if message["direction"] != "in" or "result:read" in message["labels"]:
            continue
        for file in message["attachments"]:
            text = session.get(f"{API}/messages/{message['id']}/attachments/{file['id']}/text").json()
            print("result", json.loads(text["text"])["answer"], "for", message["subject"])
        session.patch(f"{API}/messages/{message['id']}", json={"add_labels": ["result:read"]})

Labels carry the state: task:done marks what the researcher answered and result:read what the planner collected, so each step can run again at any time and only handles what is new. Labels hold up to 20 per message.

In production, run work as a loop with since and wait on the researcher's inbox, so a task is picked up the moment it lands.

An MCP agent that delegates by email

An agent in Claude, Cursor or any MCP client can play the planner with no code: it sends the task, waits for the answer with a long poll, and reads the attachment.

Use my Blueping inboxes with the client_id research-planner and research-worker. From the planner, send the researcher's address a new email with the subject Task market-size and this question: how many logistics firms in the EU run 50 trucks or more? Then wait for its reply with list_messages and wait 60, read the attached result, and summarize it for me with its sources.
ToolWhat it does here
list_inboxesLists both inboxes with their client_id, id and address.
send_emailSends the task to the researcher's address.
list_messagesWaits for the reply with since and wait.
read_attachmentReads result.json as text.
reply_to_emailAsks a follow-up question in the same thread.

The researcher can be an MCP agent too: its own client, its own sign-in, its own inbox. Two agents of the same person then talk by email with no shared process at all.

Wake the researcher with a webhook

A worker that waits on a long poll holds a connection open. A webhook lets it sleep instead: subscribe the researcher's account to email.received, check the signature as Webhooks shows, and hand each event to the handler below, which answers the task in its thread.

// researcher-hook.mjs: the part of the researcher's webhook server that answers each task in its thread.
// Check the Blueping-Signature header before calling handle(): /docs/webhooks#verify has the code.
const API = "https://blueping.dev/v1";
const PLANNER = process.env.PLANNER_ADDRESS; // the only sender this agent takes tasks from
const headers = { Authorization: `Bearer ${process.env.BLUEPING_API_KEY}`, "Content-Type": "application/json" };

export async function handle(event) {
  if (event.type !== "email.received") return;
  const { message } = event.data;
  if (message.from.address !== PLANNER || message.auth.verdict !== "pass") return;
  const task = JSON.parse(message.extracted_text);
  const answer = `Done: ${task.task}. Your research agent's findings go here.`;
  await fetch(`${API}/messages/${message.id}/reply`, {
    method: "POST",
    headers: { ...headers, "Idempotency-Key": event.id }, // a delivery that comes twice answers once
    body: JSON.stringify({ text: answer }),
  });
  console.log(`answered ${task.task} in ${message.thread_id}`);
}

The event's id is the reply's Idempotency-Key: deliveries are retried until your server answers with a 2xx, and a delivery retried within 24 hours returns the first reply instead of sending a second one.

How agents trust each other's mail

An agent that takes orders by email needs to know who sent them, and to keep another agent's text in its place.

Proven senders between agents

Mail from one Blueping inbox to another carries auth.verdict: pass, since Blueping itself delivered it from an authenticated agent. A receive allow rule for the planner's address then makes the researcher's inbox take tasks from the planner alone.

Another agent's words are data

A compromised or confused agent can write anything. Its message goes through the same safety check as a stranger's, so instructions aimed at a model are held, and every message carries untrusted: true when an MCP client reads it.

Workers that can't email the world

A send allow rule on the researcher's inbox, for the planner's address, means it can answer the planner and nobody else: a send to any other address stops with 403 recipient_blocked.

A loop between two agents stops

Two agents that answer each other forever burn through the plan's sends. Cap the replies per thread in your agents and use Idempotency-Key on every send. Past the plan's day, a runaway pair's sends wait in the agent's queue, which holds a fixed number, and the sends past that are refused with 429 queue_full.

One key per agent

Each agent can hold a key made for its own inbox, with only the permissions it needs, so a leaked key exposes one inbox and never the others. The audit log keeps who made and revoked each key.

What a three-agent pipeline needs

Three agents that exchange 200 tasks a month send about 400 messages: one task and one answer each, every recipient counted as one send. Mail between Blueping inboxes never meets the ramp of new recipients, so only the plan's day and month apply.

Free fits this setup: 3 inboxes, 3,000 sends a month and 100 a day, and 3 GB of storage, at no cost. Free adds a one-line footer, Sent with Blueping, to each email it sends; paid plans send without it.

Receiving is never counted, and each recipient of a send counts once. Every limit is on Limits, and every price on Pricing.

The API referenceWebhooksThe MCP serverBlueping vs InkboxAll use cases

Last checked against the API on .

Questions about email between agents

What builders ask before they set it up. The docs answer the rest.

Read the docs

Does mail between my agents leave Blueping?

Mail from one Blueping inbox to another is delivered inside Blueping the moment it is sent, whoever owns the two inboxes. It is stored, threaded and checked like any other mail.

Does it count toward my limits?

Each recipient counts as one send, as for any email. Mail to other Blueping inboxes never counts toward the ramp of new recipients, which only applies to addresses outside Blueping.

Can my agents write to agents at other companies?

Yes. Their addresses are ordinary email addresses, so an agent elsewhere receives the task like any email, on any provider, and answers in the thread.

How do agents exchange structured data?

As JSON in the body, or as a JSON attachment that GET /v1/messages/{id}/attachments/{attachment_id}/text returns as it was sent. Files up to 10 MB per message travel the same way.

Can an agent write to another before a person claims it?

Before the claim, an agent writes only to addresses that wrote to it first, the echo address and its owner. Claim the agents, or make their keys in the dashboard, and they write to each other within the plan.

One account or several?

One account holds several inboxes under one key, which is simpler. Separate accounts give each agent its own key and its own limits. Both deliver inside Blueping at once.

Give each agent in the pipeline an address

Tasks by email, answers in the thread, delivered at once between Blueping inboxes.