Skip to content
Tinbox

Build · Triage

Fast triage: sorted before anyone opens it.

Parsers classify at the front door, rules route and assign, Autopilot summarizes and drafts overnight, and a plugin pages someone when it's truly urgent — the inbox arrives as queues, not a pile.

A flagged message is raised above a quiet group of message cards.

Ask your agent.

“Sort new mail into support, billing, and everything else. Flag urgent issues and give me a short summary of what needs a response when I start work.”

What you get

A sorted inbox and a short list of conversations to deal with first.

Define your categories and urgency rules, then connect parsers and a scheduled agent to the inbox.

See how to wire it up

The problem

The inbox is one undifferentiated pile — and a person sorts it by hand.

The outage report sits under three newsletters and a receipt. Whoever opens the inbox first spends the morning deciding what each message is before anyone can answer it.

Triage is the part a machine should do. In Tinbox it runs where the mail lands: classification is reversible metadata, routing is a rule, and anything with a side effect is code you can review.

Tinbox lanes used

The parts, and where to read about each.

  1. 01Parsers

    A reactive skill returns a category, flags, queryable fields, and optionally a card — annotations only, never side effects.

    Extend: Parsers
  2. 02Rules

    Gmail-style filters in Settings → Rules: label, archive, mark read, assign, or set a response-time target.

    Inbox
  3. 03Autopilot

    On a schedule, the assistant summarizes, tags, and drafts with reversible tools only — and logs what each run touched.

    Autopilot
  4. 04Plugin hooks

    An onEmail hook acts on stored mail — page on-call, open a ticket in your tracker — through a host allowlist.

    Extend: Plugins
  5. 05Saved views + search

    Work each queue from a saved view; the same full-text search is a tool the agent calls.

    Retrieve mail
  6. 06Skill playground

    Draft a parser from a real email in Settings → Skills → Playground and watch it extract fields — before you deploy it.

    Skill authoring

The sketch

Short enough to read in one sitting.

Classify in a parser, let Autopilot do the reversible overnight pass, and put the one real side effect — paging someone — in a plugin hook.

// tinbox.config.ts
import { defineConfig } from "tinbox/cf";
import { defaultSkills, type AlgorithmicSkill } from "tinbox/cf/skills";

// Classify at the front door: a category, flags, and queryable fields.
const urgency: AlgorithmicSkill = {
  id: "urgency",
  label: "Urgent mail",
  kind: "algorithmic",
  appliesTo: "message",
  tagline: "Flag outages and angry customers to the top.",
  match(ctx) {
    const text = `${ctx.message.subject}\n${ctx.message.body}`;
    if (!/down|outage|cancel|chargeback|urgent/i.test(text)) return null;
    return { category: "urgent", flags: ["page-on-call"] };
  },
};

export default defineConfig({
  // …org, domains, auth
  skills: [...defaultSkills(), urgency],

  // Overnight pass: reversible tools only — anything that sends is held.
  autopilot: {
    enabled: true,
    instructions: "Summarize new threads, tag them, and draft replies. Never send.",
    tools: ["search_emails", "summarize_thread", "create_draft"],
    principal: { tokenEnv: "AUTOPILOT_TOKEN" },
  },
});
// plugins/page-on-call.ts — ACT on urgent mail (side effects live in a plugin)
import { definePlugin } from "tinbox/cf/plugin";

export default function pageOnCall() {
  return definePlugin({
    name: "page-on-call",
    version: "1.0.0",
    capabilities: {
      secrets: [{ name: "PAGER_TOKEN", required: true, description: "Pager API key" }],
      fetchHosts: ["api.pager.example"],
    },
    async onEmail(email, ctx) {
      if (!/outage|down/i.test(email.subject)) return;
      await ctx.fetch("https://api.pager.example/alerts", {
        method: "POST",
        headers: { authorization: `Bearer ${ctx.secrets.PAGER_TOKEN}` },
        body: JSON.stringify({ summary: email.subject, from: email.from }),
      });
    },
  });
}
Parsers classify; plugins act. That boundary is what keeps triage safe to run on every message.

Or we build it for you

Want triage tuned to your mail?

We read a sample of your real inbound, write the parsers and rules that sort it, set up Autopilot's brief, and wire the alerts into the tools you already use.
Talk to us about it →

Build it on mail you own.

Free to install and use, even commercially — the CLI, SDK, and worker ship in one npm package. Deploy Tinbox on your own Cloudflare account and start from the sketch above — or have us build it with you.