Skip to Content
Levain LabsLevain Labs

create_schedule

Create a cron schedule for an agent. cron_expr is a 5-field expression; pass exactly one of prompt or initial_state. skip_if_active_within_minutes makes the…

Create a cron schedule for an agent.

cron_expr is a 5-field expression; pass exactly one of prompt or initial_state. skip_if_active_within_minutes makes the schedule relative to activity: a due fire is skipped when any run of the agent, other than one this schedule fired, started within that many minutes. run_as=True makes its runs act for you, with your person memory and rules, as a run you opened would; it is set only at creation and needs a signed-in user. Accepts an agent id or slug.

Parameters

NameTypeRequiredDescription
agent_idstringyes
cron_exprstringyes
promptstringno
timezonestringno
versionintegerno
initial_stateobjectno
skip_if_active_within_minutesintegerno
run_asbooleanno

On this page