Run experiment
Runs a dataset experiment against an agent. Send agentId (agent id or agent version id), datasetId, and optional scorers (scorer types from the catalog, e.g. “tone”, “bias” — code scorers and LLM judges both supported). Set async: true for fire-and-forget (returns an experimentId to poll GET /api/datasets//experiments/); omit it to block and receive the full summary. Requires X-User-Id. Each dataset item runs in its own conversation thread by default, so items never share memory state and can run concurrently. To pin an item to a specific thread (e.g. several items forming one conversation), set requestContext.threadId on that dataset item — and run with maxConcurrency: 1 if multiple items share a thread. Send variables to fill the in the agent’s prompt blocks for every item; a dataset item’s own requestContext.variables are merged over them leaf by leaf, so a row overrides only what it varies. By default the run is REFUSED (400) when a placeholder with no || 'default' has no value — pass strictVariables: false to run anyway. The response always carries a variables report (supplied, required, missing, dropped, unused).
Authorizations
Organization API key, generated in studio.sidenet.ai. Backend only — never in a browser.
Headers
User id. May also be sent in the request body or as a userId query param.
Body
"6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10"
"ds_orders_v3"
Scorer types from the catalog (e.g. "tone", "bias"). Code scorers and LLM judges both supported.
"Refund tone — August"
"Checks the refund answers after the new brand-voice block"
Dataset version to run against. Defaults to the newest.
3
5
Milliseconds one item may take before it is failed.
60000
Retries per dataset item before it is recorded as failed. Defaults to 2 so a transient provider fault does not fail an item; pass 0 to fail on the first error.
Values for the {{variable}} placeholders in the agent's prompt blocks, applied to every item. Scalars or arrays of them; a dot path up to 3 segments may be sent nested ({ "user": { "language": "FR" } }) or dotted ({ "user.language": "FR" }). Reserved: now.*. A dataset item's own requestContext.variables are merged over these leaf by leaf. Display-only — never used for authorization or identity.
Refuse to start (400) when a placeholder with no default has no value for some item, or a supplied value is rejected by the limits. Pass false to run anyway and read the variables report on the response.
Response
The finished run, or — with async: true — the id of the run that was started
started on an async run; the scores are not ready yet.
completed, started Async runs only — poll the experiment by this id.
Sync runs only: the scorer results over the dataset. Its shape follows the scorers you asked for.