Repository navigation
Find your email in the same search as your notes and messages, and see a person's mail beside their chats when you look them up. Ask your agent what a client wrote last week, and get the answer with the email it came from.
You can also have new mail turned into proposals, such as a task or a new contact: an agent reads each new email, and nothing is created until you confirm it.
Mail comes in through the separate mail program. mail copies your
mailbox into the shared WireCat store on your computer, and wcat searches and shows what is there. wcat never changes
your mailbox and never sends mail. You need one mailbox added in mail.
On this page:
- Bring mail in with mail
- Search and read mail in wcat
- Newsletters and lists you are subscribed to
- An agent that reads new mail and proposes tasks
- Find your mail
- When mail is deleted
- Mail and people
- Phones and links in mail
- How the mail agent works
Install mail and add your mailbox. Its documentation
lists the steps for each provider, such as the IMAP setting and the app password (a separate password for one program,
which you can revoke at any time).
pnpm add -g @wirecat/mail-cli
mail personal session start --address me@example.com
mail personal sync
mail personal statuspersonal is a profile name you choose for one mailbox. session start signs in, sync reads the last 30 days into the
shared store, and status shows how far a large mailbox is. Run mail personal sync again to bring in new mail. wcat needs
no setting for this mail: it reads the same store.
mail keeps the text and the headers of each message, and the text it reads from each attachment of up to 10 MB, not
the files. See its documentation for what it keeps
and how to keep a mailbox up to date. Everything about the mailbox itself is mail's too:
-
mail personal account inspectgroups a mailbox's mail by sender and list with a spam score, before a big first sync;--domain-ageasks when each sender's domain was registered. -
mail personal messages import takeout.mboxadds years of old Gmail from a Google Takeout file to the same mailbox, each email once. -
mail personal rules add,rules listandrules removedecide which mail is stored whole, as an envelope or not at all. -
mail personal messages delete --rulesshows the envelope mail your rules let go;--yesmoves it to Trash, andmail personal messages restore --runbrings it back by the run id the delete answered with.
wcat sync and its timer embed the mail mail stored for search by meaning when the search model is
on your computer; --no-embed skips it.
wcat search mail 'invoice'
wcat messages show 'msg:email/me%40example.com/thread/42'messages show takes the ref of a search hit. wcat search all finds this mail together with your notes and
messages. More search words are in Find your mail and Search.
wcat review subscriptions list shows the mail sent to many readers (reach broadcast), one row per list (its
List-Id), or per sender when the mail names no list, newest first:
wcat review subscriptions list # every mailbox, 100 lists a page
wcat review subscriptions list type:promotion # only lists whose mail is marketing
wcat review subscriptions list --source email:work --page 2 --jsonEach row has key, list_id, name, sender (the bot: or person: that sent its newest mail), emails,
newest and unsubscribe: the https and mailto addresses the list gives for leaving it, and one_click when one
request does it. An address is shown only when the sender's own domain signed it (DKIM), so a forged link is never
offered. wcat never unsubscribes for you. Mail stored before wcat kept these addresses shows can_unsubscribe: false
until it is read again. To read a group's mail, search for its list_id: wcat search mail 'list:weekly.news.example.com reach:broadcast',
or for a row with no list, its sender: wcat search mail 'from:news@shop.example reach:broadcast'.
Let an agent read your new mail and propose what to do about each email: a task, a close or an update of an open task,
a fact, a memory, a link or a new contact. Nothing is created until you confirm it in wcat review. The one thing it
does itself is file a sender it is sure only sends newsletters, promotions or notices as envelopes: the next sync keeps
that sender's mail without its text. The agent never sends, drafts, moves or deletes mail, never changes or removes a
rule, and never decides for you.
Turn it on once:
wcat schedule agent mail-triage claude 'Run wcat skill show mail-triage and follow it.' --every 5m --on-new-mail mail-triage --max-cost 1 --max-cost-per-day 5Every 5 minutes the schedule checks the store. With no new mail it does nothing and costs nothing: no model call, no
notification. It waits until 10 emails wait for it, or the oldest has waited 30 minutes, so a day of scattered mail
costs a few runs, not dozens. A run that costs more than 1 US dollar stops, and once the day's runs have cost 5, no run
starts until the next day. wcat schedule list shows the day's spend and why it skipped. Its first run starts from
now; older mail is not read.
You decide in wcat review: wcat review show 17080, then wcat review confirm 17080/f1 or
wcat review reject 17080. No agent can confirm or reject mail findings. wcat review status shows each mailbox's
mark and what waits.
Email bodies go to the model provider of the agent you schedule. Stop it with wcat schedule remove mail-triage.
How the mail agent works has the waits and limits you can change, the model it runs on,
and its steps.
wcat search mail 'invoice'
wcat search mail 'from:kai subject:budget'
wcat search mail 'mailbox:starred' --source email:you@example.com
wcat search mail 'trip NOT mailbox:bulk'
wcat search all 'budget'Mail sent to many — newsletters, notices, mailing lists, anything with a List-Id, List-Unsubscribe or
Precedence: bulk header — is in the mailbox bulk (wcat:bulk), so NOT mailbox:bulk leaves it out when it
crowds a search. It is not left out by default: bills, bookings and other notices from companies carry the same
headers. --source email:you@example.com names one mailbox; --source email:a@example.com,email:b@example.com searches
both.
mail personal sync also scores every sender from the mail already stored, at most once a day, the same way
mail personal account inspect scores a group. A hit from a scored sender carries sender_score in --json, with the score
and its signals. Mail from a sender whose signs of fraud add up to 3 or more comes after the rest of the page in
wcat search mail and wcat search all, and its sender_score says demoted: true; nothing is left out. Your own
are never moved: a domain you wrote to anyone at, your mailbox's domain, and a sender a protect rule keeps.
--plain-order keeps such mail where the words put it, to find it:
wcat search mail 'invoice' --plain-orderGmail labels such as Inbox, Important, Starred and your own labels become mail folders, so
mailbox:important finds them. See Search.
wcat messages show 'msg:email/me%40example.com/thread/42' prints one email whole, with the text mail read from each
attachment, such as a bill's PDF: the first 4,000 characters of each, or all of it with --full.
With --before-n and --after-n it also prints that many earlier and later emails of the same thread, oldest
first, with the email you asked for marked anchor: true. The thread is the one the mailbox gives (Gmail's own
thread, or for other mailboxes the first email its References header names). An email alone in its thread, such
as most newsletters, comes back alone.
When you delete an email in your mailbox, its text leaves the store on the next mail personal sync, and wcat no
longer finds it.
An address a person's contact already has joins that person by itself. Another address joins them when you link
it: wcat people link email:kai@example.com telegram:Kai. Then their mail is part of
their context.
wcat finds phones, e-mail addresses, links, names and street addresses in every stored email, note and document. List them and say what they are:
wcat mentions list kind:phone --source email:personal
wcat mentions show 40 --source email:personal
wcat mentions confirm 40 person:7 --source email:personal
wcat mentions reject 41 --source email:personal--source names what to read, the same way in every WireCat tool: email:personal one mailbox, email:personal,email:work
several, mail every mailbox (the answer lists which), notes wcat's notes, documents imported documents, and
group:clients a saved group. show lists the senders who may own a phone, but links nothing until you confirm it.
The schedule's waits and limits change per schedule with --mail-wait 1h, --mail-batch 20 and
--max-cost-per-day 2, or for every schedule in the config file: schedule_mail_wait, schedule_mail_batch and
schedule_max_cost_per_day (wcat config show lists them; a flag wins over the file). Newsletters, suspicious senders
and other mail it would skip do not count toward the batch.
When enough mail waits and the day's budget allows, the schedule starts claude on Sonnet with only wcat and mail
allowed, under WCAT_READ_ONLY and MAIL_READ_ONLY, and without your MCP servers, skills, settings and CLAUDE.md: a
run starts on about 4,700 tokens instead of 38,000. --model opus picks another model for one schedule, and
schedule_model_claude in the config file for every new one; schedule_lean_start: false loads your setup. Both
apply when the schedule is added, so add it again after changing them. The prompt it follows is
wcat skill show mail-triage.
The agent keeps its place with a mark: the mail-triage holder's position in each mailbox. A run may move that mark
and no other. What it does, per mailbox:
-
wcat review mail --holder mail-triage --source email:me@example.com --jsongives the mail past its mark. Newsletters, envelope rules, drafts, suspicious senders and mail not yet stored whole are left out, and counted. Other mail sent to many — an order, an invoice or a site form with an unsubscribe link — comes last as its subject and first lines (excerpt_only), at most 30 a read; the agent reads one whole when it looks like something for you. A bulk email is a newsletter when words in its subject and first lines, its sender's address, an emoji or an unsubscribe link say so, and no order word in the subject, order number or reply says otherwise; themail_bulk_*settings inwcat config showhold the words, the score and the limits, andmail_bulk_excerpts: falseleaves all bulk mail out. Each email has thefingerprinta finding cites it by, and says whether its sender is new. - It keeps the emails that ask something of you, carry a date, or answer a thread with an open task.
- It reads context for those only, through links the store already has: the thread,
wcat contextof the sender. - It stages one batch:
wcat review findings add findings.json --key KEY --source email:me@example.com, the JSON as one argument (a file or-for stdin work too) and the key the review gave in itsmail-findings.addstep. A new sender gets a link to a known person, or a new contact proposal only when the email's text gives a better name than the sender line. Aftermessages resetthe key ends in-r1,-r2and so on, so a run over mail read again stages beside a batch still waiting for you. - Then, and only then,
wcat messages acknowledge --holder mail-triage --cursor CURSOR --source email:me@example.commoves its mark to the cursor the review gave. A run that fails before this reads the same mail again; the same batch is not staged twice. - For a sender not linked to a person, with no open task, whose every email in the run was a newsletter, promotion
or notice, it adds
mail personal rules add --sender news@shop.example --do envelope(or--list-id), at most 5 per run, with the address taken from the review's fields, never from the email's text. UnderMAIL_READ_ONLYmail takes only that:--senderor--list-idwith--do envelope, never a rule that replaces one, recorded withsource: agent(mail personal rules list source:agent). The report lists the rules it added and the ones it was unsure about, for you to run.
| Command | What it does |
|---|---|
wcat review mail --source email:me@example.com |
Threads with new mail, --unanswered what you owe, --waiting what waits for an answer; --holder mail-triage reads past that holder's mark |
wcat messages acknowledge --holder mail-triage --cursor CURSOR |
Moves a holder's mark to the cursor its review gave |
wcat messages reset --holder mail-triage --last 20 or --since-time 2026-11-01
|
You only: moves a holder's mark back, so it reads that mail again; says how many emails; --dry-run only counts |
wcat review findings add findings.json |
Stages one mailbox's findings for you |
wcat review findings list status:proposed |
Batches waiting for you |
wcat review findings show 17080 |
One batch with its evidence |
WCAT_READ_ONLY refuses every store change except wcat review findings add and messages acknowledge.
messages reset is yours alone: it refuses an agent and a scheduled run, and MCP lists it as unavailable
(messages.reset is deny).