Integration
LiveKit Agents Email Integration
Your voice agent takes the call — Dead Simple Email sends the follow-up. A @function_tool wrapping the Python SDK, or the full MCP toolset, for LiveKit Agents 1.x.
The Recipe: Voice Call In, Email Out
Voice agents built on LiveKit Agents handle the conversation, but callers still expect something in writing afterward — a summary, a booking confirmation, a quote. Give your agent its own inbox and a send_followup_email tool, and it closes that loop itself: the caller says "email me the details," the agent calls the tool, and the message lands in their inbox before they hang up.
There is no dedicated LiveKit plugin package as of August 2026, and none is needed — the two recipes below use LiveKit's own extension points: function tools and MCP.
Recipe 1: A @function_tool for Follow-Up Email
LiveKit function tools are async methods on your Agent class. Wrap the async SDK client so the tool never blocks the voice pipeline:
import os from livekit.agents import Agent, RunContext, function_tool from deadsimple import AsyncDeadSimple dse = AsyncDeadSimple(api_key=os.environ["DSE_API_KEY"]) AGENT_INBOX_ID = os.environ["DSE_INBOX_ID"] class Assistant(Agent): def __init__(self): super().__init__( instructions="You are a phone assistant. When the caller asks for " "anything in writing, send it with send_followup_email.", ) @function_tool() async def send_followup_email( self, context: RunContext, to: str, subject: str, body: str ) -> str: """Send a follow-up email to the caller. Args: to: The caller's email address. subject: Subject line. body: Plain-text body of the email. """ result = await dse.messages.send( AGENT_INBOX_ID, to, subject, text_body=body ) return f"Email sent ({result.message_id})"
The docstring's Args section becomes the tool schema the LLM sees. During the call, "can you email that to me at sam@example.com?" triggers the tool with the right arguments, and the agent can confirm out loud once it returns.
Create the sending inbox once — dse.inboxes.create(display_name="voice-agent") returns an inbox with its own address — and reuse its ID across sessions.
Recipe 2: The Full MCP Toolset
LiveKit Agents 1.x supports MCP servers as tool sources. If you want the agent to manage inboxes, read replies, and wait for verification codes — not just send — connect the hosted MCP server:
import os from livekit.agents import AgentSession, mcp session = AgentSession( # ... your stt / llm / tts configuration ... tools=[ mcp.MCPToolset( id="deadsimple-email", mcp_server=mcp.MCPServerHTTP( "https://api.deadsimple.email/mcp", headers={"Authorization": f"Bearer {os.environ['DSE_API_KEY']}"}, ), ) ], )
The toolset exposes 14 tools: create_inbox, list_inboxes, delete_inbox, send_email, read_messages, read_message, reply_to_message, forward_message, wait_for_email, get_verification_code, get_verification_link, list_threads, read_thread, and get_usage. For a voice agent, consider LiveKit's allowed_tools filter to keep the tool list short — a caller rarely needs the agent deleting inboxes mid-conversation.
Running locally instead? The same server works over stdio: python -m deadsimple.mcp with DSE_API_KEY in the environment (pip install deadsimple-email[mcp]).
Practical Notes for Voice
Keep tools fast. A send_email call returns in well under a second, which is fine mid-conversation. Longer operations — waiting for the caller to reply to the email, for instance — belong after the session ends, not inside a function tool the caller is waiting on.
Confirm out loud. Return a short, speakable string from the tool ("Email sent") so the LLM can tell the caller it's done rather than reading out a message ID.
One inbox per agent. Inboxes are the billing and identity primitive. Give each deployed voice agent its own inbox so replies, threads, and usage stay separated.
Frequently Asked Questions
Yes. LiveKit function tools are plain async Python methods, so a @function_tool that calls the Dead Simple Email SDK lets the agent send a follow-up email mid-call or after the call ends. The agent decides when to call it based on the conversation.
Yes, LiveKit Agents 1.x supports MCP servers as tool sources. Wrap our hosted server in an mcp.MCPToolset with your API key in an Authorization header and the agent gets all 14 email tools.
No dedicated LiveKit plugin package exists as of August 2026, and you don't need one: the @function_tool recipe uses our standard Python SDK (pip install deadsimple-email), and the MCP path uses LiveKit's built-in MCP support.
No. Function tools are async and AsyncDeadSimple makes non-blocking HTTP calls; a send typically completes in well under a second. Save longer operations, like waiting for a reply, for after the session ends.
Yes. The free tier includes 5 inboxes and 5,000 emails per month, requires no credit card, and does not expire.