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.1

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.1
File Size Uploaded
langchain_send0-0.2.1.tar.gz 151.9 kB Details

Built distribution (wheel)

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

Total release size: 162.3 kB

Release files / langchain_send0-0.2.1.tar.gz

Download URL langchain_send0-0.2.1.tar.gz
Size 151.9 kB
Tags Source
SHA-256 checksum
How to use checksums
96389c8e8f1666f72f4a18cae5b76f07b5ccdef2624135cfdaa90bf3ee70ab0b
BLAKE2b-256 checksum
How to use checksums
1d7ef0abab5b15b4f0ac96e8c957063b56449e50966f3c17102acd18e0bfd560
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 13, 2026.

Transparency log

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

Download URL langchain_send0-0.2.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54d55bfe9e715b107a05a01baeabb52d9f6e12853b2a66de1e8fa8836248d78b
BLAKE2b-256 checksum
How to use checksums
9d45f1af463f9ecc1fff8d2833bcb441515eca712fc8732403205b1970d476e6
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 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

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