BestAgent AIBlog

Telemetry API and SDK

Send minimal run metrics and retrieve private analytics with scoped API credentials.

Python integration example
from telemetry_sdk import TelemetryClient

client = TelemetryClient(token=ingest_key, enabled=True)
event = client.event(
    "your-agent", "1.0.0", "support-routing", "standard",
    duration_ms=1250, execution_status="succeeded",
)
client.send([event])

Authentication and limits

Use an Authorization bearer header over HTTPS. Keep the ingestion key out of browsers and logs. Ingestion accepts at most 50 events and 64 KiB per request, with 120 requests per credential per UTC hour. Private analytics allows 240 requests per credential per UTC hour.

Batch ingestion

POST /v1/telemetry/events accepts an object with an events array. Use random UUIDv4 event and run IDs and a UTC hour bucket. Send the same IDs on retries. The response reports accepted, duplicate, and ignored test events.

Analytics and settings

GET /v1/analytics/agents/{id} returns your summary and per-version segments. GET and POST /v1/analytics/agents/{id}/settings read and update collection consent. GET /v1/analytics/agents/{id}/export returns events and a pagination cursor.

Public aggregates

GET /v1/research/aggregates returns the latest completed monthly window, qualifying fixed-basket cohorts and the methodology version. Until a reviewed release has qualifying cohorts the status is insufficient_data.

Errors and retries

Retry HTTP 429 using Retry-After and retry temporary 5xx errors with exponential backoff. Check credentials on 401, collection settings on 403, and the schema on 422. Telemetry can be skipped if the endpoint is unavailable.