Skip to main content

Mailbox Agents

CI Coverage License Python

PyPI benethos-mailbox-service Container benethos-mailbox-service

PyPI benethos-mailbox-agents Container benethos-mailbox-agents

PyPI benethos-mailbox-mcp Container benethos-mailbox-mcp

PyPI benethos-mailbox-client

PyPI benethos-mailbox-common

Sponsor PayPal

benethos-mailbox-mcp on Glama

Alpha, version 0.11.0. Built, and run on a test account of invented mail. On a real mailbox, read-only and in the stage shadow: invoices version 3 on 2026-11-18, sorting and invoices on 2026-11-22, and invoices, inquiries and awaiting_reply in the versions of 0.11.0 on 2026-11-23. None changed anything. Names, settings and the state file may still change from one version to the next. The design is written down in docs/mailbox-agents/CONCEPT.md. Do not point it at a mailbox you care about.

The AI agents of Mailbox, on PyPI as benethos-mailbox-agents. They work on a mailbox continuously. Each one looks at mail as it arrives or leaves, decides one narrow question about it and takes one reversible action: a keyword, or a move to a folder. The first ones sort invoices, track sent mail that still waits for a reply, recognise project inquiries and file the mail of listed senders into folders.

Mailbox is self-hosted and has five packages. The agents do not work alone. They need the service, which runs on your own machine or server and holds the connections to your mail accounts, and a model gateway. Install the service first: Install and First start in its README. Up to 0.2.0 the agents were a repository of their own, benethos-hub/mailbox-agents, which keeps their history and their changelog up to that release.

The mailbox service hands the change feed and a message to Mailbox Agents and takes a keyword or a move back. Each agent takes a message through four steps: trigger, selection, decision and effect. For a decision it asks a model once through an OpenAI-compatible gateway, without tools. The mailbox service stands on the mail accounts, the gateway on local or hosted model backends.

A message comes to an agent through the change feed of the service. The agent asks a model through the gateway, and hands a keyword or a move back to the service.

Package Its part How you get it
mailbox-service It holds the connections to your mail accounts and their credentials, encrypted. It offers one REST API for every provider and decides what a token may do. It has to be running. Getting started, before the agents
mailbox-agents This package. Small AI agents that sort and mark mail. Install
mailbox-client The Python client of the REST API. The agents make every request with it. installed with the agents
mailbox-mcp The MCP server. It turns the REST API into tools for an AI assistant. The agents do not use it. not needed here
mailbox-common What the service, the MCP server and the agents share. installed with this package

The agents take only a service of their own version: before 1.0 the same minor version, from 1.0 the same major version and a minor version no older than theirs. An agent stops at any other. The agents 0.2.0, released before they joined this repository, take the service 0.8 and 0.9 only.

What the project is for: the repository's README.

Contents

How it works

  • Mail is reached only through the REST API of the service, with its Python client benethos-mailbox-client.
  • A language model is reached only through an OpenAI-compatible gateway, with one call per message, a JSON schema for the answer and no tools.
  • Everything else is deterministic code: which messages an agent looks at, what a rule says, whether a quote from the model is really in the mail, and which action follows.
  • Every agent runs in a process of its own, with its own credentials and its own SQLite state file. The state file holds ids and decisions, never the text of a mail.
  • A new agent starts in the stage shadow, where it only records what it would do. The stages keyword and full follow after it was measured against labelled mail.

Install

The package is benethos-mailbox-agents on PyPI, for Python 3.11 or newer:

uvx benethos-mailbox-agents --version

In operation each agent runs as a container of the image ghcr.io/benethos-hub/benethos-mailbox-agents. containers/production holds the compose file and says how to set it up. Every setting is listed in docs/mailbox-agents/concept/configuration.md.

Development

Needs uv and a clone of the repository, from whose root the commands run.

uv sync
uv run benethos-mailbox-agents --version
uv run pytest -q packages/mailbox-agents/tests

The suite is offline. The live checks run against a mail server and a mailbox service of their own with invented mail, see containers/live.

Licence

MIT, see LICENSE.

Metadata

Release files for benethos-mailbox-agents 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for benethos-mailbox-agents 0.11.0
File Size Uploaded Provenance Actions
benethos_mailbox_agents-0.11.0.tar.gz 193.3 kB Without provenance Details for benethos_mailbox_agents-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for benethos-mailbox-agents 0.11.0
File Interpreter ABI Platform Actions
benethos_mailbox_agents-0.11.0-py3-none-any.whl Python 3 none any Details for benethos_mailbox_agents-0.11.0-py3-none-any.whl

Total release size: 345.9 kB

Release files / benethos_mailbox_agents-0.11.0.tar.gz

Download URL benethos_mailbox_agents-0.11.0.tar.gz
Size 193.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d72c8782014923135493dc62fa280718f43cc9d34c7f89405b314e1f786ea4c4
BLAKE2b-256 checksum
How to use checksums
f0ba1ec35d9f27dd03c13a5c9ea353412dd61a83b61498cd44479fabc4f3d16b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / benethos_mailbox_agents-0.11.0-py3-none-any.whl

Download URL benethos_mailbox_agents-0.11.0-py3-none-any.whl
Size 152.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fbb4acf7c873e0573515ad275e7644223e47c229eef6060e3d49969731cd0f3
BLAKE2b-256 checksum
How to use checksums
1a2c57aab280e944feb9ee5077ce7d242a066be23de559c830ff2fcfeb06b478
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for benethos-mailbox-agents 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page