# Agent at work

*What your agent is doing right now, and the result when it's done.*

**Type: [Progress](types/progress.md).** How far along something is, toward a goal. This is one good use of it; the same widget serves a long agent task, a migration or import, a test run, a research job and more. Switch the subject when something else matters more.

Template id `agent-at-work` · Agent at work · uses nothing on the phone · for: Any agent running long tasks.

## Goal

The user can leave the computer while you work, and see the outcome on their phone.

## When to offer it

The agent is about to run something long (research, a refactor, a report) and the user will walk away.

## What the user gets

- Live progress of a long task: research, a refactor, a report
- The result the moment it's done
- Go deeper or stop with one tap

## What each size shows

- **Small**: metric: Sites checked = 7/12.
- **Medium**: metric: Sites checked = 7/12; text (body): "2 rivals cut prices 20%"; buttons: Summary (`summary`), Dig deeper (`deeper`), Stop (`stop`).
- **Large**: metric: Sites checked = 7/12; text (body): "2 rivals cut prices 20%"; progress bar: Scan; list: Found so far (3 rows); buttons: Summary (`summary`), Dig deeper (`deeper`), Stop (`stop`).
- **Lock Screen**: inline "Scan: 7 of 12 sites".

## Make it theirs

**Look.** Send `look` instead of `theme` and `accent`; every combination is designed to read well:

- `style`: `glass` (default: see-through, adapts to dark mode), `soft` (a calm pale tint) or `bold` (a vivid gradient with dark buttons).
- `accent`: blue, indigo, purple, pink, red, orange, green, teal, graphite, or a hex.
- `font`: default, rounded, serif or mono.

This template's own accent is **indigo**. To restyle a widget you already saved, send only the look:

```json
{"slug": "agent-at-work", "look": {"style": "bold", "accent": "indigo", "font": "rounded"}}
```

Preview a look without saving: `droplet_preview_widget` with the slug and `look`. When the user says "make it greener", "calmer" or "bolder", change the look; keep the content.

**Their choices.** Ask once (droplet_ask) or use what you know:

- What counts as a step
- Where the result goes

**Search words:** progress, research, long task, status, report, running, job.


## Before you build

- You need: Any agent running long tasks.
- Ask once: When you're blocked, the question goes here (droplet_ask), not in a chat they're not watching.

## Fill it with real data

Start from the template (`droplet_library` with `id: "agent-at-work"`), keep the design, and replace each sample value:

| Block | Real value |
|---|---|
| 0 · metric | Progress as done/total in your own units. |
| 1 · text | The most important finding so far, under 30 characters. |
| 2 · buttons | Keep ids `summary`, `deeper`, `stop`. |
| 3 · progress | Overall progress 0-1. |
| 4 · list | Top findings so far. |

Sources:
- Your own progress: steps done / total, the most important finding so far.

## The widget

Sample values; send it with `droplet_set_widget` on your widget's slug (or a new slug with `new_widget: true` if the user asked for a separate widget). Preview it and fix every warning first.

```json
{
  "slug": "agent-at-work",
  "title": "Competitor scan",
  "symbol": "sparkles",
  "accent": "#5E5CE6",
  "blocks": [
    {"type": "metric", "label": "Sites checked", "value": "7/12"},
    {"type": "text", "text": "2 rivals cut prices 20%", "style": "body"},
    {"type": "buttons", "items": [{"id": "summary", "label": "Summary", "symbol": "doc.text.fill"}, {"id": "deeper", "label": "Dig deeper", "symbol": "magnifyingglass"}, {"id": "stop", "label": "Stop", "symbol": "stop.fill"}]},
    {"type": "progress", "label": "Scan", "value": 0.58},
    {"type": "list", "title": "Found so far", "items": [{"title": "Acme: Pro plan now $39", "detail": "-20%"}, {"title": "Bolt: free tier added"}, {"title": "Kite: new AI add-on, $10"}]}
  ],
  "sizes": {"medium": [0, 1, 2], "large": [0, 1, 3, 4, 2]},
  "lock": {"inline": "Scan: 7 of 12 sites", "circular": 0}
}
```

## Keep it fresh

At start, at each milestone, at the end (the result with a link or the key numbers), and when blocked (what you need).

## Handle the taps

Each tap reaches you once on `droplet_get_events` (keep a waker running, SKILL.md Process C). Answer within seconds by updating the widget.

**Summary** (`summary`)

```json
{"widget": "agent-at-work", "kind": "button", "target": "summary", "value": {"label": "Summary"}}
```

Put the summary where they can read it (a doc link as the button url next time) and show the top three findings on the widget.

**Dig deeper** (`deeper`)

```json
{"widget": "agent-at-work", "kind": "button", "target": "deeper", "value": {"label": "Dig deeper"}}
```

droplet_ask choice with 2-3 directions to dig into, then continue.

**Stop** (`stop`)

```json
{"widget": "agent-at-work", "kind": "button", "target": "stop", "value": {"label": "Stop"}}
```

Stop the task, show what you had so far.

## Ask first

When you're blocked, the question goes here (droplet_ask), not in a chat they're not watching.

For example:

```json
{"question": "Dig deeper into what?", "kind": "choice", "options": ["Acme's pricing", "Bolt's free tier", "All AI add-ons"], "risk": "low"}
```

## Phone actions

None.

## Edge cases

- Finished: replace the progress with the result and a link button to the full report.
- Blocked: say what you need in the text and ask with droplet_ask.
- Never leave 'Working…' for hours; show the last real state.

## Never

Never leave it on a stale 'Working…'; show the last real state.

## Done when

- [ ] Every sample value is replaced with real data (no "Dr. Lee" on a real widget).
- [ ] `droplet_preview_widget` shows no warnings at the sizes the user placed (`placed` in `droplet_whoami`).
- [ ] Every button has a handler and a waker is running.
- [ ] Refresh is set up as above.
- [ ] You told the user in one line what it does on its own and what it asks first.
