Track
Track is one of WebAgent's typed APIs. You describe a monitoring intent; it repeatedly fetches data from web pages on a schedule, compares against a baseline, and notifies you through your chosen channel when a change hits.
Unlike DoAnything / DeepResearch / WebSearch: those "run once, produce a result". Track's resource is a monitor — a long-lived object that runs itself repeatedly on a schedule, producing one run per tick.
When to use it
- What you care about is how something changes over time, not a one-off result right now.
- You want to be pushed a notification when a change happens, rather than polling yourself.
- The monitoring can stay running long-term — a monitor exists until you delete it.
When you only want a one-off result, use WebSearch or DoAnything.
Create a monitor
HTTP endpoint:
POST /v1/projects/{pid}/track/monitors
Authorization: Bearer wa_...Request fields:
| Field | Type | Required | Description |
|---|---|---|---|
intent | string | Yes | The monitoring intent, natural language |
notify_channel | object | Yes | The notification channel — see notify_channel below |
schedule | object | No | The trigger schedule — see schedule below. Omit = use the default schedule |
target_urls | string[] | No | Restrict which pages to monitor; omit and the agent finds them itself |
extraction_schema | object | No | Specifies which structured fields to extract from the page |
trigger_dsl | object | No | The trigger condition — only when met does it count as a "change hit" |
stop_condition_dsl | object | No | The stop condition — once met, the monitor stops automatically |
profile_id | string | No | Reuse the login state of a Profile |
For the full schema, see CreateMonitorRequest in the OpenAPI spec. schedule and notify_channel are nested objects, structured as described in the two sections below.
schedule
schedule.kind decides when the monitor runs:
| kind | Description |
|---|---|
interval | Fixed interval; pair with interval_seconds |
cron | Cron expression; pair with cron |
event | Triggered by an external event; pair with event_filter |
autonomous | The agent decides itself when the next run should be |
notify_channel
notify_channel.kind decides where a change hit is pushed:
| kind | Description |
|---|---|
callback_url | POSTs to your URL; pair with url |
global_webhook | Reuses a project-level webhook; pair with webhook_id |
console_inbox | Pushes to the Console inbox, suited for a human to read |
Example
Create a monitor with intent + schedule + notify_channel together:
from web_agent.v1 import Client
async with Client(api_key="wa_...", project_id="proj_demo") as client:
monitor = await client.track.create(
intent="Notify me when Apple's stock price drops below $200",
schedule={"kind": "interval", "interval_seconds": 3600},
notify_channel={"kind": "callback_url", "url": "https://hooks.example.com/track"},
)
print(monitor["id"], monitor["status"])Baseline and change detection
A monitor's first run establishes a baseline (baseline_extracted). Every run afterward is compared against the baseline, and a notification is sent only when trigger_dsl is met. last_tick_at / last_tick_n record the time and sequence number of the most recent run, and consecutive_failures counts consecutive failures — too many consecutive failures and the monitor enters an error state.
Lifecycle
Once created, a monitor exists long-term until you delete it. Common operations:
| Operation | Description |
|---|---|
pause / resume | Pause / resume scheduling |
run_now | Run once immediately, without waiting for the schedule |
cancel / delete | Stop / delete the monitor |
patch | Change the intent, schedule, channel, etc. |
refine | Adjust the monitoring intent in natural language |
list_runs / get_run | Query historical runs |
list_deliveries / retry_delivery | Query notification delivery records; failed ones can be redelivered |
intervene / message | Respond when the monitor hits a login, captcha, or other situation needing human intervention |
The event stream endpoint …/track/monitors/{mid}/events follows the SSE conventions; follow each tick of the monitor in real time.
Next steps
- Profiles — reuse login state when monitoring sites that require a login
- WebSearch — use this when you only want a one-off result
- API Overview — shared conventions; the full field set is in the OpenAPI spec