Autonomous loop
A skill on a heartbeat fires the cycle daily. You intervene through Sprout's in-app agent when you want a different call.
What you'll build
A skill that fires on its own clock and does real work without you. It reads state, decides, and acts. Two common shapes:
- Ship more work to the kid: a planner skill authors tomorrow's tasks based on yesterday's analysis.
- Publish a report or brief on cadence: pair with Reports and briefs to fire the analyzer every morning, every Sunday, every end-of-session.
When you want a different call, you tell Sprout's in-app agent and it makes the change for you.
Pieces you'll combine
- Heartbeat: the cron-driven trigger.
- A run skill: a
home_agentskill that does one full cycle. - Sprout's in-app agent: how you intervene (cancel, modify, pause).
Build it
Three movements:
1. Author the run skill that does one cycle (read, decide, act).
skill.write({
name: "<Cycle name>",
description: "What one fire of the loop does.",
category: "home_agent",
prompt: `For {{input.child_name}} ({{input.child_id}}):
1. Read state (task.list, the latest analysis card, etc).
2. Decide what to do next.
3. Act: task.create, skill.invoke, skill.post_result.`,
handsReferenced: ["task_list", "skill_invoke"],
inputVariables: [{ name: "child_name" }, { name: "child_id" }]
})
# Returns { skillId: "<runSkillId>" }2. Schedule it with heartbeat.create.
heartbeat.create({
name: "<Loop name>",
cron: "0 9 * * *", // daily at 9am
tz: "America/New_York",
runSkillId: "<runSkillId>",
skillInput: { child_name: "<name>", child_id: "<kidId>" }
})
# Returns { heartbeatId, chatId, nextFireAt }
# Cadence cap: 4 fires per 24h enforced server-side.3. Intervene through Sprout's agent when you want a different call.
Sprout's in-app agent calls task.update or task.delete on your behalf based on your natural-language request.
When to use it
- The procedure needs to run on its own clock.
- The output isn't the same every time (otherwise a recurring task with
scheduleSpec.dayswould suffice). - Anti-pattern: fixed-content recurrence (same prompt every weekday at 5pm). Use a recurring task instead.
Tools touched
heartbeat.create,heartbeat.update,heartbeat.describe.skill.invoke(inside the run skill).task.update,task.delete(via Sprout's agent on parent intervention).
Recommended skills
Drop these into your library to compose with this pattern.
Seen in walkthroughs
Solar system learning loop Weekly family brief Chore + photo proof
Related patterns
- Reports and briefs: the artifact pattern most commonly cadenced by this loop.
- Reactive loop: the push twin. Sprout events trigger the cycle instead of a cron.