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.
Before you begin
Section titled “Before you begin”- A Telem API key. Create one in the Telem console, under API keys in your project. See API keys. In Claude and ChatGPT you need no key: their Telem connector signs in with your Telem account.
- For the Coding agent tab: Telem set up in Claude Code, Codex, Grok Build, Muse, VS Code, Cursor or Devin Desktop, or any agent connected to the hosted MCP server, such as Claude and ChatGPT with the Telem connector. The other integrations do not have the monitor tools yet.
- For the Python and JavaScript tabs: the Python SDK or the JavaScript SDK.
- For the Console tab: edit rights in the project: Editor, Maintainer or organization administrator. A Viewer can see the monitors but not change them.
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.
Start a monitor
Section titled “Start a monitor”Create a monitor and follow what it finds
-
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_createtool 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. -
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 useclient.monitors.iter_changesin Python ortelem.monitors.iterateChangesin JavaScript, as the Python and JavaScript tabs show. -
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.
-
Create a monitor. Its agent checks every result against your query and keeps the ones that match. Set
ttl, how long the monitor lives: at most 30 days. Renew it later withupdate(monitor.id, ttl="30d"): it then ends 30 days from that call.from telem import Telemclient = Telem()monitor = client.monitors.create("Nvidia files a new 8-K with the SEC",frequency="1h",ttl="30d",)print(monitor.id) -
Check its agent.
agent_stateiscompilingwhile the agent makes its plan, thenready.state = client.monitors.get(monitor.id).agent_stateprint(state.status if state else "no agent") -
Follow what the agent finds, as often as you need. Keep the
seqof the last change: the next read starts after it.saved = 0 # the seq you kept last timefor change in client.monitors.iter_changes(monitor.id, cursor=saved):print(change.seq, change.kind, change.subject.name)saved = change.seq -
Read the agent: its status, query, frequency and plan version.
agent = client.monitors.agent(monitor.id)print(agent.status, agent.spec_version) -
End it when you are done.
client.monitors.delete(monitor.id)
-
Create a monitor. Its agent checks every result against your query and keeps the ones that match. Set
ttl, how long the monitor lives: at most 30 days. Renew it later withupdate(monitor.id, { ttl: "30d" }): it then ends 30 days from that call.import { Telem } from "@telemai/sdk"const telem = new Telem()const monitor = await telem.monitors.create("Nvidia files a new 8-K with the SEC", {frequency: "1h",ttl: "30d",})console.log(monitor.id) -
Check its agent.
agentStateiscompilingwhile the agent makes its plan, thenready.const { agentState } = await telem.monitors.get(monitor.id)console.log(agentState?.status ?? "no agent") -
Follow what the agent finds, as often as you need. Keep the
seqof the last change: the next read starts after it.let saved = 0 // the seq you kept last timefor await (const change of telem.monitors.iterateChanges(monitor.id, { cursor: saved })) {console.log(change.seq, change.kind, change.subject.name)saved = change.seq} -
Read the agent: its status, query, frequency and plan version.
const agent = await telem.monitors.agent(monitor.id)console.log(agent.status, agent.specVersion) -
End it when you are done.
await telem.monitors.delete(monitor.id)
-
Create a monitor. It has an agent unless you send
"agent": false. Sendttltoo: without it, a monitor with an agent runs until you end it. Renew it later with aPATCHthat sends a newttl. The response gives itsid.Terminal window curl -X POST "https://router.telem.ai/v1/monitors" \-H "Authorization: Bearer $TELEM_API_KEY" \-H "Content-Type: application/json" \-d '{"query": "Nvidia files a new 8-K with the SEC","options": {"frequency": "1h"},"ttl": "30d"}' -
Check its agent. In the monitor,
agent_state.statusiscompilingwhile the agent makes its plan, thenready.Terminal window curl "https://router.telem.ai/v1/monitors/$MONITOR_ID" \-H "Authorization: Bearer $TELEM_API_KEY" -
Follow what the agent finds. Send the answer’s
next_cursorascursorin the next read.Terminal window curl "https://router.telem.ai/v1/monitors/$MONITOR_ID/agent/changes?cursor=0" \-H "Authorization: Bearer $TELEM_API_KEY" -
Read the agent.
Terminal window curl "https://router.telem.ai/v1/monitors/$MONITOR_ID/agent" \-H "Authorization: Bearer $TELEM_API_KEY" -
End it when you are done. The answer is
204.Terminal window curl -X DELETE "https://router.telem.ai/v1/monitors/$MONITOR_ID" \-H "Authorization: Bearer $TELEM_API_KEY"
-
Open Monitors in your project. In the Telem console, open your project, then Monitors, then New monitor.
-
Say what to watch for, and how often. Fill in What to watch for. It cannot change later. Then choose:
- How often: every day if you leave it.
- API key: the key the monitor belongs to. It needs Telem Search. Its project pays for the monitor.
- Ends at: when the monitor ends, at most 30 days from now. It is 30 days from now if you leave it.
- Optional: Only these sites.
- Agent, on by default: an agent checks each result against what you wrote, and keeps the ones that match, with their sources.
-
See what is new. A console monitor gathers new results automatically. They show on the monitor after every run. You can turn off Gather results automatically. Then press Check for new results to see what is new.
-
End it when you are done. Open the monitor’s menu, press End monitor, and confirm. Its found items stay under Show ended.
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.
Read what the agent finds
Section titled “Read what the agent finds”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.
saved = 0 # the seq you kept last time; 0 starts at the first change
for change in client.monitors.iter_changes(monitor_id, cursor=saved): print(change.seq, change.kind, change.subject.name) saved = change.seq # keep it, for example in your databaseiter_changes reads page after page until you are caught up, and then it ends. Call
it again later from saved. With AsyncTelem, use async for.
let saved = 0 // the seq you kept last time; 0 starts at the first change
for await (const change of telem.monitors.iterateChanges(monitorId, { cursor: saved })) { console.log(change.seq, change.kind, change.subject.name) saved = change.seq // keep it, for example in your database}iterateChanges reads page after page until you are caught up, and then it ends.
Call it again later from saved.
curl "https://router.telem.ai/v1/monitors/$MONITOR_ID/agent/changes?cursor=0" \ -H "Authorization: Bearer $TELEM_API_KEY"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 upWith AsyncTelem, await it.
let cursor = 0 // the cursor you kept last time
for (;;) { const page = await telem.monitors.changes(monitorId, { cursor }) for (const change of page.changes) console.log(change.seq, change.kind) cursor = page.nextCursor // keep it, for example in your database if (page.changes.length === 0 || cursor === page.watermark) break // caught up}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. |
Get changes by webhook
Section titled “Get changes by webhook”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.
Specific to monitors
Section titled “Specific to monitors”-
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 itHTTP Until you end it, or for ttlif you set itThe 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 becomesendedand it stops running. A poll or an update answers409 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_listshows your key’s monitors that have an agent, among its newest 200. The earlier toolscreate_monitor,list_monitors,get_new_resultsanddelete_monitorare 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.
Pause, change, end
Section titled “Pause, change, end”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 nowclient.monitors.delete(monitor_id)const monitor = await telem.monitors.get(monitorId)const monitors = await telem.monitors.list({ limit: 50 })
await telem.monitors.update(monitorId, { status: "paused" })await telem.monitors.update(monitorId, { status: "active", frequency: "1d" })await telem.monitors.update(monitorId, { ttl: "30d" }) // renew: it ends 30 days from nowawait telem.monitors.delete(monitorId)curl "https://router.telem.ai/v1/monitors?limit=50" \ -H "Authorization: Bearer $TELEM_API_KEY"
curl -X PATCH "https://router.telem.ai/v1/monitors/$MONITOR_ID" \ -H "Authorization: Bearer $TELEM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"status": "paused"}'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"}statusisactive(Telem runs the query on the schedule),paused(you paused it; it stays paused until you resume it) orended(its end date passed, or its API key was revoked or expired; it does not run again).session_idis the session where Telem records your polls.expires_atis when the monitor ends, ornullif it does not end.agent_stateisnullfor a monitor without an agent. Otherwise it shows the agent: itsstatus(such ascompiling,ready,pausedorfailed),needs_attention,plan_version,next_run_at, andwatermark, the newestseqyou can read. While the agent makes its first plan,compilesays how it is going, and gives anerrorif it failed.
If something goes wrong
- No changes yet: the agent makes its plan first. Its
agent_state.statusiscompilinguntil it isready, andnext_run_atsays 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.
Learn more
Section titled “Learn more”Every field of the monitor calls and their responses.
The monitor tools your agent gets, with the search and page-reading tools.
Monitors, search, fetch and sessions from Python.
Monitors, search, fetch and sessions from TypeScript.
Every error the API returns, and what to do.
What each run of a monitor costs.
Poll a monitor (legacy)
Section titled “Poll a monitor (legacy)”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. |
What a poll returns
Section titled “What a poll returns”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_idandmetadata, as a search does. Without them, Telem records the poll in the monitor’s own session. Thesession_idof 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. |
Get results by webhook
Section titled “Get results by webhook”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
2xxstatus, Telem tries again after 1 minute, 5 minutes, 30 minutes and 2 hours, then stops. A3xx, or a4xxother than429, 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_idto 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.