Skip to main content

langchain-send0

send0 tools for LangChain and LangGraph. Give an agent its own email inbox: sign up for things, read verification codes, and hold real email conversations.

pip install langchain-send0

Usage

from langchain.agents import create_agent
from langchain_send0 import Send0Toolkit

tools = Send0Toolkit().get_tools()  # reads SEND0_API_KEY

agent = create_agent("anthropic:claude-opus-5-5", tools=tools)
result = agent.invoke(
    {"messages": [{"role": "user", "content": "Create an inbox called signup-agent and tell me its address."}]}
)

Every tool runs synchronously (invoke) and asynchronously (ainvoke, using send0's async client), so it works in sync scripts and async agents alike.

Tools

Tool What it does Kind
create_inbox Make a new address, e.g. signup-agent@send0.email Creates
list_inboxes Inboxes this key can use Read-only
wait_for_email Block until a matching email arrives; returns the code and link it extracted Read-only
search_messages Full-text search, filter by sender (*@github.com) or direction Read-only
get_message Read one message (new text only by default, to save tokens) Read-only
list_threads Conversations in an inbox, most recent first Read-only
get_thread A whole conversation, oldest first Read-only
send_email Start a new thread Sends
reply Answer in the same thread Sends

Options

Send0Toolkit(
    client=None,            # a configured send0.Send0; by default one is made from api_key
    api_key=None,           # default: the SEND0_API_KEY environment variable
    inbox_id="ibx_…",       # default inbox, so the model doesn't need inbox_id
    include=["create_inbox", "wait_for_email"],  # only these tools
    exclude=["send_email", "reply"],             # or everything but these
    async_client=None,      # a configured send0.AsyncSend0, for ainvoke
    base_url=None,          # self-hosted send0
)

If you pass client without async_client, async calls run the sync client in a thread.

Approval

send_email and reply have sends = True. To have a person approve them before they run, use LangChain's human-in-the-loop middleware (it needs a checkpointer):

from langchain.agents import create_agent
from langchain.agents.middleware import HumanInTheLoopMiddleware
from langgraph.checkpoint.memory import InMemorySaver

agent = create_agent(
    "anthropic:claude-opus-5-5",
    tools=Send0Toolkit().get_tools(),
    checkpointer=InMemorySaver(),
    middleware=[HumanInTheLoopMiddleware(interrupt_on={"send_email": True, "reply": True})],
)

Or leave them out with exclude=["send_email", "reply"]. An API key limited to one inbox, and an inbox with the approval send policy, are the safest setup for an agent.

Untrusted content

Email is written by strangers. Tools that return mail wrap each body in <untrusted_email> tags with a note to treat it as data, and messages send0 flags for prompt injection carry a visible warning. Don't give an agent that reads email tools it shouldn't be talked into using.

Errors

API errors are returned to the model as text, for example send0 error recipient_not_allowed: …, so it can recover instead of the run failing.

License

MIT

Metadata

Release files for langchain-send0 0.2.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 langchain-send0 0.2.0
File Size Uploaded
langchain_send0-0.2.0.tar.gz 151.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-send0 0.2.0
File Interpreter ABI Platform
langchain_send0-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 162.3 kB

Release files / langchain_send0-0.2.0.tar.gz

Download URL langchain_send0-0.2.0.tar.gz
Size 151.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4c54c69777952a6df0988f9a2f7135e237f68eff13042869e9e13ea522d6f3de
BLAKE2b-256 checksum
How to use checksums
a7d459ee9b4d9a5fe389e3b75607506f69155fc9bc0a424210f4e18795e0628d
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 Oct 9, 2026.

Transparency log

Release files / langchain_send0-0.2.0-py3-none-any.whl

Download URL langchain_send0-0.2.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9058faf5918f1882395b9cbccebce525f98dab3ba6488c5370a78366a40291d1
BLAKE2b-256 checksum
How to use checksums
9c40de73039ce5adacc4f4905e844c04560a364033bd356d99ebcf348891f994
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 Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

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