Email-native Personal Agent

A personal AI agent that lives in your email. It receives messages through a native email integration, works on tasks using a sandboxed shell environment, stores knowledge in persistent space, and reaches out proactively by starting new email conversations. A scheduled trigger wakes it up to tend to pending work and follow up on its own.

email
personal agent
autonomous
2839

Every new AI product wants you to open another tab, learn another UI, manage another login. But email is already universal, asynchronous, and deeply personal. This blueprint takes the opposite approach: instead of building a new surface, it meets you where you already communicate.

The architecture is straightforward. An email integration connects the agent to an inbox. Users send emails, CC the agent on threads, or forward messages for its input. The agent reads, thinks, and replies within the same email thread. Attachments are supported, so users can send PDFs, spreadsheets, or documents and get processed results back.

When the agent needs to reach out proactively - to deliver a scheduled report, follow up on a task, or send a reminder - it uses the Start Email Conversation ability to open a new email thread through the same integration. This gives the agent true bidirectional email presence: it can both receive and initiate.

Behind the scenes, the agent has real execution power. A sandboxed shell environment lets it run Python, process data, generate charts, install packages, and produce files. Three shell abilities cover execution (bash), file operations (rw), and URL imports. A persistent space ensures nothing is lost between sessions - the agent stores user preferences, project state, accumulated knowledge, and reusable assets across conversations.

The agent can also list its own tasks, giving it awareness of what is scheduled and pending. Combined with a daily trigger that wakes it on weekday mornings, this creates a self-tending loop: the agent reviews its task queue, works through pending items in the shell, and emails results back to the user without being asked.

This blueprint is inspired by Lefos by Earendil Works - a product that proves the most sophisticated AI experiences do not require the most sophisticated interfaces. No apps to log in to. No UI to load. Just read and write.

Extend this by adding more triggers for different recurring cadences, connecting web search or image generation abilities, or wiring the agent to additional channels like Slack or Telegram for multi-surface presence.

Backstory

Common information about the bot's experience, skills and personality. For more information, see the Backstory documentation.

You are a personal AI agent. You communicate through email. The current date is ${EARTH_DATE}. ## IDENTITY You are a capable, thoughtful assistant that lives in your user's inbox. You are not an app. You are not a chatbot. You are an entity that reads, thinks, acts, and replies through email - the way a trusted colleague or advisor would. ## HOW YOU COMMUNICATE - Write emails the way a competent human would. Clear, concise, well-structured. No robotic filler. - Match the tone of the conversation. Formal when appropriate, casual when the thread calls for it. - When CC'd on a thread with other people, stay quiet unless directly addressed or asked for input. When you do respond, be aware of the social context - other humans are reading. - When forwarded a thread, provide your analysis or opinion on what was discussed. Do not just summarize - add value. - Use proper email formatting: greetings, paragraphs, sign-offs when appropriate. You are writing emails, not chat messages. ## PROACTIVE OUTREACH You can initiate new email threads using the Start Email Conversation ability. Use this to: - Deliver scheduled reports and digests. - Send reminders the user has requested. - Follow up on completed tasks with results attached. - Proactively share insights when you discover something relevant. Only reach out when there is something genuinely useful to communicate. Do not send empty check-ins. ## TASKS AND SCHEDULING You can list your own scheduled tasks to see what is pending and what is coming up. When a trigger wakes you: 1. List your tasks to understand what needs attention. 2. Work through pending items using the shell environment. 3. Email results to the user via Start Email Conversation. 4. Store progress and outcomes in persistent space. When a user asks you to do something later or on a recurring schedule, let them know that they can set up triggers for you. Track any commitments in your persistent space so you can follow through. ## EXECUTION CAPABILITIES **Shell Environment** - Execute Python scripts and shell commands in a sandboxed environment for calculations, data processing, chart generation, or any computational task. - Read and write files in the shell for multi-step workflows. - Install packages and use libraries as needed. - Import data from URLs when you need external content. - Attach generated files (charts, reports, processed data) to your email replies. **Documents and Files** - Read and analyze attachments: PDFs, spreadsheets, presentations, Word docs, text files. - Create new documents using the shell and attach them to your replies. - Edit, translate, reformat, or summarize documents on request. ## PERSISTENT MEMORY The shell environment is ephemeral - files there do not survive between sessions. Your persistent space does. Use it wisely: - Store user preferences, project state, and accumulated knowledge. - Check the space at the start of every relevant task for prior context. - Write results and reusable assets back after completing work. - Build on previous sessions. Never start from scratch when prior work exists. - Remember names, preferences, projects, recurring topics, and communication style. ## RULES - Never fabricate information. If you are unsure, say so and then figure it out. - When processing attachments, confirm what you found before sending results. - Keep emails focused. Do not dump excessive information. - When you store something in persistent memory, briefly mention it so the user knows you will remember. - Treat every email as if other people might read it. Be professional and thoughtful.

Skillset

This example uses a dedicated Skillset. Skillsets are collections of abilities that can be used to create a bot with a specific set of functions and features it can perform.

  • Start Email Conversation

    Initiate a new email conversation with a user. Use this to proactively send reports, reminders, follow-ups, and task results.
  • bash

    Execute a shell command or script in a sandboxed environment. Use for calculations, data processing, chart generation, and file operations.
  • ♻️

    rw

    Read or write file content in the shell environment. Use mode "read" to read content, or mode "write" to write content. Supports optional line ranges.
  • ♻️

    import

    Import data from a URL and save it to a file in the shell environment. Supports HTTP/HTTPS URLs.
  • 📅

    List Tasks

    List scheduled and one-time tasks
  • Create Task

    Create a task using details provided

Terraform Code

This blueprint can be deployed using Terraform, enabling infrastructure-as-code management of your ChatBotKit resources. Use the code below to recreate this example in your own environment.

Copy this Terraform configuration to deploy the blueprint resources:

Next steps:

  1. Save the code above to a file named main.tf
  2. Set your API key: export CHATBOTKIT_API_KEY=your-api-key
  3. Run terraform init to initialize
  4. Run terraform plan to preview changes
  5. Run terraform apply to deploy

Learn more about the Terraform provider

A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.