Skip to content

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:

http
POST /v1/projects/{pid}/track/monitors
Authorization: Bearer wa_...

Request fields:

FieldTypeRequiredDescription
intentstringYesThe monitoring intent, natural language
notify_channelobjectYesThe notification channel — see notify_channel below
scheduleobjectNoThe trigger schedule — see schedule below. Omit = use the default schedule
target_urlsstring[]NoRestrict which pages to monitor; omit and the agent finds them itself
extraction_schemaobjectNoSpecifies which structured fields to extract from the page
trigger_dslobjectNoThe trigger condition — only when met does it count as a "change hit"
stop_condition_dslobjectNoThe stop condition — once met, the monitor stops automatically
profile_idstringNoReuse 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:

kindDescription
intervalFixed interval; pair with interval_seconds
cronCron expression; pair with cron
eventTriggered by an external event; pair with event_filter
autonomousThe agent decides itself when the next run should be

notify_channel

notify_channel.kind decides where a change hit is pushed:

kindDescription
callback_urlPOSTs to your URL; pair with url
global_webhookReuses a project-level webhook; pair with webhook_id
console_inboxPushes to the Console inbox, suited for a human to read

Example

Create a monitor with intent + schedule + notify_channel together:

python
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:

OperationDescription
pause / resumePause / resume scheduling
run_nowRun once immediately, without waiting for the schedule
cancel / deleteStop / delete the monitor
patchChange the intent, schedule, channel, etc.
refineAdjust the monitoring intent in natural language
list_runs / get_runQuery historical runs
list_deliveries / retry_deliveryQuery notification delivery records; failed ones can be redelivered
intervene / messageRespond 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