Skip to content

Add it to your loops

A loop is anything you run on its own: a Claude Code routine, a nightly agent, an n8n flow, a cron job. Every runtime shows you a log and a transcript; none tells you whether the work got done. Millimetry does: each run reports that it started, the steps it reached and how it ended, and the dashboard answers how many runs there were, which loop fails, at which step, how long runs take, and whether this week beat last week.

A loops entry is a third kind beside apps and websites. Its runs are stored like an app’s events, so every view, funnel and export works unchanged, with the words changed: a run is a session, a loop is a user (counted once per day, like everyone else), the runtime is the platform and the step is the screen.

In the dashboard, choose Add an app or site → Loops, name it, and copy its key (lk_…; public, like every key). With your coding agent connected, ask it instead: create_app with kind agent does the same, and the millimetry-loops skill wires the loop up. Every loops entry starts with a Completion funnel (run_started → run_finished).

One UUID per run, a start and a finish, and the steps worth seeing between them:

Terminal window
RUN=$(uuidgen | tr A-Z a-z)
curl -s https://e.millimetry.app/v1/loop/events -H 'content-type: application/json' -d '{
"k": "lk_…", "loop": "nightly-review", "runtime": "claude-code",
"events": [{ "name": "run_started", "run": "'$RUN'", "trigger": "schedule" }]
}'
# … the work …
curl -s https://e.millimetry.app/v1/loop/events -H 'content-type: application/json' -d '{
"k": "lk_…", "loop": "nightly-review", "runtime": "claude-code",
"events": [
{ "name": "step", "run": "'$RUN'", "step": "read-prs", "ms": 1200, "props": { "prs": 3 } },
{ "name": "run_finished", "run": "'$RUN'", "outcome": "ok", "ms": 90000 }
]
}'

From TypeScript or JavaScript (Node 20+, Bun, Deno, Cloudflare Workers), the reporter is one file with no dependencies, the same one the millimetry-loops skill installs:

import { createLoopReporter } from "./millimetry-loops";
const loops = createLoopReporter({ key: "lk_…", loop: "nightly-review", runtime: "claude-code" });
const run = loops.start({ trigger: "schedule", model: "claude-opus-5-5" });
run.step("read-prs", { prs: 3 });
run.finish("ok");
await loops.close(); // on Workers: ctx.waitUntil(loops.flush())
Loop Where the report goes
A Claude Code routine, a skill In its instructions: the start curl first, the finish curl last with the outcome, a step per stage; $RUN kept for the whole run
n8n, Zapier, Make An HTTP Request node at the start and the end of the flow
A scheduled Cloudflare Worker The reporter in scheduled(), flushed with ctx.waitUntil
OpenClaw, cron, any script The curl lines around the work
Field Values
loop Your name for the automation, 1 to 64 characters: nightly-review. Nothing that looks like a person
runtime claude-code, codex, cursor, openclaw, n8n, zapier, workers, cron, other (the default)
version The loop’s version, if it has one
events[].name run_started, step, run_finished, or your own event names
events[].run The run’s UUID, the same on every event of the run
events[].step What the run is doing, at most 64 characters
events[].outcome On run_finished: ok, failed, skipped, needs_action
events[].trigger On run_started: schedule, event, manual
events[].model The model the run used, a vendor’s name
events[].ms How long the step or the run took
events[].props Fixed values and counts of your own, at most 25
batch A UUID: the same batch sent again answers the stored counts, so a retry is safe

An event outside the vocabularies is dropped and counted in dropped; a batch with an unknown runtime or a bad loop name is refused with a sentence. A batch holds 1 to 100 events. Each stored event counts toward the plan like any other.

Nothing about a person. No address is read: the loop’s user id is its name under the day’s salt, so there is no country, no region and no browser. And nothing the agent read or wrote: no prompt, transcript, file path, URL or tool argument. If a loop needs to tell you about its content, it tells you in its own log; Millimetry only counts.

The overview’s tiles read Loops, Runs, Events and Median run; the cards show the loops, the outcomes, the steps and the runtimes. The Funnels page has the Completion funnel; break outcome down with the filter name:run_finished for the completion rate, and screen (the step) with outcome:failed to see where runs die. Through the MCP server, your assistant asks the same: “which of my loops failed this week, and at which step?”