An example Tico bot that keeps one person's mailbox near inbox zero. It works
with Tico's mail connector: rules first, model second. The rules in rules/mail-rules.yaml file
the obvious mail for free, then the bot reads what is left, drafts a reply when the ask is
straightforward, and puts only what needs a person in front of them. It never sends.
Examples use a fictional mailbox, ana@acme.example. Replace it.
Each mailbox has its own rules, and they live in this repository, in rules/mail-rules.yaml, so a
change is a reviewable commit. The file has a common list that runs first and one list per mailbox
address. Rules run in order. A rule matches when every key in when matches; do says what to do.
never_archive on a rule protects the message from every archiving rule after it, so protections go
above filing rules.
Some rules ask the judge instead of matching words. A judge condition reads what the judge
said about the message (its bucket, whether money or legal risk is involved, how urgent) from the
listing fields alone, before any body is opened. Judge rules use the judge provider configured for
your Tico install (any provider your install has set up). If no judge is available to the run, judge
rules simply do not fire and the run says so; word rules and the bot still work. Judge rules sit
under the mailbox on purpose, after every common rule, so a word protection still blocks a judged
archive.
Test a rules change before it goes live: dry-run with mail rules run --dry-run, replay with
mail rules explain <message-id>, and add a fixture for any rule that protects mail.
- The Tico mail connector, with the assigned mailbox granted to this bot as
[read, draft](calendar[read]if you want it to see what is booked). - Optionally a judge provider for the judge rules.
- No send rights.
outbound_sendstays false.
- Send, reply, forward, or invite anyone. Drafts sit on the task until a person approves them.
- Archive anything that needs the owner, or invent a need for one.
- Read a mailbox it was not assigned.
- Create
<your-org>/emp-<name>-inboxfrom this template (gh repo create --template ticoteam/example-inbox). - Put the assigned address on the
Mailbox:line inAGENT.mdand inemployee.yaml, and replaceana@acme.exampleinrules/mail-rules.yamlwith the same address. - Ask BotOps to set up an inbox bot from that repository. It registers the bot, seeds the weekday
and weekend passes, and runs
hub bot check. The bot staysplanneduntil you activate it. - Grant the mailbox to the bot in the mail connector; declare it under
access:.
rules/mail-rules.yaml: your own senders, words, and judge thresholds. Start conservative.playbooks/inbox-preferences.md: standing preferences the bot learns, one bullet each.employee.yaml: passes and timezone, runtime and model (your install chooses).
Pull requests welcome: safer generic rules, better sorting guidance, more fixtures. Keep contributions generic: no real addresses, senders, companies, or credentials; use Acme.
Apache-2.0. See LICENSE.