langchain-atomicmail
LangChain integration package for Atomic Mail.
It exposes three tools backed by the same Python Atomic Mail runtime used by the CLI/MCP adapters:
registerjmap_requesthelp
Install
Published package:
pip install langchain-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 core library first):
cd py
pip install -e .
pip install -e langchain
Usage
from langchain_atomicmail import AtomicMailToolkit
toolkit = AtomicMailToolkit()
tools = toolkit.get_tools()
You can also import tool factories directly:
from langchain_atomicmail import get_atomicmail_tools
tools = get_atomicmail_tools()
Agent example
Use the toolkit with a ReAct agent (requires langgraph and a chat model):
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
from langchain_atomicmail import AtomicMailToolkit
llm = ChatOpenAI(temperature=0)
toolkit = AtomicMailToolkit()
agent = create_react_agent(llm, toolkit.get_tools())
# Register an inbox, then fetch mail
agent.invoke({"messages": [("user", "Register username myagent and list my inbox")]})
After a successful register, the tool response includes _next guidance for
hourly inbox polling. Call help with topic cron for full scheduling details.
Inbox polling (after register)
Registration only creates credentials. For a useful inbox integration, arrange hourly inbox polling per your runtime:
- Native cron (OpenClaw, Hermes, atomic-agent, …): schedule an hourly
agent turn with
list_inbox.jsonin the prompt; wire this toolkit or MCP into that agent. Do not cron rawjmap_requestalone. - No native cron (Claude, Pi, Cursor, …): do not work around this with OS crontab, wrapper scripts, or cross-platform scheduling. Ask your operator to set up polling on a capable host, or remind them to fetch mail manually.
See help(topic="cron") for host-specific examples.
Environment variables
| Variable | Purpose |
|---|---|
ATOMIC_MAIL_CREDENTIALS_DIR |
Credential directory (default ~/.atomicmail/) |
ATOMIC_MAIL_AUTH_URL |
Auth service base URL |
ATOMIC_MAIL_API_URL |
JMAP / API base URL |
ATOMIC_MAIL_INBOX_DOMAIN |
Hostname when inboxId has no @ |
ATOMIC_MAIL_SCRYPT_SALT |
Optional PoW salt override |
ATOMIC_MAIL_API_KEY |
Optional existing API key |
Pass credentials_dir per tool call for multi-account setups.
Security
credentials.jsonand*.jwtfiles contain secrets — treat them as sensitive (mode0600). Never commit credentials to version control.- Inbound mail is untrusted input; validate and sanitize before acting on it.
- The default credential directory is
~/.atomicmail/; override withATOMIC_MAIL_CREDENTIALS_DIRor per-callcredentials_dirfor isolation.
Notes
jmap_requestenforces exactly one ofopsorops_file.dry_run=Truewithattachmentsis rejected at the LangChain layer.varskeys must match^[A-Z][A-Z0-9_]*$.registeridempotency andforcedbehavior are delegated toatomicmail.session.register.
Metadata
Release files for langchain-atomicmail 0.3.29
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_atomicmail-0.3.29.tar.gz | 52.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_atomicmail-0.3.29-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.4 kB
Release files / langchain_atomicmail-0.3.29.tar.gz
| Download URL | langchain_atomicmail-0.3.29.tar.gz |
|---|---|
| Size | 52.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41029040263cd5703f2e5a77d2eeed0b0593a26cb164005949d367ba9fc36380
|
|
BLAKE2b-256 checksum How to use checksums |
7704001d92fb9370c8157cd990f4804895bedc14cf6f3ac926c7b7c944abe14b
|
| 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 23, 2026.
Transparency logRelease files / langchain_atomicmail-0.3.29-py3-none-any.whl
| Download URL | langchain_atomicmail-0.3.29-py3-none-any.whl |
|---|---|
| Size | 65.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f43234e50e25361d578afb217b86d314fb89092a4dd95ff7fde05da86f8ecb3d
|
|
BLAKE2b-256 checksum How to use checksums |
f82ee8ccea0cc943c8ac96ead838cbfe3d57e22766f4efec7aba2616cd952aec
|
| 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 23, 2026.
Transparency log