Skip to main content
agentscope-extensions-scheduler runs Agents periodically — e.g. “every day at 8 AM run the daily-report Agent” or “every 5 seconds run a health-check Agent”. The module abstracts a unified AgentScheduler interface and ships two implementations: The SPI lives in agentscope-extensions-scheduler-common so you can plug in other schedulers.

Shared concepts

  • AgentConfig (or RuntimeAgentConfig): how to construct the Agent — name, model config, system prompt, toolkit.
  • ScheduleConfig: scheduling policy — CRON, fixed rate, max parallelism.
  • AgentScheduler: the core interface — schedule(...) / pause(...) / resume(...) / cancel(...) / shutdown().
  • ScheduleAgentTask: handle returned from a registration; represents one scheduled task.
Each trigger creates a fresh Agent instance for execution to avoid leaked state.

Quartz mode

Add the dependency

Usage

Runtime control:

XXL-Job mode

Add the dependency

Usage

After registration, configure the schedule (CRON, parallelism, routing) in the XXL-Job admin console. The Agent name DailyReportAgent shows up there as the JobHandler.

Binding tools

Use RuntimeAgentConfig (a transitional API that may evolve) when you need to bind a Toolkit:

Choosing one

  • Local or small cluster, no external scheduler service → Quartz
  • Need a console, cross-node routing, task logs → XXL-Job
  • Bring your own scheduler framework → implement the AgentScheduler SPI