Routines

Standing work for your agents. A Routine starts Tasks on a schedule, once at a set time, on a GitHub event or on an API call, and you read and change it from any agent client.

A Routine starts Tasks on a schedule or an event. It holds a prompt and the settings of the Task it starts (repository, engine, environment, limits), and one or more triggers. Every fire is a run: a new Task with the routine's prompt, or a message delivered into one Task. The routines__* tools read and change routines from any agent client, on the same /mcp seam as everything else, so identity, organization holds, API-key caps, approvals and activity recording apply.

The Agents area, where Tasks and Routines live, is a preview: it may change at any time.

Tools

ToolUse it for
routines__listThe routines you may see, newest made first, a page at a time.
routines__getOne routine: its fields, its triggers and its last run.
routines__runsA routine's runs, newest first: how each was fired, its state, its Task.
routines__createMake a routine from a name, a prompt and optional triggers.
routines__updateChange the fields you give; the rest stay.
routines__runRun a routine now, paused or not.
routines__pauseStop its triggers from firing until it is resumed.
routines__resumeLet its triggers fire again, counted from now, with no backfill.
routines__archiveTake it out of the active list; it stops firing.
routines__unarchiveBring an archived routine back as it was.
routines__deleteDelete an archived routine for good; its past runs and their Tasks stay.
routines__duplicateCopy it, paused, into its own space or another one.
routines__add_triggerAdd a schedule, a one-time fire, a GitHub event or an API trigger.
routines__update_triggerChange one trigger in place; its kind stays.
routines__remove_triggerRemove one trigger; fires it had waiting are skipped.

The tools are free: a call costs no credits. The Tasks a routine starts run on Boxes, billed by their running time as Billing describes. routines__run starts or wakes a Box, so it is held when the organization has neither credits nor Box allowance left. An archived routine does not count toward the plan's number of routines.

Who may see and change a routine

Every routine is in one space. A member sees the routines of the spaces they are in. A Task and a space API key see the routines of their own space and of the everyone space. Reading a routine and its runs takes the level view in its space; changing it (an update, a pause, a trigger, an archive) takes use. routines__runs shows a run's Task and what it last said only where you may see that Task.

A routine a Task makes goes into the Task's own space, pins the Task's environment, and reaches no more tools than the Task does. So does a copy a Task makes with routines__duplicate. A copy in another space needs view on the routine and use in that space.

Triggers

A routine may have several triggers of any kind; any one fires it. With none, it runs only through routines__run.

kindFiresFields
scheduleOn a cron.cron (5 fields), timezone (IANA), catchup
atOnce.fire_at (epoch ms, in the future), timezone
githubOn a GitHub event.gh_event (pull_request, issues, push, release), gh_actions, gh_repo, gh_filters
apiOn a call to the routine's fire URL.A bearer token that a member mints in the app.

window_minutes (0 to 1,440) says how late a fire may still start; without it, the cadence decides: 15 minutes for hourly, 240 for daily, 720 for weekly. A schedule's fires that passed their window are skipped, or, with catchup: "latest_once", the latest one runs. A github trigger's filters match authors, labels, branches (with * and ?), titles, and draft or merged state.

Run now

routines__run starts a run at once, even for a paused routine. text is added to the prompt for this run (at most 16,000 characters are kept). force: true starts it while an earlier run still goes and the overlap policy would skip it. idempotency_key makes a retry answer the run the first call started, and start none. The answer is the run's ID and state; routines__runs lists it.

Errors

CodeMeaning
routine_not_found, trigger_not_foundNo routine or trigger with that ID that you can see.
level_too_lowChanging a routine takes use in its space; view reads it, its runs, and copies it.
space_stoppedThe routine's space is closed, or its member left: nothing in it changes.
routine_archived, routine_not_archivedThe routine is archived, or routines__delete was asked for a live one.
routine_name_takenAnother live routine of the space has that name.
routine_changed_since_readexpected_updated_at is older than the routine: read it again.
plan_limit_reachedThe plan allows no more routines, or not this Box size.
invalid_inputA field breaks a rule; the message names it.
not_configuredRoutines, or their Tasks on a member's device, are not available here.
unavailableThe service could not be reached; retry in a minute.

Elsewhere

cs routines has the same routines in a terminal.

A member turns routines off for their own personal space in Dashboard → Tools, and a team space has its own switch; CoreSpeed can turn it off for a whole organization. Off, it hides the routines__* tools from tools/list in that space; see Capability controls.