pydantic-ai-atomicmail
Pydantic AI integration for Atomic Mail: give your agent a real email inbox.
It exposes three tools backed by the same Python Atomic Mail runtime used by the CLI and MCP adapters:
register— proof-of-work signup that provisions an inbox and stores credentialsjmap_request— authenticated JMAP method-call batches (read, send, search, ...)help— the built-in Atomic Mail docs
Install
pip install pydantic-ai-atomicmail
The published wheel bundles the Atomic Mail Python runtime and shared presets; no separate PyPI package is required.
Local development in this monorepo (install the core library first):
cd py
pip install -e .
pip install -e pydantic_ai
Usage
As a capability — recommended, since it bundles the tools with instructions telling the model how to use them:
from pydantic_ai import Agent
from pydantic_ai_atomicmail import AtomicMailCapability
agent = Agent('openai:gpt-5.2', capabilities=[AtomicMailCapability()])
result = agent.run_sync('Check my inbox and summarise anything from today.')
As a plain toolset, when you want the tools without the instructions:
from pydantic_ai import Agent
from pydantic_ai_atomicmail import AtomicMailToolset
agent = Agent('openai:gpt-5.2', toolsets=[AtomicMailToolset()])
Both accept credentials_dir to point at a specific credentials directory,
which is useful when one process drives several inboxes:
toolset = AtomicMailToolset(credentials_dir='/srv/agents/support/.atomicmail')
The model can still override credentials_dir per call; the constructor value is
the default.
Tool functions
The underlying functions are importable and callable on their own:
from pydantic_ai_atomicmail import help_tool, jmap_request_tool, register_tool
register_tool(username='support-bot')
print(help_tool(topic='cron'))
Tests
cd py
pip install -e . -e pydantic_ai pytest
pytest tests/test_pydantic_ai_atomicmail.py
Metadata
Release files for pydantic-ai-atomicmail 0.3.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pydantic_ai_atomicmail-0.3.30.tar.gz | 54.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydantic_ai_atomicmail-0.3.30-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 123.4 kB
Release files / pydantic_ai_atomicmail-0.3.30.tar.gz
| Download URL | pydantic_ai_atomicmail-0.3.30.tar.gz |
|---|---|
| Size | 54.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9111e19b6d154f549e4bf549cb7e9495be6e7771395c06f3ccc9943b44fa0f7d
|
|
BLAKE2b-256 checksum How to use checksums |
129c1a803b81a81e40491bbf85c5ef1274a1933726b5e2778808bcc367a43947
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / pydantic_ai_atomicmail-0.3.30-py3-none-any.whl
| Download URL | pydantic_ai_atomicmail-0.3.30-py3-none-any.whl |
|---|---|
| Size | 69.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3394151550ecbfafb74b1b81e660d82687947ad189d436bb3e10b292fdf53166
|
|
BLAKE2b-256 checksum How to use checksums |
9092936cd1f7dc3af62052585d9e5cfc6b6febbace2ab736c4d42bd2ecb10eb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency log