# Decision Queue

> An AI-first inbox as a queue of decisions: each email that needs you becomes the question it asks, with answers an agent already drafted, scheduled or filed. Pick with 1–9, send with ⌘↵, steer a draft in a sentence, put it off or hand it to an agent. Done items fold above with Undo, and decisionsToMarkdown gives agents the same queue as tool calls.

- Slug: `decision-queue`
- Category: [Email](https://www.assembli.design/category/email.md)
- Type: block
- Tags: email, inbox, decisions, agents, ai, drafts, keyboard, triage
- npm dependencies: lucide-react, motion
- shadcn/ui dependencies: button, dropdown-menu, input-group, kbd, textarea, @assembli/avatar, @assembli/empty-state, @assembli/progress-bar, @assembli/radio-group, @assembli/tooltip, @assembli/choice-chips
- Live preview: https://www.assembli.design/preview/decision-queue
- Page: https://www.assembli.design/components/decision-queue

![Decision Queue preview](https://www.assembli.design/thumbnails/decision-queue-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `decisions` (required) | `Decision[]` |  |  |
| `agents` | `MailAgent[]` | `DEFAULT_AGENTS` |  |
| `focusedId` | `string \| null` |  | The decision in focus. Leave it out and the queue keeps its own, starting with the first pending one. |
| `onFocusChange` | `(id: string \| null) => void` |  |  |
| `onAction` | `(action: MailAction) => void` |  | `decide` ({ option, draft, edited }), `later` ({ until }), `hand_off` ({ to, instruction }), `steer` ({ option, instruction }), `open` (ids: [threadId]), `undo`. All carry the decision id and a human… |
| `onSteer` | `(decision: Decision, optionId: string, instruction: string, draft: string) => s…` |  | Rewrites a draft from a one-line instruction. The steer field shows only when this is given. |
| `onShowContext` | `(id: string) => void` |  | Adds a Context button to the card, for layouts where the context panel is hidden. |
| `header` | `React.ReactNode` |  | Above the progress line: a greeting, a summary. |
| `complete` | `React.ReactNode` |  | Shown once nothing is pending. |
| `footer` | `React.ReactNode` |  | Below the queue. |
| `laterOptions` | `LaterOption[]` | `LATER` |  |
| `actorName` | `string` | `"Ines Moreau"` | The person deciding, for `actor`. |
| `keyboard` | `boolean` | `true` | Listen for shortcuts on the whole page (1–9, ⌘↵, E, H, D, O, J/K, Z). Defaults to true. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/decision-queue/decision-queue.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/decision-queue
```

Registry item JSON: https://www.assembli.design/r/decision-queue.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
