Skip to main content

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 credentials
  • jmap_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.36

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

Source distribution (sdist)

Source distribution for pydantic-ai-atomicmail 0.3.36
File Size Uploaded Provenance Actions
pydantic_ai_atomicmail-0.3.36.tar.gz 63.7 kB With provenance Details for pydantic_ai_atomicmail-0.3.36.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pydantic-ai-atomicmail 0.3.36
File Interpreter ABI Platform Actions
pydantic_ai_atomicmail-0.3.36-py3-none-any.whl Python 3 none any Details for pydantic_ai_atomicmail-0.3.36-py3-none-any.whl

Total release size: 147.6 kB

Release files / pydantic_ai_atomicmail-0.3.36.tar.gz

Download URL pydantic_ai_atomicmail-0.3.36.tar.gz
Size 63.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a96fe130c523c8c6ba83e6cbc0aa2cc523e3945b0edad057dac1e498660b85e5
BLAKE2b-256 checksum
How to use checksums
6d527fb85b3afa615f8a1c10f3c0d047c2cf8869437536ff11cf404d9b04a001
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 30, 2026.

Transparency log

Release files / pydantic_ai_atomicmail-0.3.36-py3-none-any.whl

Download URL pydantic_ai_atomicmail-0.3.36-py3-none-any.whl
Size 83.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de29c87123cd9d3e63bdf2ad51e246b7764ef83aa04c1c77e9740d4e3b8fb5cb
BLAKE2b-256 checksum
How to use checksums
ff1fc09f7b4858ca0821bec838101c0a1a0691b8431cd8e3400d3b0d5853a11b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 30, 2026.

Transparency log

Security for pydantic-ai-atomicmail 0.3.36

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pydantic_ai_atomicmail-0.3.36.tar.gz

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 Nov 30, 2026.

Transparency log

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