Tasks & routines
Two ways to put a skill in front of the kid. Task = chore card. Routine = cron-scheduled skill invocation.
Two ways to put a skill in front of the kid. Task = one-off or weekly chore card. Routine = cron-scheduled skill invocation.
Delivery shapes
Pick the one that matches the cadence. Tasks are visible cards in the kid's day; routines are scheduled agent invocations that surface as tasks/messages at fire time.
| Aspect | Task | Routine |
|---|---|---|
| Cadence | onetime (date) or weekly (days) | cron (4 fires/24h max) |
| What the kid sees | a card in their list | the skill output at fire time |
| Linked to a skill? | only if a step has a canvasId | required (skillId) |
| Gem reward | rewardGems on the task | via the skill it invokes |
| Blocks the schedule? | isBlocking bool | (routines fire on cron) |
When to use a task
For chores, one-off asks, and weekly recurring items the kid checks off. "Pack lunchbox at 8:30 weekdays." "Walk the dog at 5pm today." "Practice piano 3 days a week."
A task without a canvasId is fine: most chores do not need a kid screen. Just name, days (or oneTimeDate), maybe startMinutes/durationMinutes, optional rewardGems, isBlocking. The kid sees a card and taps "done."
The canvas-task invariant
If any step on the task has a canvasId, the task must have sourceSkillId pointing at an activated skill that links the canvas. task.create rejects with BAD_INPUT otherwise. This is the rule that makes "everything kid-facing is a skill" actually true.
When to use a routine
For agent-side cadence. "At 7am every morning, run the morning-brief skill." "At 8pm Sunday, run the weekly-recap skill." The kid does not see the routine itself; they see the output of the skill it invokes.
Cron is 5-field standard. Max 4 fires per 24h; tighter rejected with a cadence error. Timezone defaults to America/New_York; pass tz: 'Asia/Jerusalem' if you need otherwise.
Per-fire arguments
A routine carries skillInput: the values that fill the skill's {{input.X}} placeholders at each fire. Activation-time args set per-kid defaults; skillInput overrides at fire time.
The CHECKPOINT discipline (one more time)
Both task.create and routine.create are the kid-facing step. The Sprout authoring guide is explicit: never pick the cadence + schedule + gems and assign in the same breath. Confirm with the parent first, even if upstream steps were autonomous.
Try it
# Weekday lunchbox chore, no canvas, 5 gems
task_create({
taskType: "schedule",
name: "Pack lunchbox",
days: ["mon", "tue", "wed", "thu", "fri"],
startMinutes: 510,
durationMinutes: 10,
childIds: ["019c5228-..."],
rewardGems: 5,
isBlocking: true,
emoji: "check"
})task_create({
taskType: "onetime",
name: "Tonight's reflection",
oneTimeDate: "2026-05-18",
childIds: ["019c5228-..."],
sourceSkillId: "019e378f-...",
steps: [{
name: "Tap to reflect",
canvasId: "757c5bb0-..."
}],
isBlocking: false
})# Morning brief at 7am weekdays
routine_create({
name: "Morning brief",
cron: "7 7 * * 1-5",
tz: "Asia/Jerusalem",
skillId: "<activated morning-brief skill>"
})