AgentWorks

AgentWorks documentation

Workflow Scheduling

Workflow scheduling is a first-class workflow feature.

The current system is fully file-backed:

There is no DB-backed workflow scheduler architecture anymore.

Remote workspace note: in the planned Remote Workspace Gateway model, the schedule files still live with the workflow on the server, but the server does not run the coding agent. An online local runner reads the schedule, claims a server-side job lease, executes the scheduled workshop messages locally, and writes run history/Pulse/report artifacts back through the gateway. See Remote Workspace Gateway + Local Runner Plan.

Source Of Truth

Each workflow manifest can define zero or more schedules:

Current manifest schedule fields are defined in workflow_manifest.go:

Validation rules that matter now:

That means schedules are always group-aware now. A schedule without valid group selection is rejected.

Storage Layout

Workflow-local schedule definitions

Schedule definitions are persisted in:

They belong to the workflow manifest alongside capabilities, ownership, and execution defaults.

Global scheduler config

Global scheduler pause and execution flags are persisted in:

Current fields are defined in scheduler_config_store.go:

Important distinction:

If SCHEDULER_ENABLED=false, automatic cron execution is disabled on that server, but manual trigger still works.

Per-workflow run history

Schedule run history is persisted per workflow in:

Entries are defined in schedule_runs.go:

The file keeps the newest entries first and is capped at 200 runs.

Runtime Model

The scheduler service is implemented in scheduler.go.

On startup it:

Runtime-only state is kept in memory per schedule:

That runtime state is not written back into workflow.json.

Execution Mode

Workflow schedules use one execution path: the workshop builder path. The old direct orchestrator schedule mode (mode = workflow, agent_mode = workflow) is no longer generated or executed for workflow schedules. Existing manifests with mode = workflow are normalized to workshop execution at runtime.

Multi-agent schedules remain separate under _users/{userID}/multiagent-schedules.json.

workshop mode

The scheduler builds a request with:

Then it sends the configured messages[] one by one and waits for the workshop session to become idle after each message.

If no messages are provided, it defaults to:

Run-mode workshop schedules are not limited to full workflow execution. The configured message can ask Run mode to answer directly from KB/learnings/db/run state, execute a targeted normal step, execute an orphan utility step, or call run_full_workflow, depending on the scheduled job.

Groups And Run Folders

Schedules are always tied to variable groups.

Current implications:

There is helper logic for resolving a group-scoped workshop run folder, but the standard workshop scheduler request still starts from iteration-0.

That means scheduled runs follow the same broader run-folder model documented in iteration_run_folder_architecture.md.

Auto Report Generation

Workshop schedules have one extra behavior.

If:

then the scheduler tries to auto-generate the final report after the workshop message sequence completes.

That flow lives in scheduler.go.

One nuance in current code:

So report auto-generation for workshop schedules is coupled to the resolved run-folder shape, not just to the presence of a schedule.

APIs

Scheduler APIs are registered in scheduler_routes.go:

The API response shape is a compatibility wrapper around:

UI Surfaces

The current frontend scheduling surfaces are:

The UI supports:

Current Architecture Summary

Use this mental model:

Related docs: