All loops
AgentsMedium 12 min· claude-opus-4-1

Sleep coach

Analyses your sleep data and suggests one change per week.

Read the full Agents build guide →
NOT DEPLOYEDNOT DEPLOYED
0143ms
Trigger
cron(0 7 * * *) fired · every day · 07:00
021163ms
Agent
claude-opus-4-1 · in 1663 tok · out 725 tok
03153ms
Tools
fetch-mcp/anthropic:messages.create → 200 OK · 423ms
0433ms
Verify
schema check · pydantic v2 passed
0563ms
Output
checkpoint saved · 3 subtasks queued
0623ms
Notify
audit log written · runbook link attached
SUCCESS
0%
0 runs
P50
0ms
median
P95
0ms
tail
AVG COST
per run
LAST OK
never
LAST FAIL
never
none
Latency · last 30 runs0 samples
no runs yet
Latest output · what your users see
Agents · Long-running/ Checkpoint · run 148
Subtasks completed
3 / 5 · avg 42s each
Pending human review
1 · refund > $500 threshold
Next tick
resume in 90s from checkpoint c8f21a
// press Test to run once · Watch live to keep streaming · Deploy to make it real
The problem

health

The outcome

Generic sleep advice doesn't ship.

Ingredients & skills

Secrets
  • ANTHROPIC_API_KEY
Providers
  • Anthropic
MCP servers
  • fetch-mcp
#agent#automation#claude

How it works

Analyses your sleep data and suggests one change per week.

Step 1

1 — Define the loop

Single tool-using loop. Claude decides which MCP tool to call until it has enough context.

Step 2

2 — Bind the locker

The locker contains the Anthropic key plus any provider-specific tokens. Nothing is hardcoded.

Step 3

3 — Schedule or trigger

Either cron, webhook, or on-demand from the Locker UI.

One-line deploy

The button above runs the same command with your saved config. This is the raw CLI form.

bash
npx claudeloops deploy sleep-coach

Related loops