# Inbox assistant

Sorts each new email, drafts your replies to the ones that need you, and leaves you a digest every evening.

Requires your email account, through AgentRun's email trigger. Runs on a schedule.

## Install

Before you install, connect your mailbox under Settings → Email with an app password. Gmail, Fastmail and iCloud work, and so does any other mail provider. It runs on your machine and on your ChatGPT plan.

[The setup guide](https://github.com/Parcha-ai/agentrun/blob/main/docs/inbox-quickstart.md) walks you through it step by step.

```sh
npx @parcha/agentrun template install github:Parcha-ai/agentrun-templates/templates/inbox-assistant@242f29da8317fbe51d0cce4628bdb5ab61d7ccc9 --trust
```

Or open `<your AgentRun address>/#/templates/install?src=github%3AParcha-ai%2Fagentrun-templates%2Ftemplates%2Finbox-assistant%40242f29da8317fbe51d0cce4628bdb5ab61d7ccc9`. Pinned to commit 242f29da8317fbe51d0cce4628bdb5ab61d7ccc9.

## What it does

Files each new email under Needs reply, FYI or Ignored, drafts your reply to what needs you in your own voice, and leaves you a short digest every evening. It drafts and never sends, so you press send in your mail app.

- Skill `digest`: Write the owner's evening digest of today's mail, needs me first with the drafts waiting, then FYI in a line each, then the ignore count, and save it as one draft addressed to the owner. Read-only except that one email\_draft. Use on the schedule's run or the digest input.
- Skill `triage`: Sort one new email into needs\_me, fyi or ignore with a one-line reason, file it under Needs reply, FYI or Ignored, and draft the owner's reply in their voice when it needs them. Its only writes are one email\_draft to the sender and one email\_file of this email. Use for each email the trigger hands over, or the message\_id input.

## What starts it

- An email trigger. At most 2 at once.
- On a schedule: every day at 18:00 (UTC), unless you pick another time when you install it.
- On a schedule: Mondays at 08:00 (UTC).
- By hand, any time: from the console, the API or the CLI.

## Inputs

| Name | Type | Required | What it is |
| --- | --- | --- | --- |
| `message_id` | string, 0 to 300 characters | no | Sort and draft for this one message, for a run by hand (its Message-ID header). Leave it out on the trigger's runs: the email comes with the run. Example: `<CAF3x9Q@mail.example.com>`. |
| `digest` | boolean | no | Write the digest now, for a run by hand. |
| `weekly` | boolean | no | Write the Monday brief now (the week ahead) instead of the day's digest, for a run by hand. |

### Setup, filled in once at install

| Name | Type | Required | What it is |
| --- | --- | --- | --- |
| `owner_name` | string | yes | Your name, as you sign mail. |
| `owner_email` | string, email | yes | Your address. Mail from it is never sorted, and the evening digest is drafted to it. |
| `voice` | string, 0 to 600 characters | no | How you write, in a line or two: "short, first names, no exclamation marks, sign off '— D'". Blank: it copies your own replies in the thread. |
| `vip_senders` | list of string | no | Addresses (ana@acme.com) or whole domains (@acme.com) whose mail is never ignored. |
| `ignore_rules` | list of string | no | Plain rules for mail to ignore, one per line: "newsletters", "anything from @linkedin.com", "CI notifications" |
| `cron` | string, cron | no | When the digest runs, as a cron line: 18:00 every day unless you set it. Default: `0 18 * * *`. |
| `weekly` | boolean | no | Monday brief: every Monday at 08:00 your time, a note on the week ahead (what needs a reply, what waits on others, what's coming up). Email only for now; the calendar comes with Settings → Calendar. Default: `false`. |
| `timezone` | string, timezone | no | Your IANA time zone (Europe/Madrid, America/Los\_Angeles): the cron line and the digest's times are read in it. Default: `UTC`. |

## What it needs

- Harness: codex, pi
- Model: balanced tier, medium effort
- Tools: read, email_search, email_read, email_draft, email_file
- Computer: Wherever your AgentRun puts a new agent
- Keys: A ChatGPT sign-in (Codex runs on your plan), or a model key
- Learning: on

## Sample output

No sample output ships with this template yet.

## Tested

Passes 9 of 9 eval cases on pi and 6 of 9 on Codex. On pi each case ran 6 times, 3 on a Gmail mailbox and 3 on one with folders, and all 54 runs passed. On Codex, on a ChatGPT plan, 6 cases ran the same way and all 36 runs passed; the other 3 cases have not run yet.

9 eval cases: cc-only, digest, injection-forward, monday-brief, needs-me-drafts, never-trash, newsletter-ignored, thread-scope, vip-fyi.

## Source

- Package: https://github.com/Parcha-ai/agentrun-templates/tree/242f29da8317fbe51d0cce4628bdb5ab61d7ccc9/templates/inbox-assistant
- Publisher: Parcha-ai
- Author: Parcha Labs
- Version: 0.1.0
- License: Apache-2.0
- Category: Personal
- Page: https://marketplace.agentrun.ai/templates/inbox-assistant/
