# Mail Activity Log

> An audit trail for a mailbox shared by people and agents, both listed the same way: who archived, labeled, sent, read over MCP or was blocked, grouped by time. Filter by who and what kind, expand any entry for its reason, the permission or rule that allowed it, the exact tool call and what it touched, undo what can be undone, and export the log as JSON or Markdown.

- Slug: `mail-activity-log`
- Category: [Email](https://www.assembli.design/category/email.md)
- Type: component
- Tags: email, agent, audit-log, activity, timeline, undo, export
- npm dependencies: motion, lucide-react
- shadcn/ui dependencies: button, collapsible, @assembli/avatar, @assembli/copy-button, @assembli/empty-state, @assembli/native-select, @assembli/tooltip
- Live preview: https://www.assembli.design/preview/mail-activity-log
- Page: https://www.assembli.design/components/mail-activity-log

![Mail Activity Log preview](https://www.assembli.design/thumbnails/mail-activity-log-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `entries` (required) | `ActivityEntry[]` |  |  |
| `onAction` | `(action: MailAction) => void` |  | Undo arrives as `{ type: "undo", ids: [entryId], actor, call }`. |
| `agents` | `MailAgent[]` | `DEFAULT_AGENTS` |  |
| `you` | `string` | `"Ines Moreau"` | The signed-in person; their entries read "You …". |
| `title` | `string` | `"Activity"` |  |

## 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/mail-activity-log/mail-activity-log.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/mail-activity-log
```

Registry item JSON: https://www.assembli.design/r/mail-activity-log.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.
