Skip to main content

carlyemail-toolkit

CarlyEmail's email tools for the OpenAI Agents SDK, LangChain, LiveKit Agents, and any other agent framework. A real inbox your agent can send, receive and reply from, without writing the tools yourself.

pip install "carlyemail-toolkit[openai]"     # or [langchain], [livekit]
export CARLYEMAIL_API_KEY=ce_us_...
from agents import Agent
from carlyemail_toolkit.openai import CarlyEmailToolkit

agent = Agent(
    name="Inbox",
    instructions="Read the thread before replying. Draft when unsure.",
    tools=CarlyEmailToolkit().get_tools(),
)
from langchain.agents import create_agent
from carlyemail_toolkit.langchain import CarlyEmailToolkit

agent = create_agent("openai:gpt-5-mini", CarlyEmailToolkit().get_tools())
from livekit.agents import Agent
from carlyemail_toolkit.livekit import CarlyEmailToolkit

agent = Agent(instructions="...", tools=CarlyEmailToolkit().get_tools())
from carlyemail_toolkit import CarlyEmailToolkit   # no framework

for tool in CarlyEmailToolkit().get_tools():
    tool.name, tool.description, tool.input_schema, tool.read_only
    tool(thread_id="...")                          # runs it

What is in it

The 25 tools the hosted MCP server serves — inboxes, threads, messages, drafts, attachments, labels, and account verification — with the same names, descriptions and parameter schemas, called over the REST API. Pass names to take only some:

tools = CarlyEmailToolkit().get_tools(["list_messages", "get_thread", "reply_to_message"])

A name that is not a tool raises rather than being dropped.

Which inbox

Every tool takes inbox_id, and most work without it. A key scoped to one inbox means that inbox. An organization with one inbox means that one. With several, the tools that read threads and drafts look across all of them, and every other tool refuses and names the inboxes so the agent can ask which — the same behaviour as the hosted server.

Errors

A failed call raises the way each framework expects — RuntimeError (OpenAI Agents SDK), ToolException (LangChain, which becomes an error message the model reads), ToolError (LiveKit Agents) — with the API's message and the fix it suggests, in one bounded line.

See https://docs.carlyemail.com/integrations/toolkit.

Release files for carlyemail-toolkit 0.1.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 carlyemail-toolkit 0.1.0
File Size Uploaded
carlyemail_toolkit-0.1.0.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for carlyemail-toolkit 0.1.0
File Interpreter ABI Platform
carlyemail_toolkit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.4 kB

Release files / carlyemail_toolkit-0.1.0.tar.gz

Download URL carlyemail_toolkit-0.1.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1060b0750b4cf3b6c82dc772650ff69d9c6e72050c5eaa88e34edd4513f60ccf
BLAKE2b-256 checksum
How to use checksums
230281a70b4f0977d223108fa73258e5072ca382c6939f8af5679af820b390f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / carlyemail_toolkit-0.1.0-py3-none-any.whl

Download URL carlyemail_toolkit-0.1.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5353bca95a08a64ac045dcd91b0d64d7426f56bf037de303b44570fa018a008
BLAKE2b-256 checksum
How to use checksums
c4931cce0dcc077c1e33274fc1081eb74c56ac4c26db96613a6a0dcd42c51755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

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