POST endpoint that you host. Your agent can be built on any framework — Arize doesn’t see it directly, only the requests and responses. This page covers what your endpoint needs to do and how to register it in Arize.
Endpoint requirements
Your agent must expose an HTTP endpoint that:- Accepts
POSTrequests withContent-Type: application/json. - Reads the request body as JSON.
- Returns a JSON response body (any shape — Arize stores it verbatim).
- Is reachable from Arize’s coordinator over the public internet (or a VPC peering setup, for self-hosted deployments).
Request body shape
Arize wraps the body you template into an envelope:input— the body you templated in the agent configuration, hydrated with the current dataset row.arize_metadata— appended by Arize on every request. Use these IDs to stamp spans your agent produces, so traces link back to this run. See Setting up tracing.
input and ignores arize_metadata (or uses it for trace correlation).
Headers Arize sends
| Header | Purpose |
|---|---|
Content-Type: application/json | Body encoding. |
Authorization (optional) | Bearer token or custom auth headers you configured. |
traceparent | W3C trace context, links your agent’s spans to the experiment run. |
tracestate | W3C trace state. |
baggage (optional) | Routing baggage for OpenTelemetry context propagation. |
A minimal Python agent endpoint
Here’s a complete FastAPI example that accepts the Arize envelope, runs your agent code, and returns a response:Pydantic v2 ignores unknown extra fields by default —
arize_metadata will pass cleanly even if you don’t declare it. The example declares it explicitly so you can read from it later for tracing.Authentication
We recommend one of:- Bearer token —
Authorization: Bearer <your-key>. Simple, works with any HTTP client. - API key header — a custom header like
X-API-Key: <your-key>. - Custom headers — multiple headers if your endpoint requires them.
Register the agent in Arize
Name and describe
Give the agent a name (e.g.
customer-support-v2) and a one-line description of what it does. This is what teammates will see in the agent picker.Set endpoint URL
Paste the full URL, e.g.
https://my-agent.example.com/invoke. Arize will not append paths — use the exact URL.Add auth headers
Click Add Header, set
Authorization (or your custom header), and paste the value. Add as many as you need.Define input schema
The Input Schema is a JSON Schema that describes the body Arize templates inside the
input key. This is what unlocks per-experiment config validation.A minimal schema for the FastAPI example above:(Optional) Add request presets
A preset is a named config payload your team can pick from when running an experiment, instead of writing JSON by hand. For example:
Production baseline→{ "model": "claude-sonnet-4-5", "max_turns": 12 }Opus comparison→{ "model": "claude-opus-4-7", "max_turns": 15 }Cost optimized→{ "model": "claude-haiku-4-5", "max_turns": 8 }
Hydrating the body from dataset columns
When you run an experiment, your request body template uses{{column_name}} placeholders that get replaced with values from each dataset row:
input, {{input}} is replaced with that row’s value. If the column is named differently — e.g. question, user_prompt — use {{question}} instead. Placeholder names must match column names exactly.
Common issues
422 Unprocessable Entity from your endpoint
422 Unprocessable Entity from your endpoint
Almost always a body shape mismatch. Confirm your endpoint reads from
input.goal (or whatever you named it), not goal at the top level — Arize wraps the templated body in input. The full envelope is { "input": {...}, "arize_metadata": {...} }.The literal string `{{input}}` arrives in your agent
The literal string `{{input}}` arrives in your agent
The dataset column name doesn’t match the placeholder. Check the column header in your dataset — if it’s
prompt, use {{prompt}}. Use {{column_name}}, not {{dataset.column_name}}.Timeouts on long-running agents
Timeouts on long-running agents
The default request timeout is 120 seconds. For agents that legitimately take longer, raise the timeout in the agent configuration. For agents that run minutes-long workflows, consider an async pattern: return immediately with a job ID, and have the agent push the final result via the Arize API.
Concurrency limits
Concurrency limits
Arize runs dataset rows in parallel. If your agent’s downstream API has a rate limit, lower the experiment’s concurrency setting when you launch it.
Next: connect tracing
Your endpoint accepts requests and returns responses — but for the full picture (every LLM call, tool invocation, latency, token use) to land in Arize alongside the experiment, set up tracing next.Setting up tracing for agent experiments
How
traceparent propagation links your agent’s spans to the experiment run, including dynamic per-request space routing.