An inbox triage and reply drafting agent for Claude Code, Codex and Cursor
Mail reads the person's recent inbox, lists what needs a reply, the commitments made by them or to them and the deadlines in it, and saves reply drafts in their Drafts for them to send. It works from your own mailbox.
Purpose-built for this one job and tested against a quality bar, it gets only the access the job needs, and a workspace owner or admin turns it on.
Or run it in the ContextStream web app, signed in with your ContextStream account. Version 0.1.0 · Updated
What does Mail do?
Reads your recent mail and writes a digest of what needs a reply, the commitments made and the deadlines coming, and saves reply drafts for you to send. It never sends anything.
What it declines
It does one job. A task like one of these is declined with a reason:
Sending, forwarding, moving, archiving or deleting mail, or marking it read: it changes nothing in the mailbox but the drafts it saves.
Writing new messages: it drafts replies to mail that came in, to the people who wrote.
Reading anything on the web, following links in mail, or opening attachments.
Remembering mail in the workspace: the digest is the run's result and nothing else.
What can Mail access, and is it safe to turn on?
Mail gets a short-lived token for one workspace that lets it do only this: read your own mailboxes, without marking anything read; save reply drafts in your Drafts, never send them; and call models through ContextStream's model proxy, within a cap set for the run. It works in one project, only for that run, and declines any task outside its job. The only things Mail may change are these: it may save reply drafts in your Drafts, never send them. A workspace owner or admin turns it on.
Model agent. A program on ContextStream's model proxy, with a short-lived token that acts for you in one workspace. It is stopped after 5 min. You may schedule it to run on its own.
Scope
What it lets a run do
mail.read
Read your own mailboxes, without marking anything read
mail.draft.write
Save reply drafts in your Drafts, never send them
model.invoke
Call models through ContextStream's model proxy, within a cap set for the run
How is Mail tested?
Mail is checked on 13 cases, each with a known right answer: fixture mailboxes with seeded commitments, deadlines and messages that need a reply, inputs it must refuse with a clear error, and requests outside its job it must decline. A case passes only if the run ends the way the case expects, declining what is not its job, and every check holds: it finds at least 90% of the seeded commitments and deadlines, every quote is in its message, the right messages are listed as needing a reply, drafts are saved only where expected, nothing is sent, and no host outside ContextStream is reached. The mailboxes and the model's replies are fixed test data, so the cases check how the digest is held to the mail and its rules on sending, not the live model's own reading of the mail. Version 0.1.0 passes all 13.
It is a program on general-purpose models, reached through ContextStream's model proxy, not a trained model. Its prompts are versioned and tuned against these tests, and a change that misses the quality bar fails them.
What does a real run of Mail look like?
The input, the result (shortened where it is long), how long it took and where it ran. Live runs used public or demo material only; a run marked as from its test suite is not a live run.
Mail never runs live for this site: a live run reads a real mailbox. The example comes from the agent's test suite, where the mailbox is a fixture.
From its test suite, not a live run
A daily digest of a fixture mailbox (test case)
Version
0.1.0
Outcome
succeeded
Ran
2026-10-27 17:17 UTC
Took
Not timed (test data)
The agent's offline test suite: its real program, against a stand-in for ContextStream holding a fixture mailbox, a scripted model, with no network. Not a live run.
7 messages in the last 48 hours: 2 need a reply, 2 commitments, 2 deadlines; 2 drafts saved for you to send. Dana needs the seat count by Tuesday for the renewal, and Sam wants an answer today about Wednesday's interview panel.
Needs a reply
Interview panel on Wednesday?, from Sam Okafor <[email removed]>: Sam asks whether you can join Wednesday's interview panel and needs an answer today. (high urgency, draft saved)
Renewal quote for 2027, from Dana Ruiz <[email removed]>: Dana needs the seat count confirmed for the 2027 renewal quote. (high urgency, draft saved)
Commitments
You: Send Lee the migration runbook by 2026-10-19. “I'll send you the migration runbook by Monday.”
They: Northwind holds the current price of $48 per seat by 2026-10-31. “We will hold the current price of $48 per seat until October 31.”
Deadlines
Confirm the seat count to Northwind: 2026-10-20. “Could you confirm the seat count by Tuesday, October 20”
Pay CloudHost invoice INV-2291: 2026-10-30. “Your invoice INV-2291 for $412.00 is due on October 30, 2026.”
The digest (Markdown)
# Mail digest, 2026-10-16
7 messages in the last 48 hours: 2 need a reply, 2 commitments, 2 deadlines; 2 drafts saved for you to send. Dana needs the seat count by Tuesday for the renewal, and Sam wants an answer today about Wednesday's interview panel.
## Needs a reply
- **Urgent: Sam Okafor**, "Interview panel on Wednesday?": Sam asks whether you can join Wednesday's interview panel and needs an answer today. Draft saved in Drafts.
- **Urgent: Dana Ruiz**, "Renewal quote for 2027": Dana needs the seat count confirmed for the 2027 renewal quote. Draft saved in Drafts.
## Commitments
- You: Send Lee the migration runbook (by 2026-10-19). "Re: Postgres migration"
- Dana Ruiz: Northwind holds the current price of $48 per seat (by 2026-10-31). "Renewal quote for 2027"
## Deadlines
- 2026-10-20: Confirm the seat count to Northwind. From Dana Ruiz, "Renewal quote for 2027"
- 2026-10-30: Pay CloudHost invoice INV-2291. From CloudHost Billing, "Invoice INV-2291 is due October 30"
---
Read 7 messages in full of 7 messages in [email removed]. Nothing was sent, moved or marked read.
Checks: 4 of 4 passed
mail_read: Read 7 messages in full of 7 messages in the window.
grounded: Every commitment and deadline quotes its message.
drafts: 2 saved in Drafts, 0 not saved.
no_sends: Sent nothing, and moved, deleted or marked nothing: drafts wait in Drafts for you.
Email addresses are removed.
Test case
daily-digest, in its test suite
Depot run
0zb9r381xr
Which tools does Mail work with?
Claude Code, Codex, Cursor and other MCP clients: ContextStream's MCP gives them an agents tool that finds, runs and follows Mail. It also runs from a terminal or an agent's shell with csa run mail, and from the ContextStream web app.
Claude Code, Codex, Cursor and other MCP clients: connect ContextStream's MCP once (setup for each editor), then ask your agent to hand the job to Mail.
A terminal or an agent's shell:csa run mail, installed with ContextStream's command line.
The web app: the workspace's agent library.
How do I turn Mail on?
An owner or admin of your ContextStream workspace turns Mail on in the web app's agent library. Agents are opening workspace by workspace; if yours is not open yet, the library says so.
Sign in to ContextStream: the button below opens the agent library on Mail.
An owner or admin switches Mail on for the workspace.
Pick the project it works in, and run it from the library, from your coding agent or with csa run.
Ask your coding agent to hand the job to Mail, or call it yourself: csa run mail in a terminal, or agents(action="run", agent="mail", input={...}) over MCP.
Connect ContextStream's MCP (it also writes each editor's connection):
The daily digest: the last 24 hours of every mailbox, with up to three reply drafts saved. Over MCP:
agents(action="run", agent="mail", input={})
In a terminal (curl -fsSL https://contextstream.io/cs/install.sh | sh installs csa):
csa run mail
Input
Field
Type
What it is
mailbox
string
The mailbox to read. Defaults to every mailbox you have, up to three.
window_hours
integer
How far back to read, in hours. Defaults to 24; a weekly digest uses 168.
max_messages
integer
How many of the newest inbox messages to look at in each mailbox. Defaults to 40.
drafts
integer
How many reply drafts to save in your Drafts, at most. 0 saves none. Defaults to 3.
reply_style
string
How the drafts should read, for example "short and friendly, signed Ada".
focus
string
What to look at first, for example "anything from Acme about the renewal".
dry_run
boolean
Put the drafts in the digest without saving them.
as_of
string
Read the window as of this time instead of now.
What does Mail cost?
Mail costs 500 ContextStream credits a run, charged only when the run succeeds; a declined, failed, cancelled or timed-out run costs nothing. Credits come with every plan: Starter is free with 10,000 a month (20 runs of Mail, if spent on nothing else), and Pro is $19 a month with 25,000.
A run starts only once its price is accepted. Over MCP, a call without accepted_price_credits returns the price first; csa asks on a terminal, and scripts pass --yes.
Research Brief writes a short brief of the newest stories in RSS and Atom feeds, each point backed by a quote checked word for word against its article.
Checked on 7 test cases with known answers: all 7 passv1.0.0