# Inbox Autopilot

> A safe, low-cost e-mail assistant: wakes the model only for new mail, drafts but never sends, trashes but never deletes.

Inbox Autopilot is a paid AI agent skill on Agensi by Michal Burgermeister, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $12 (one-time purchase)
- Creator: [Michal Burgermeister](https://www.agensi.io/creators/michal-burgermeister)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-10-16
- Security: scan passed (2026-10-16); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/inbox-autopilot
- Tags: automation, python, gmail-api, productivity, email-management, gmail, inbox, hermes-agent

## About this skill

Your inbox is a source of constant context switching and technical debt. This skill implements a production-ready, three-tier assistant that triages incoming mail, generates daily digests, and performs verifiable cleanups using a low-cost, script-gated architecture.

### What it does
- **Deterministic Triage** uses a script-based gate to wake the model only when new mail arrives, preventing expensive empty runs.
- **Smart Classification** categorizes mail into routine (newsletters, receipts) or attention-required (clients, deadlines) categories.
- **Automated Drafting** prepares replies for important messages without sending them, keeping you in control.
- **Evening Summarization** groups a day of JSON-extracted mail facts into a security-first categorized digest with clear action items.
- **Verifiable Cleanup** moves older routine mail to Trash while logging every message id so a single command can restore it.

### How it works
1. **Setup** runs the credential script to securely store IMAP environment variables and test the connection.
2. **Monitor** executes a read-only script to detect new unread UIDs before invoking the LLM.
3. **Process** triggers the agent to label messages, mark them as read, and prepare summaries or drafts.
4. **Digest & Purge** runs an evening cycle to summarize activity and trash routine items older than 24 hours.

### Frameworks & tools
Built with Python and Shell scripts using standard libraries. Compatible with Hermes Agent, cron, or any task scheduler. The change monitor and digest work with any IMAP inbox (verified TLS); cleanup and restore use Gmail search and are Gmail-only.

### Why this beats prompting it yourself
Prompting alone leads to high token costs from constant polling and "no new mail" responses. This skill provides a deterministic gate and a logged, reversible cleanup mechanism that ensures no important mail is permanently lost to aggressive AI filtering.

### Use cases
- Manage a high-volume professional inbox without missing critical client offers.
- Consolidate noisy newsletters and platform notifications into a single evening report.
- Keep the inbox short by moving verified routine mail to Trash, recoverable for 30 days.
- Monitor for security-critical mail like password resets or new login alerts.

### Known limitations
Requires an app-specific password or OAuth setup. IMAP UIDs must be mapped correctly to Gmail API IDs. The cleanup script only targets messages older than 24 hours to prevent digest gaps.

## Requires

- Python 3.9+
- Gmail or any IMAP account (app password)

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Inbox Autopilot skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill prevent high token costs compared to standard AI email tools?

This skill uses a script-gated architecture that only triggers the LLM when new, unread mail is detected, preventing costly 'no new mail' API calls and ensuring your tokens are spent only on actual processing.

### Which email providers are supported, and is the setup difficult?

Gmail fully (triage, digest, cleanup, restore). Any other IMAP inbox — Outlook, iCloud, Seznam and others — for the change monitor and the digest; cleanup and restore rely on Gmail search and are Gmail-only. Set-up is one interactive script that stores an app password in a chmod 600 file and tests the login.

### Can the AI delete important emails or send replies without my permission?

No. Replies are only ever saved as drafts — there is no send step. Mail is moved to Trash (recoverable for 30 days), never permanently deleted; starred, important and needs-attention mail and anything newer than one day are never touched; every moved message id is logged so restore_from_trash.py can bring it back.

### What exactly is included?

Six scripts (credential setup, change monitor, digest data collector, cleanup with dry run and verification, restore, shared IMAP helper), ready-made job definitions for Hermes Agent and plain cron (references/jobs.md), SKILL.md for the agent, README.md, and 9 tests that run against a fake Gmail server.

### Are there any specific technical requirements or dependencies I should know about?

The skill requires an app-specific password or OAuth credentials and is designed to run in any environment that supports Python and standard shell scripts.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
