BackgroundAgentManager
Run statuses
A run isqueued, then claimed by a worker, running, and retrying between
attempts. It ends in a terminal status, or pauses in a waiting one until
resume_run; run_now(wait=True) and wait_for_run return at either.
Overlap policies
What a task does when it is due while one of its runs is still active (overlap_policy; the default is skip_if_running):
Methods
cancel_run
delete_task
delete_runs deletes its runs too.
get_agent
get_manager_status
get_run
get_run_events
get_run_workspace
get_task
get_task_status
initialize
start and the first use call it for you.
list_agents
list_attempts
list_runs
list_tasks
pause_task
recover_expired_runs
register_agent
agent_id so tasks can run it; replace swaps an existing one.
register_agent_spec
register_task
replace overwrites an existing one.
resume_run
agent.resolve_approval). Its next attempt continues the same durable run instead of starting over.
resume_task
run_now
query. With wait, return when it ends (or at timeout_seconds). Under the task’s overlap policy, a run can come back skipped (another run holds the task) instead of queued.
run_until_terminal
timeout_seconds.
shutdown
start
shutdown.
unregister_agent
force.
update_task
patch holds the fields to change (query, schedule, enabled, timeout_seconds, retry_policy, overlap_policy, …).