# Message Inspector

> Inspect a suspicious email three ways. Message shows it as a person sees it, with the quarantine banner and hidden text revealed. Agent view shows the exact Markdown an agent gets: body fenced as untrusted, injected instructions flagged and not followed. Signals lists the evidence: SPF, DKIM and DMARC, a lookalike domain diff, Reply-To mismatch and links that lie.

- Slug: `message-inspector`
- Category: [Email](https://www.assembli.design/category/email.md)
- Type: component
- Tags: email, security, phishing, prompt-injection, agents, quarantine, tabs
- npm dependencies: lucide-react
- shadcn/ui dependencies: button, @assembli/avatar, @assembli/inline-alert, @assembli/confirm-popover, @assembli/copy-button, @assembli/underline-tabs
- Live preview: https://www.assembli.design/preview/message-inspector
- Page: https://www.assembli.design/components/message-inspector

![Message Inspector preview](https://www.assembli.design/thumbnails/message-inspector-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `message` (required) | `InspectedMessage` |  |  |
| `findings` (required) | `MessageFindings` |  |  |
| `onAction` | `(action: MailAction) => void` |  | `quarantine`, `release`, `report_phishing`, `block_sender`, with the person as the actor. |
| `agents` | `MailAgent[]` | `DEFAULT_AGENTS` |  |
| `user` | `string` | `"Ines Moreau"` |  |
| `defaultTab` | `"message" \| "agent" \| "signals"` | `"message"` |  |

## 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/message-inspector/message-inspector.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/message-inspector
```

Registry item JSON: https://www.assembli.design/r/message-inspector.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.
