Skip to content

Getting started

Monitors

Watch the web for a query on a schedule, with an agent that checks every result and keeps a list of what changed.

Each run of a monitor is billed to your account. So are its agent’s searches and fetches, at the normal search and fetch prices. See Pricing.

Create a monitor and follow what it finds

  1. Ask your agent to create a monitor. Say what to watch for, how often, and when it ends.

    Create a Telem monitor for "Nvidia files a new 8-K with the SEC" that runs every hour and ends in 30 days.

    The agent uses the monitor_create tool and tells you the monitor’s ID. Your agent can ask you before it runs the tool. The monitor has an agent, which checks each result against what you asked for.

  2. Ask your agent to follow what the monitor’s agent finds.

    What did the agent of my Nvidia monitor find?

    The agent uses monitor_changes. For a program that follows the changes, ask for a script: it can use client.monitors.iter_changes in Python or telem.monitors.iterateChanges in JavaScript, as the Python and JavaScript tabs show.

  3. Ask the agent to end the monitor when you are done. If you do not, it ends at the time you asked for, or after 30 days if you asked for none. Its end is at most 30 days ahead.

Everything you can set when you create a monitor

The SDKs take the same fields: the query, then frequency, ttl, agent and webhook_url (webhookUrl in JavaScript). Through the agent tools you can set only the query, the frequency and how long the monitor lives. A monitor that the agent tools create always has an agent. To get its changes by webhook, set the webhook with an SDK or the API.

Field What it does
query Required. A plain sentence that says what to watch for. You cannot change it later.
options.frequency How often Telem runs the query: 1h, 6h, 12h, 1d or 7d. If you leave it out, the monitor runs once a day.
ttl How long the monitor lives, in hours or days, such as 12h or 7d. At most 30d. The SDKs need it for a monitor with an agent.
agent On by default: the agent checks every result against the query and keeps the ones that match. You read what it keeps in the console, or with an SDK or HTTP. Send false for a monitor without an agent.
webhook_url An https URL that gets the agent’s changes and the monitor’s own results; Telem-Webhook-Type tells them apart. See Get changes by webhook.

A create that does not send agent gets the agent, the default, and a notice with code agent_default; send agent to choose.

The other fields shape what a poll returns: see Poll a monitor (legacy).

{
"query": "Nvidia files a new 8-K with the SEC",
"options": {"frequency": "1h"},
"ttl": "30d"
}

If the agent cannot start, Telem still creates the monitor. The monitor falls back to a plain monitor without the agent, and the create answer has agent_note, which says why. Only the create answer has agent_note: a get or a list always shows null. To see later if the monitor has an agent, read agent_state. It is null when the monitor has no agent.

If the create fails, you get an error, and you can send the same request again. After a network error, list your monitors first: the monitor can exist although you got no reply. In the SDKs, a create with an agent and no ttl fails before anything is sent: Python raises ValueError, and JavaScript throws a TelemError with the code invalid_request.

A monitor with an agent keeps a list of what the agent finds: a new item, a changed value, a new verdict, an alert. Read it oldest first. Each change has a seq that only grows. Keep the seq of the last change you handled, and the next read starts after it: no change comes twice, and none is skipped. A change is in the list once the agent run that made it has finished.

What did the agent of my Nvidia monitor find since last time?

The agent uses monitor_changes. It reads the same list as text, one change per line, and gets a next_cursor to start from next time. monitor_agent reads the agent itself.

To read the agent itself, use client.monitors.agent(monitor_id) in Python, telem.monitors.agent(monitorId) in JavaScript, or GET /v1/monitors/{id}/agent. It gives the status, the query, the frequency and the plan version (spec_version, specVersion in JavaScript). A monitor without an agent answers 404.

Read one page at a time

changes returns one page: at most 200 changes, or limit. Send its next_cursor (nextCursor in JavaScript) as cursor in the next read. You are caught up when next_cursor is the watermark, the newest seq you can read.

cursor = 0 # the cursor you kept last time
while True:
page = client.monitors.changes(monitor_id, cursor=cursor)
for change in page.changes:
print(change.seq, change.kind)
cursor = page.next_cursor # keep it, for example in your database
if not page.changes or cursor == page.watermark:
break # caught up

With AsyncTelem, await it.

Over HTTP, the read takes these query parameters. changes in the SDKs takes the same, with kinds as a list and since as a string, a datetime (Python) or a Date (JavaScript). iter_changes and iterateChanges take only cursor.

Parameter What it does
cursor Read the changes after this seq. Without it, the read starts at the first change.
since Start at a time instead, such as 2026-11-03T09:00:00Z. It needs a time zone. Do not send it with cursor.
kinds Only the changes of these kinds, separated by commas: alert,run reads alerts and runs. Use the six kinds below: any other name is a 400. Empty, it reads every kind.
limit How many changes at most: 1 to 500. 200 if you leave it out.
{
"changes": [
{
"seq": 41,
"type": "new_object",
"kind": "entity_added",
"monitor_id": "6f1c…",
"subject": {"entity_id": "…", "name": "Example Corp"},
"before": null,
"after": {"status": "candidate"},
"fact_ids": [],
"at": "2026-11-03T10:00:00+00:00"
}
],
"next_cursor": 41,
"watermark": 41
}

before and after hold the value before and after the change, and are null when there is none. subject names the item the change is about. Its entity_id is null for a change to the whole monitor, such as a run or a plan change. type is the agent’s own name for the change; use kind to tell the changes apart. It is always one of these six:

kind What happened
entity_added The agent found a new item.
value_changed A value of an item changed.
fact_status_changed The agent’s verdict on an item changed, for example from candidate to qualified.
alert The agent raised an alert.
run The agent finished a run.
plan_changed The agent’s plan changed.

When the monitor has a webhook_url, Telem also sends the agent’s new changes there, in the order of seq: POST requests with the same records as changes, in the body {"type": "agent.changes", "monitor_id": …, "changes": […], "next_cursor": …, "watermark": …}, at most 500 changes each. They are signed like the monitor’s other webhook requests, and their Telem-Webhook-Type header is agent.changes; the others have vendor.items (see Get results by webhook). A request can come more than once: skip the changes whose seq you already handled. A URL set later gets every change from the first.

  • A monitor with an agent runs until it ends, whether you read it or not, and its runs bill until then. This is why the SDKs need its ttl.

  • How long a monitor lives depends on how you created it:

    Created with It lives
    The SDKs For its ttl, at most 30 days. Only a monitor without an agent can leave it out, and then it lives until you end it
    HTTP Until you end it, or for ttl if you set it
    The agent tools 30 days, or the time your agent sets, up to 30 days
    The console Up to 30 days, as you choose; 30 by default

    A monitor with no end date runs until you end it, and its runs bill. Turning on Gather results automatically gives a monitor with no end date an end 30 days later. In the console you can set a new end date, at most 30 days from then.

    At expires_at, the monitor ends. Its status becomes ended and it stops running. A poll or an update answers 409 monitor_ended, and a new end date cannot start it again: create a new monitor. You can still delete it, and the results that you polled stay in the session. Some hours later Telem removes it, and the console shows it under Show ended. The agent reads keep answering for an ended or deleted monitor.

  • A monitor belongs to its API key. Through the API and the agent tools you see only the monitors of your key, including the ones made in the console for it. A monitor with an agent also answers every key of the project: any of them can get, pause, resume, renew or delete it and read its agent. Only its own key polls it or changes its webhook or frequency. The console shows all the monitors of the project. If you revoke or delete a key, or it expires, its monitors end, and Telem removes them some hours later. Their results stay readable in the console.

  • The agent tools see less. monitor_list shows your key’s monitors that have an agent, among its newest 200. The earlier tools create_monitor, list_monitors, get_new_results and delete_monitor are retired: they change nothing, and answer with the tool to use instead.

  • When a program polls a console monitor, the console stops gathering its results, so they are not read twice.

Through the agent tools you can list, get, pause, resume and end monitors. In the console you can pause, resume and end a monitor, turn Gather results automatically on or off, change how often it runs, and set a new end date. A monitor that has ended cannot change.

Get one monitor, or list yours, newest first: 50 by default, at most 200 at a time. Over HTTP, the list has next_cursor. Send it as cursor to get the next page. It is null on the last page.

monitor = client.monitors.get(monitor_id)
monitors = client.monitors.list(limit=50)
client.monitors.update(monitor_id, status="paused")
client.monitors.update(monitor_id, status="active", frequency="1d")
client.monitors.update(monitor_id, ttl="30d") # renew: it ends 30 days from now
client.monitors.delete(monitor_id)

A change takes one or more of these fields:

Field What it does
status paused pauses the monitor until you resume it. active resumes it.
frequency A new frequency: 1h, 6h, 12h, 1d or 7d.
ttl A new end, this long from now, such as 7d. At most 30d. Send it to renew a monitor before it ends.

To change the webhook, see Get results by webhook.

You cannot change the query: end the monitor and create a new one. If a change fails with a 502 error, you can send the same request again. If ending a monitor fails, send the DELETE again to finish it.

The monitor object

Create, get, list and change return this object:

{
"id": "6f1c…",
"query": "Nvidia files a new 8-K with the SEC",
"frequency": "1h",
"status": "active",
"session_id": "a2d9…",
"created_at": "2026-10-11T09:00:00Z",
"last_polled_at": null,
"expires_at": "2026-10-18T09:00:00Z"
}
  • status is active (Telem runs the query on the schedule), paused (you paused it; it stays paused until you resume it) or ended (its end date passed, or its API key was revoked or expired; it does not run again).
  • session_id is the session where Telem records your polls.
  • expires_at is when the monitor ends, or null if it does not end.
  • agent_state is null for a monitor without an agent. Otherwise it shows the agent: its status (such as compiling, ready, paused or failed), needs_attention, plan_version, next_run_at, and watermark, the newest seq you can read. While the agent makes its first plan, compile says how it is going, and gives an error if it failed.
If something goes wrong
  • No changes yet: the agent makes its plan first. Its agent_state.status is compiling until it is ready, and next_run_at says when the agent runs next.
  • Changes stopped coming: check the monitor’s status.
    • paused: resume it.
    • ended: its end date passed, or its API key was revoked or expired. Create a new monitor.
  • A monitor without an agent: see Poll a monitor (legacy).
Status Code When What to do
400 invalid_request The frequency is not in the list, a change sent none of status, frequency, webhook_url and ttl, a search refuses an option in options.search, or a poll names the session_id of another monitor. param names the field. Fix the field.
400 invalid_request A search refused the request. Sending it unchanged will not help. Change the request, such as the query or the sites.
400 invalid_request A search no longer has this monitor, so a poll or a change cannot run. Sending it again will not help. End the monitor and create a new one.
400 query_immutable A change sent query. Create a new monitor.
400 invalid_session The session in metadata is not correct. Fix the session.
400 cursor_conflict An agent read sent both cursor and since. Send one of them.
400 kinds_invalid An agent read’s kinds has a name that is not one of the six kinds. Use the kinds in Read one page at a time.
402 payment_required A create: the account cannot pay for the monitor. The message says why. Check the account’s billing in the console.
404 not_found The monitor does not exist, or another API key created it. A monitor with an agent answers every key of its project, except to a poll. An agent read of a monitor without an agent is 404 too. Check the ID and the key.
409 poll_in_progress Another call uses this monitor now. Try again.
409 monitor_ended The monitor has ended. Its results stay readable. Create a new monitor.
409 pause_not_supported, update_not_supported Telem cannot make this change now. Nothing changed. Try again later.
422 invalid_request Any other field is missing or not correct. For example: the body is not valid JSON or has an unknown field; the query is empty; ttl or webhook_url is not correct; a site in options.include_domains is not a hostname; or options.search has an option that the monitor sets itself. param names the field. A monitor ID that is not a UUID also gets 422, not 404, except in an agent read, which answers 404. Fix the request.
429 rate_limited Telem is busy. Wait for the seconds in Retry-After, then try again.
500 internal_error Telem could not create the monitor. No monitor exists. Try again.
502 unavailable The monitor call failed. Send the same request again.
503 unavailable Telem cannot run monitors now. Try again later.

Monitor errors have this body: {"error": {"code": "...", "message": "..."}}. The SDKs keep code on the error. See Errors.

API reference

Every field of the monitor calls and their responses.

MCP server

The monitor tools your agent gets, with the search and page-reading tools.

Python SDK

Monitors, search, fetch and sessions from Python.

JavaScript SDK

Monitors, search, fetch and sessions from TypeScript.

Errors

Every error the API returns, and what to do.

Pricing

What each run of a monitor costs.

A poll reads a monitor’s own results, not its agent’s: the results that are new since your last poll. It still works, but poll() in the SDKs is deprecated and warns once: read the agent’s changes instead. A monitor created without an agent (agent=False in Python, agent: false in JavaScript, "agent": false over HTTP) has only a poll and a webhook, and its ttl is optional.

Poll with client.monitors.poll(monitor_id) in Python, telem.monitors.poll(monitorId) in JavaScript, or POST /v1/monitors/{id}/poll with no body. These create fields shape what a poll returns:

Field What it does
options.include_domains Only results from these sites and their subdomains, such as ["sec.gov"]. Hostnames only, at most 20.
options.search Also search the web for the query on each run. It takes num_results (10 if you leave it out) and tier. {} uses the default search. The default search options of your SDK client do not apply.
metadata Query lineage keys, as in a search.
webhook_url An https URL that gets the new results. See Get results by webhook.

A poll returns its results in the shape of a search response. The agent tools do not poll: they read what the agent finds.

  • The first poll returns all the results so far. After that, a result comes once, so keep the results that you poll. After a network error, a poll can have returned results that you did not get: they do not come again.
  • The body is optional. It takes session_id and metadata, as a search does. Without them, Telem records the poll in the monitor’s own session. The session_id of another monitor is refused.
  • Each page comes once, even if it changes later. A new section of a page you already got, such as changelog#v3, is not a new page.
  • With options.search, each run returns the pages published since the run before it, and the first run returns the pages dated in the last 7 days. Pages with no date are skipped.
  • A monitor that nobody polls stops running after 7 days, or two of its periods when that is longer, until the next poll. For a monitor with a webhook, a run counts as a poll, also when it finds nothing new or its webhook request fails, but not when the run fails. Check for new results in the console counts too. The status still shows active, and the monitor can miss results from that time.

A poll response can carry warnings:

Code What it means
first_run_pending A source’s first run has not finished yet. Its results come in a later poll.
run_failed A run failed or was cancelled. The message gives the reason.
monitor_inactive The monitor stopped and does not run. End it and create a new one.
more_runs_pending More than 100 runs were waiting. You get the oldest 100 now and the rest on the next poll.
results_truncated Some old runs are no longer kept, because you did not poll for a long time.
dropped_results Some results had no URL, so Telem skipped them.

Set webhook_url when you create or change a monitor with an SDK or the API. null removes it, and in the SDKs "" does too. When a run finds new results, Telem sends them to that URL in a POST request: the body of a poll response, with "type": "vendor.items" and monitor_id added. A monitor with an agent also sends its changes there: see Get changes by webhook. The response that sets webhook_url gives a webhook_secret, only once, so keep it. To get a new secret, set the URL again.

Each request has the headers Telem-Monitor-Id (the monitor ID), Telem-Webhook-Type (vendor.items, or agent.changes) and Telem-Signature (t=<Unix time in seconds>,v1=<signature>). Check each request with the body exactly as you received it: verify_webhook(body, signature, webhook_secret) from telem in Python, or await verifyWebhook(body, signature, webhookSecret) from @telemai/sdk in JavaScript. The check fails if the signature is wrong or older than 5 minutes.

  • If your URL does not answer with a 2xx status, Telem tries again after 1 minute, 5 minutes, 30 minutes and 2 hours, then stops. A 3xx, or a 4xx other than 429, stops it at once: Telem does not follow redirects.
  • The URL must use https, and its host must have a public IPv4 address.
  • The same results can come more than once. Use interaction_id to find a repeat.
  • A poll does not return the results of a webhook request that failed.
  • When you change or remove the URL, or end the monitor, the next requests, retries included, go to the new URL with the new secret, or stop.
Was this page helpful?