AgentMailr is now Lumbox. Same product, new name. Learn more →
← All integrations

LangChain + Lumbox

Give a LangChain agent its own inbox, OTP extraction and email send/receive in one call.

Python

LangChain is the most widely used framework for building LLM agents. Lumbox ships a first-class LangChain tool factory: create_langchain_tools() returns ready-to-bind tools so your agent can create an inbox, wait for an OTP, and read, send or reply to email without any glue code.

$ pip install "lumbox[langchain]"
from lumbox import create_langchain_tools
from langchain.agents import create_react_agent
from langchain_openai import ChatOpenAI

# One call: agent-owned inbox, OTP extraction, send/receive, all as tools
tools = create_langchain_tools(api_key="ak_...")

agent = create_react_agent(ChatOpenAI(model="gpt-4o"), tools)
agent.invoke({
    "messages": "Sign up at example.com and confirm the verification email"
})

How it works

  1. 1Install the LangChain extra: pip install "lumbox[langchain]".
  2. 2Call create_langchain_tools(api_key) to get ready-to-bind LangChain tools.
  3. 3Pass the tools to your LangChain agent (create_react_agent or AgentExecutor).
  4. 4The agent can now create an inbox, wait for an OTP, and send or read email on its own.

FAQ

How do I give a LangChain agent an email inbox?

Install lumbox[langchain] and call create_langchain_tools(api_key='ak_...'). It returns LangChain tools for creating an inbox, waiting for an OTP, and sending or reading email. Bind them to your agent and it can handle email autonomously.

Can a LangChain agent read OTP verification codes?

Yes. Lumbox's get_otp / wait_for_email tools long-poll until the email arrives and return the extracted OTP code as JSON, so the LangChain agent never has to parse raw email or run a polling loop.

Give your LangChain agent an inbox