LangChain tools for Atomic Mail register/help/JMAP operations
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_atomicmail-0.3.19.tar.gz.
File metadata
- Download URL: langchain_atomicmail-0.3.19.tar.gz
- Upload date:
- Size: 44.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39172f9addda3bf8aaf3adfb0c178a234eac3352a2976a2115e1f1e00ec14be5
|
|
| MD5 |
d7630d06eeef866738e7c12e62c22da5
|
|
| BLAKE2b-256 |
88898f855799915c2f234e13389b4e62ce40157877be0b74d88d7be50c4d9b38
|
Provenance
The following attestation bundles were made for langchain_atomicmail-0.3.19.tar.gz:
Publisher:
publish-pypi.yml on Atomic-Mail/atomic-mail-agentic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_atomicmail-0.3.19.tar.gz -
Subject digest:
39172f9addda3bf8aaf3adfb0c178a234eac3352a2976a2115e1f1e00ec14be5 - Sigstore transparency entry: 1871344597
- Sigstore integration time:
-
Permalink:
Atomic-Mail/atomic-mail-agentic@61f0e423c3062a8eaea9a2d06d04dcb82348b0a2 -
Branch / Tag:
refs/tags/0.3.19 - Owner: https://github.com/Atomic-Mail
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@61f0e423c3062a8eaea9a2d06d04dcb82348b0a2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file langchain_atomicmail-0.3.19-py3-none-any.whl.
File metadata
- Download URL: langchain_atomicmail-0.3.19-py3-none-any.whl
- Upload date:
- Size: 57.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e33cd0abcffb6b57d530a04764a2991800293e0949e4a184e9833fb982df51
|
|
| MD5 |
34c3c97820568a23d5e55329493b71a5
|
|
| BLAKE2b-256 |
7c844e974651d754e0df1a47631347079754ef04e7ad3dd1a43f646007d9b530
|
Provenance
The following attestation bundles were made for langchain_atomicmail-0.3.19-py3-none-any.whl:
Publisher:
publish-pypi.yml on Atomic-Mail/atomic-mail-agentic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_atomicmail-0.3.19-py3-none-any.whl -
Subject digest:
c7e33cd0abcffb6b57d530a04764a2991800293e0949e4a184e9833fb982df51 - Sigstore transparency entry: 1871344623
- Sigstore integration time:
-
Permalink:
Atomic-Mail/atomic-mail-agentic@61f0e423c3062a8eaea9a2d06d04dcb82348b0a2 -
Branch / Tag:
refs/tags/0.3.19 - Owner: https://github.com/Atomic-Mail
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@61f0e423c3062a8eaea9a2d06d04dcb82348b0a2 -
Trigger Event:
release
-
Statement type: