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.12.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, categorization and invoices on 2026-11-22, invoices, inquiries and awaiting_reply in the versions of 0.11.0 on 2026-11-23, and the recognizer invoice of categorization on 2026-11-25. None changed anything. The agent invoices is gone since: categorization asks its question. 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 track sent mail that still waits for a reply, recognise project inquiries, and file mail into folders by its sender, by the topic of a group or as an invoice, or by the keywords it carries, and draft a forward of mail by its keywords, which they never send.

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, two at most for categorization, 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 state: a file of SQLite, or a database of its own on a PostgreSQL server with the extra postgres. The state holds ids and decisions, never the text of a mail.
  • benethos-mailbox-agents cockpit, started by hand, shows what every agent did on read-only pages, read from the state files, behind a secret. It is a small tool that may change or go away in any release.
  • A new agent starts in the stage shadow, where it only records what it would do. The stages suggest 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.12.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.12.0
File Size Uploaded Provenance Actions
benethos_mailbox_agents-0.12.0.tar.gz 322.9 kB Without provenance Details for benethos_mailbox_agents-0.12.0.tar.gz

Built distribution (wheel)

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

Total release size: 584.6 kB

Release files / benethos_mailbox_agents-0.12.0.tar.gz

Download URL benethos_mailbox_agents-0.12.0.tar.gz
Size 322.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4ecbddb76f5feafed69fa4e8051dc8ef4fcfd74bf80c7642cd88d58df928026e
BLAKE2b-256 checksum
How to use checksums
1f90f3039e743c1322cb2161dc268e79b67888829404a886bd8314b099ddb849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.12.0-py3-none-any.whl

Download URL benethos_mailbox_agents-0.12.0-py3-none-any.whl
Size 261.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aeba2f6db7360134f36df0eb494c086ff55e50497ba106f4ec39965c0650b111
BLAKE2b-256 checksum
How to use checksums
51ebf50557ab2e5d3c7a555f617fb5c7d5a28598bbf488edd6d25de52d444c66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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.12.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