# Droplet.ai agent kit

**Droplet.ai puts your AI agent on your iPhone.** Your agent keeps Agentic Widgets on your Home Screen and Lock Screen up to date, and asks you before it does anything big. You answer with one tap.

Droplet.ai widgets are agentic: your agent decides what they show and offer, from the time, your place, your events and your data. Some inform, some give you the right controls, some are full small apps built for the job, and some ask you before your agent acts.

This repo is everything the **agent side** needs: the skill your agent reads, how to connect, the MCP server, the HTTP API and examples.

- **App:** Droplet.ai for iPhone, [join the TestFlight beta](https://testflight.apple.com/join/ZkM7j69K)
- **Website and docs:** https://droplet.ai
- **MCP server:** `https://ujtuxanqlzmhnrzijfoo.supabase.co/functions/v1/mcp` (Streamable HTTP)

## How it works

1. **Give your agent one link.** Tell Claude Code, Codex, Cursor or any agent that can run a command: "Set up Droplet.ai for me: https://droplet.ai/start". It walks you through the rest, starting with a TestFlight QR code if you don't have the app yet.
2. **Type the code it shows you.** In Droplet.ai, tap **+** and enter the 8-character code, or scan its QR with your iPhone camera. The agent gets its own token, adds Droplet.ai's MCP server, and you watch it connect live in the app. Connect more agents the same way, each with its own code.
3. **Ask for something.** "Put a morning brief on my Droplet.ai with the top 5 headlines and AAPL." "Check with me on Droplet.ai before you deploy."
4. **Add the widget.** Touch and hold your Home Screen, tap Edit, then Add Widget, and choose Droplet.ai. Use **Agentic Widget** for what your agent makes. When your agent needs your OK or asks a question, it shows right on that widget ("<Agent> asks") with the answer buttons; the **Questions** widget, with every agent's questions in one place, is optional.

For the Claude app or ChatGPT, tap **+** in Droplet.ai and choose to add it as a connector instead. You get a private connector link to paste in as a custom connector.

## Give this to your agent

The fastest way to set up an agent is one sentence:

```
Set up Droplet.ai for me: https://droplet.ai/start
```

### Claude Code: install it as a skill

```bash
mkdir -p ~/.claude/skills/droplet && curl -sL https://droplet.ai/skill.md -o ~/.claude/skills/droplet/SKILL.md
```

## What your agent can do

| MCP tool | HTTP action | What it does |
|---|---|---|
| `droplet_whoami` | `whoami` | Who the agent is, and whether you want its approvals and questions on your phone |
| `droplet_set_widget` | `set_widget` | Create or replace a widget: text, metrics, lists, charts, gauges, photos, timers, clocks, checklists and buttons |
| `droplet_preview_widget` | `preview_widget` | See a widget as an image at every size and Lock Screen shape, with warnings, before the user does |
| `droplet_list_widgets` | `list_widgets` | See every widget |
| `droplet_delete_widget` | `delete_widget` | Remove one |
| `droplet_get_events` | `get_events` | Read taps on widget buttons and checklist items |
| `droplet_set_webhook` | `set_webhook` | Get taps pushed to an https endpoint |
| `droplet_ask` | `ask` | Ask you a question on your phone and wait for your tap |
| `droplet_get_answer` | `get_answer` | Keep waiting on an answer |
| `droplet_list_requests` | `list_requests` | Questions still waiting |
| `droplet_cancel_request` | `cancel_request` | Withdraw a question |
| `droplet_get_phone_context` | `get_context` | Read what your phone shares: place, calendar, reminders, health, motion, battery, time zone, city |
| `droplet_phone_action` | `phone_action` | Set a real alarm or timer, add a reminder or calendar event, send a notification |
| `droplet_phone_action_status` | `phone_action_status` | Check how a phone action went |
| `droplet_schedule` / `droplet_test_job` | `schedule` / `test_job` | Keep a widget updated from a URL, in the cloud, every N minutes |
| `droplet_list_jobs` / `droplet_delete_job` | `list_jobs` / `delete_job` | See or stop scheduled jobs |

The full reference is in [SKILL.md](SKILL.md), with request and response details in [docs/api.md](docs/api.md).

## Kit layout

```
droplet-agent/
├── SKILL.md                    ← Start here. The main skill file agents read.
│                                 Ground rules, the playbook, processes A-G, limits.
├── docs/
│   └── api.md                  ← Full HTTP API reference (all actions + fields).
├── references/
│   ├── blocks.md               ← Every block type, all fields, limits, rendering rules.
│   ├── design.md               ← The space budget per size, Lock Screen, themes, versions, warnings.
│   ├── use-cases.md            ← 100 everyday widgets: blocks per size, interaction, freshness, gotchas.
│   ├── interactive.md          ← Taps end to end: get_events, webhooks, listen.mjs, hosted agents, droplet_ask.
│   ├── phone.md                ← What the phone shares (and doesn't), phone actions and results.
│   └── troubleshooting.md      ← Symptom, cause, fix.
├── skills/droplet/SKILL.md        ← Same as SKILL.md, for skill installers.
├── scripts/
│   └── listen.mjs              ← Zero-dependency Node.js tap listener.
├── recipes/
│   ├── README.md               ← Index of all recipes.
│   ├── morning-brief.md        ← Good-morning widget: day, first meeting, steps, weather job.
│   ├── calendar-today.md       ← Next event and today's list from the phone's calendar.
│   ├── deploy-status-buttons.md← Approve/reject deploy from the widget.
│   ├── daily-buddy-conversation.md ← Conversation widget with per-tap AI responses.
│   ├── gym-session.md          ← Active workout tracker.
│   ├── groceries-checklist.md  ← Shopping list with progress counter.
│   ├── flight-day.md           ← Gate, boarding countdown, in-flight progress.
│   ├── countdown-to-event.md   ← Simple focused countdown.
│   ├── crypto-dashboard.md     ← Live prices with sparkline.
│   ├── news-digest.md          ← Headlines from RSS or any API.
│   ├── inbox-triage.md         ← Unread count + archive/refresh buttons.
│   ├── focus-timer.md          ← Pomodoro-style timer with start/stop buttons.
│   ├── reading-streak.md       ← Daily reading gauge and streak.
│   ├── standup-notes.md        ← Yesterday, today, blockers, with a done button.
│   ├── pr-review-queue.md      ← Open PRs from GitHub API.
│   ├── location-aware-variants.md ← Different content at home, work and the gym.
│   ├── lock-screen-only.md     ← Lock Screen circular, clock, inline widgets.
│   ├── large-dashboard.md      ← Full-page metrics + chart + list dashboard.
│   ├── stock-watchlist.md      ← Stock prices with after-hours variant.
│   ├── smart-home.md           ← Temperature + lights/fan buttons.
│   └── weather-forecast.md     ← Forecast with scheduled job.
└── examples/
    ├── morning-brief.sh        ← Daily brief via cron.
    ├── build-status.sh         ← CI build status widget.
    └── approval-gate.sh        ← Deploy approval flow.
```

### Latency note

Every HTTP call to Droplet.ai should include `x-region: us-east-1`. It routes the function to the same region as the database and roughly halves latency (measured: `get_events` 0.98 s → 0.55 s).

```bash
-H "x-region: us-east-1"
```

`listen.mjs` already includes this header.

## Everything a widget can do

Your agent controls every widget capability in iOS 26:

- **Every size:** small, medium and large on the Home Screen, and the rectangular, circular and inline Lock Screen widgets. StandBy and CarPlay show the small one. The agent chooses what each size shows.
- **Blocks:** text, numbers, lists, progress bars, ring and bar gauges, sparkline charts, photos, live clocks, countdowns and timers with filling bars.
- **Interactive:** buttons and checklists you tap right on the widget. Your agent gets each tap. Any button can also go in Control Center, on the Lock Screen corners or on the Action button.
- **Tap to open:** a web page, a call, a map, a Shortcut, per widget, block or list row.
- **Smart Stack relevance and privacy:** float a widget to the top when it matters; hide its content while your phone is locked.
- **A built-in visualizer for agents:** before you see a widget, your agent can render it at every size and get told what's cut off or broken, so it fixes things first.

## Automatic updates, themes and redesigns

- **Scheduled jobs:** "Keep my Bitcoin widget updated every 15 minutes" becomes a job Droplet.ai runs in the cloud, so nothing needs to stay on.
- **Themes:** glass (transparent Liquid Glass), dark, light, solid, gradient, a photo background, and rounded, serif or mono fonts.
- **Layouts:** hero, grid or list. Ask your agent to "redesign my news widget" and it restyles it without touching the content.

## Versions by time and place

One widget can show news at 5 AM, your plan at 10 AM and your shopping list at 5 PM, or something else when you're home. Your agent sets the versions once and the phone switches on its own. See *Versions* in [SKILL.md](SKILL.md#process-d-keep-it-fresh).

## Your phone, for your agent

If you turn it on (Droplet.ai, Settings, Phone access), Droplet.ai tells your agents what you choose to share: which saved place you're at, city, exact location, battery, today's calendar, due reminders, health (steps, sleep, activity), and motion. You can also let agents set real alarms and timers, add reminders and calendar events, and send notifications. Each part has its own switch, and you can narrow any single agent further on its page under Agents.

## Keeping widgets fresh

Droplet.ai pushes every change to your phone the moment your agent makes it, even when the app is closed. But your agent only runs when something runs it. For a widget that stays current, schedule your agent:

```cron
# every morning at 7: refresh the brief
0 7 * * * claude -p "Update my Droplet.ai 'brief' widget: top 5 tech headlines and AAPL, NVDA prices. Preview it and fix every warning." --allowedTools mcp__droplet__droplet_set_widget,mcp__droplet__droplet_preview_widget,mcp__droplet__droplet_list_widgets,WebSearch
```

There's more in [examples/](examples): a cron brief, a CI build-status widget, and an approval gate for deploys.

## Security

- Each agent gets its own token, stored only as a hash. Pause or disconnect any agent in the app.
- Agents write widgets and ask questions, and see or do on your phone only what you switch on. They can't read your account, and they can never answer their own questions.
- Pairing codes are single-use and expire after 15 minutes. The agent waits with a separate secret, so seeing the code alone gets nobody a token.
- Widget links are limited to https and the phone's own apps (call, message, mail, FaceTime, Maps, Shortcuts, Music, Calendar, Reminders, Droplet.ai).
