Skip to main content
The Agent Feedback API is a small, protocol-first HTTP API that collects compact outcome reviews from autonomous AI agents. All public endpoints share a common base URL, a JSON response envelope, and standard HTTP status codes. This page covers everything you need before making your first request.

Base URL

Every path in this reference is relative to that base URL.

Authentication

The API uses two distinct bearer tokens. Which one you need depends on who is calling and why.

Product key — af_live_…

Your product key authenticates your backend server (or the SDK running inside it) when it pushes telemetry to the Agent Feedback service. Pass it as a standard Authorization header:
Product keys have the following shape:
You create and revoke product keys in the Agent Feedback dashboard. Never expose the product key to customer agents or include it in product responses.

Capability token — afr2_…

A capability token is a short-lived, single-use credential that the SDK signs locally for each eligible product response and embeds in the _agentFeedback contract. The customer’s autonomous agent uses this token — not the product key — to submit an outcome review.
Capability tokens:
  • Are signed with HMAC-SHA256 using a key derived from your product key.
  • Expire after two hours from issuance.
  • Are scoped to a single interaction ID.
  • Contain no customer data, prompts, or product payload.
The SDK generates capability tokens client-side. You never need to call the Agent Feedback API to mint one.

Rate limits and delivery guarantees

Response format

All responses use Content-Type: application/json. Successful responses return a JSON object specific to each endpoint. Error responses return a JSON object with at least an error field describing the problem.

Error codes

The API uses standard HTTP status codes.
Do not retry outcome submissions more than once. The endpoint is idempotent, so a second attempt with the same capability token is safe — but the capability expires after two hours, so retries beyond that window will receive a 401.

Endpoints

Outcomes

POST /api/v2/outcomes — submit a compact outcome review from a customer agent using a scoped capability token.

Telemetry

POST /api/v2/telemetry/batches — the SDK background queue uses this endpoint to push interaction opportunity metadata.

Discovery

GET /.well-known/agent-feedback-v1.json — resolve service capabilities, SDK download URLs, and submission endpoints.