Persistent Email Memory with Letta Agents

Combine Letta's persistent memory with MultiMail's email infrastructure — agents that remember past email conversations and build relationships over time.


Letta (formerly MemGPT) provides agents with persistent memory that survives across conversations. When combined with MultiMail, your agents can remember past email interactions, track relationship history, and compose contextually aware messages — even weeks after the original conversation.

MultiMail's thread tracking pairs naturally with Letta's archival memory. An agent can store email thread summaries in its long-term memory, retrieve them when a contact emails again, and draft replies that reference prior exchanges. The default gated_send mode ensures a human reviews these context-rich responses before delivery.

Integration uses Letta's tool system. Register MultiMail API functions as tools available to your Letta agent, and the agent can invoke them alongside its memory operations.

Built for Letta (MemGPT) developers

Memory-Enhanced Email Conversations

Letta agents store email context in archival memory. When a contact emails again, the agent retrieves past interaction summaries to compose informed, relationship-aware replies.

Cross-Session Thread Continuity

MultiMail tracks email threads, and Letta maintains memory across sessions. Together, your agent can resume an email conversation days later with full context of what was discussed and decided.

Graduated Trust with Relationship Context

As a Letta agent builds memory about reliable email patterns, you can progressively relax oversight from gated_send to monitored. The agent's persistent memory helps it learn appropriate communication styles.

Contact Relationship Management

Letta's memory system combined with MultiMail's contact management creates a relationship layer. The agent remembers preferences, past issues, and communication patterns for each contact.


Try it with your agent

No code, no dashboard. Paste this to your AI agent — it connects MultiMail, creates an inbox, and builds the flow for you.

1. Get MultiMail ready: read https://multimail.dev/llms.txt, connect the MultiMail MCP server in your agent environment, create a free inbox for this agent, and set up a verified sending domain so the agent can send mail from an approved address. 2. Wire MultiMail into Letta: in Letta, add the MultiMail MCP server as an external MCP server, then attach the imported MultiMail tools to your Letta agent so they are available during the agent’s normal tool-calling loop alongside its persistent memory. 3. Give the agent email capability: configure the Letta agent’s instructions to use its MultiMail tools to check the inbox, read prior conversation context from memory before drafting, compose replies, and send or schedule email only through MultiMail. 4. Send a test email: ask the Letta agent to check its MultiMail inbox, draft a short reply that references what it remembers about the contact, and prepare one outbound test message from the verified sender to a test recipient. 5. Run with oversight: set MultiMail to gated_send for this agent so every outbound email is held for developer review and approval before sending; keep the agent in gated_send while testing, then move to monitored or autonomous only when its behavior is ready.

Step by step

1

Create a MultiMail Account and API Key

Sign up at multimail.dev, create a mailbox, and generate an API key from your dashboard. Your key will start with mm_live_.

2

Install Letta

Install the Letta package and start the Letta server.

3

Register Email Tools

Define email functions as Python code strings and register them with the Letta client using create_tool. Create tools for send_email, check_inbox, and reply (wrapping POST /v1/mailboxes/{mailbox_id}/reply/{email_id}).

4

Create Your Email Agent

Create a Letta agent with the email tools attached and a system prompt that explains the oversight mode and instructs the agent to use archival memory for email context.

5

Approve Pending Emails

Review emails queued by the agent in the MultiMail dashboard. Approve messages before delivery. The agent's memory-enhanced context should produce higher-quality drafts over time.


Common questions

How does Letta's memory improve email responses over time?
Letta agents store email interaction summaries in archival memory. When a contact emails again, the agent searches its memory for past interactions and uses that context to compose informed replies. Over time, the agent builds a relationship history that makes responses more relevant and personalized.
Does the agent remember emails across sessions?
Yes. Letta's core feature is persistent memory across sessions. Email summaries stored in archival memory survive indefinitely. Combined with MultiMail's thread tracking, the agent has both its own memory and the email system's thread history to draw from.
Can I use Letta's recall memory for recent email context?
Yes. Recall memory captures recent conversation turns including email tool invocations. For recent email threads, the agent can reference recall memory for exact details. For older interactions, archival memory provides summarized context.
What happens when Letta's memory contradicts the email thread?
Use MultiMail's GET /v1/mailboxes/{mailbox_id}/threads/{thread_id} endpoint to retrieve the authoritative email thread history. The agent should cross-reference its memory with the actual thread data. You can instruct the agent in its system prompt to always verify memory against the thread before composing replies.

Explore more

The only agent email with a verifiable sender

Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a hosted MCP server. Formally verified in Lean 4.