View Source Spooks.SpooksCheckpointRunner (Spooks Agentic Workflow Engine v0.1.3)

The SpooksCheckpointRunner module is responsible for running agentic workflows.

Summary

Functions

Returns a specification to start this module under a supervisor.

Checks for checkpoints that need to be resumed ON THIS NODE and tries to resume them.

Starts the SpooksCheckpointRunner task with the provided options. This task should be run on each node.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

arg is passed as the argument to Task.start_link/1 in the :start field of the spec.

For more information, see the Supervisor module, the Supervisor.child_spec/2 function and the Supervisor.child_spec/0 type.

get_expired_checkpoints(repo)

get_timed_out_checkpoints(repo, checkpoint_timeout)

run(repo, checkpoint_timeout, check_time_in_minutes)

Checks for checkpoints that need to be resumed ON THIS NODE and tries to resume them.

start_link(opts)

Starts the SpooksCheckpointRunner task with the provided options. This task should be run on each node.

The repo is required for agents that saved their state to checkpoints and have timed out. The check time is the number of seconds between checks for agents to run. It is OPTIONAL and defaults to 60 minutes. The agent timeout is the number of minutes after which an agent checkpoint is considered stale. It is OPTIONAL and defaults to 60 minutes.