> ## Documentation Index
> Fetch the complete documentation index at: https://docs.core.vexa.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Triage incoming email

> An event-triggered agent that turns new mail into proposed tasks — safely.

Email is an **Integration**, not a backend object. A new email is an **inbound
event** that can fire the [scheduler](/concepts#scheduler); the agent reads and drafts through the
integration's MCP tool.

## Why this one is different: untrusted input

Email is attacker-controllable and **prompt-injectable**, so triage runs
[propose-only](/architecture/governance): the agent gets the mailbox `ro` and **cannot write or send
directly**. It emits proposal cards — `record` (a task/note), `draft`, `send` (external) — a human
approves, and trusted code applies. A `send` stays gated until you approve it.

## Fire a triage on a new email

An integration delivers the email as an `event.v1` event carrying a plan:

```bash theme={null}
curl -X POST "$API_BASE/agent/events" \
  -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{
    "name":"email.received",
    "source":{"uri":"mailbox://u_jane/INBOX/AB12CD"},
    "plan":{"prompt":"Triage this email into tasks. Propose a record for each action item and a draft reply if one is warranted."}
  }'
# → 202 {"workload_id":"agent-...","trigger":"event"}
```

<Warning>
  The event **must carry a plan** — `POST /events` returns `422` if `plan` is absent. See the
  [error reference](/api/errors#by-surface).
</Warning>

## Approve the proposals

The dispatch emits `proactive-card.v1` frames on its [Stream](/architecture/streaming). Approving a `record`
commits it to the workspace (a trusted applier does the write); approving a `send` executes it through the
integration. Nothing leaves your control without that approval.

## Make it standing

To triage automatically for every inbound message, bind a triage routine to the email integration so each
`email.received` event dispatches the agent — the inbound trigger replaces the manual `POST /events` call
above. See **Integrations** and [AI routines](/how-to/daily-brief).
