Skip to content

Repository files navigation

example-inbox

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.

How the rules work

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.

What it needs

  • 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_send stays false.

What it must never do

  • 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.

Add it to a Tico install

  1. Create <your-org>/emp-<name>-inbox from this template (gh repo create --template ticoteam/example-inbox).
  2. Put the assigned address on the Mailbox: line in AGENT.md and in employee.yaml, and replace ana@acme.example in rules/mail-rules.yaml with the same address.
  3. 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 stays planned until you activate it.
  4. Grant the mailbox to the bot in the mail connector; declare it under access:.

Customize

  • 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).

Contributing

Pull requests welcome: safer generic rules, better sorting guidance, more fixtures. Keep contributions generic: no real addresses, senders, companies, or credentials; use Acme.

License

Apache-2.0. See LICENSE.

About

Example Tico bot: triages one person's inbox with per-mailbox rules.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors