CrewAI email integration

Give a CrewAI agent a real email mailbox — its own address on your domain, outbound sending, inbound replies as structured events, and thread context — using the official LoftBox Python SDK's CrewAI tools.

Install

pip install loftbox[crewai]

Wire the tools into your crew

from loftbox import LoftBox
from loftbox.integrations.crewai import get_crewai_tools
from crewai import Agent, Task, Crew

client = LoftBox(api_key="lb_live_xxx")
tools = get_crewai_tools(client)

support = Agent(
    role="Email support agent",
    goal="Check the inbox and reply to customers",
    backstory="An agent operating a LoftBox mailbox.",
    tools=tools,
)
task = Task(
    description="Check mailbox mb_123 for new mail and summarize it",
    agent=support,
    expected_output="Summary of new mail",
)
Crew(agents=[support], tasks=[task]).kickoff()

A complete runnable example ships with the SDK: examples/crewai_agent.py.

Inbound mail is untrusted input

A crew that reads email ingests attacker-controlled text. LoftBox scores every inbound message across 6 prompt-injection categories and exposes the risk signal on both the API and the webhook — so your crew can route suspicious mail to a human instead of acting on it.

What you get beyond tools

Get an API key — free Read the docs

Package: PyPI loftbox · Source: GitHub · Also see LangChain, the MCP server, or how LoftBox compares.