Component ยท Control side
Monitor scheduler
BOTH Worker Control plane
What it is
The monitor scheduler is a background worker inside AMS. Every minute it checks which monitors are due and, for each one, starts an evaluation run that scores recent agent traces. It also keeps track of run status.
Why it exists
Quality checks on agent behavior should run on a schedule without anyone clicking a button.
How it works
- A ticker fires every minute. A Postgres advisory lock makes sure only one AMS replica does the work.
- For a due monitor, the executor builds parameters and creates an OpenChoreo WorkflowRun using the monitor-evaluation-workflow.
- Argo runs the evaluation job on the workflow plane, which publishes scores back to AMS.
- The scheduler polls the run status and marks runs that are stuck for 45 minutes as failed.
- Monitors have an interval of at least 5 minutes, with a default of 60.
Identity and access
When Thunder provisioning is on (the normal on-prem and SaaS setup), AMS creates the WorkflowRun with a per-organization scheduler credential (amp-scheduler-<ouId>); otherwise it uses its own system OpenChoreo client. The evaluation job later uses a separate per-organization publisher credential.
Key facts
- Tick
- 1 minute
- Stuck run timeout
- 45 minutes
- Runs in
- AMS process
- Side
- Control plane
- Namespace
- wso2-amp
Talks to (1)
- calls OpenChoreo 1.2.0 Trigger and poll runsPOST workflowruns monitor-evaluation-workflow
Inside and around
Contains: agent-manager-service (AMS)