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(orRuntimeAgentConfig): 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.
Quartz mode
Add the dependency
Usage
XXL-Job mode
Add the dependency
Usage
DailyReportAgent shows up there as the JobHandler.
Binding tools
UseRuntimeAgentConfig (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
AgentSchedulerSPI