Send Telemetry Batches — POST /api/v2/telemetry/batches
Reference for the SDK telemetry batch endpoint. Ships interaction opportunities asynchronously with your af_live_ product key without blocking responses.
The telemetry batches endpoint receives interaction opportunity metadata that the SDK enqueues locally and ships in the background. Your product responses never wait for this call — the SDK drains its queue asynchronously at a 500 ms interval, or sooner when 50 events accumulate. You do not need to call this endpoint yourself: the SDK handles everything automatically.
The SDK handles batching automatically. You only need this endpoint if you are implementing a custom SDK or porting to a new language.
The SDK maintains a bounded in-memory queue (default: 1,000 events). When the queue is full, the oldest event is dropped to make room for the new one — product responses are never delayed or failed as a result. Batches are sent with a 3-second HTTP timeout; if delivery fails, the SDK retries each event up to three times before discarding it. A single warning is logged the first time delivery fails.
UUID v4 identifier for the interaction. Generated by the SDK when it prepares the _agentFeedback envelope. Used to correlate telemetry with a later outcome review.
The normalized route path, with dynamic segments replaced by :id. For example, /orders/:id or /search. Must be between 1 and 160 characters.The SDK derives this automatically by replacing UUIDs and numeric path segments. If you are building a custom SDK, apply the same normalization before sending.
An opaque reference to the customer in your own system, for example a hashed user ID. Must be between 1 and 160 characters. Never send an email address, name, or any other PII.
An observed agent runtime identifier, such as a User-Agent header value or MCP client name hint. This is explicitly unverified and is never presented as agent identity. Must be between 1 and 200 characters.
If you are porting Agent Feedback to a new language, your implementation must satisfy these requirements for the telemetry queue:
Non-blocking — enqueue the event synchronously; flush asynchronously. Never await the HTTP call inside a request handler.
Bounded — cap the queue at a fixed size (recommended: 1,000 events). Drop the oldest event when the queue is full rather than growing unbounded.
Batched — accumulate events and flush up to 50 at a time. Flush when 50 events accumulate, or after at most 500 ms, whichever comes first.
Retry-limited — retry failed batches up to 3 times. Discard after that to avoid memory growth.
Schema-conformant — normalize operation paths (replace UUIDs and bare numeric segments with :id) and only send the fields defined in telemetry-batch.schema.json.