Skip to main content

Rollouts

A trainer runs a search agent many times on each question and scores each run with a reward that often comes later: a forecast made as of a past date is scored when the question resolves. Tag each search with the rollout it belongs to, send the outcome when it is known, and the router keeps the two together for you to read back.

The runs are laid out as question → group → rollout → searches:

levelnamed bywhat it is
questionquestion_idWhat the agent is asked, such as a forecast as of a date.
groupgroup_idOptional: a group of rollouts, such as step-412 in the examples below.
rolloutrollout_idOne run of the agent on the question.
searchits trace idEach search the run made, tagged with the rollout's ids.
  1. Tag every search of a rollout with rollout.
  2. When the rollout ends, or its question resolves, send its outcome: the answer, what it is scored against, and the reward.
  3. Read the rollouts back: the summary for counts and cost, the export for each search beside the outcome.

Rollouts are made for dated search, where every rollout of a question can search the web as of the same date; a live search can be tagged too. Everything is scoped to the key's project. No parameter names a project, and another project's rollouts, outcomes and ids are never visible, whatever ids the two use.

Who can use them​

Rollouts are kept only for a project that keeps search content: the project's Keep search content setting, on by default, which GET /v1/account reports as retention.content. An unclaimed agent keeps none. An outcome is content, and a project that keeps none has asked for its content to be kept nowhere. For such a project:

  • its tagged searches are served exactly as they would be without the tags, and nothing of the tags is stored. The tags are still checked: a malformed one is 400 rollout_invalid, as for any project;
  • the outcome write, the summary and the export answer 403 rollouts_require_retention, before they read the body or the parameters;
  • the delete still answers, so a project that has stopped keeping content can delete the outcomes it stored while it did.

Add rollout to POST /v1/search or /v1/search/stream:

{"query": "…", "as_of": "2026-03-01T00:00:00Z",
"rollout": {"question_id": "fed-march-2026", "group_id": "step-412", "rollout_id": "step-412.r3"}}
  • question_id and rollout_id are required, and together they identify the rollout within your project. group_id is optional.
  • Each id is 1 to 128 characters of [A-Za-z0-9._:-].
  • Anything else, such as a missing id, another character, another key or another type, is 400 rollout_invalid, before any provider is called. Unlike trace, a bad rollout is never dropped: a tag silently lost would be a rollout silently missing from the export.
  • The tags never reach a provider and change nothing about how the search is served, cached or billed. They are not part of the cache key.
  • The tags carry no cutoff, and nothing pins one to a rollout or a project: send the same as_of on every search of the rollout. A search sent without it is live, and so is every search on /v1/search/stream, which refuses as_of (400 as_of_conflict). A rollout that mixes cutoffs, or mixes dated and live searches, is flagged as_of_mixed in the export; one whose searches are all live is not.
  • They are not echoed in the answer. They are on the search's trace, where GET /v1/traces shows rollout and as_of, and in the export. A project that stops keeping content is shown none of the tags it kept before.

A rollout's group​

A rollout's group is its outcome's group_id when the outcome names one, and otherwise the group_id of its latest retained search that names one. An outcome sent without a group therefore keeps the group its searches were tagged with. This is the group the summary and the export show a rollout under, the one their group_id filter selects by, and the one a delete by group takes.

Send the outcome​

curl -s https://api.jevlin.ai/v1/rollouts/outcome \
-H "Authorization: Bearer $JEVLIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question_id": "fed-march-2026", "group_id": "step-412", "rollout_id": "step-412.r3",
"answer": {"p_cut": 0.72}, "outcome": {"cut": true},
"reward": 0.92, "resolved_at": "2026-03-19T18:00:00Z"}'
{"stored": true, "question_id": "fed-march-2026", "group_id": "step-412", "rollout_id": "step-412.r3",
"stored_at": "…", "expires_at": "…"}
fieldwhat it is
question_id, rollout_idrequiredThe rollout's ids, as its searches carried them.
group_idoptionalIts group.
answerrequiredWhat the rollout answered: any JSON, null included, at most 16 KiB as compact JSON.
outcomerequiredWhat the answer is scored against: any JSON, null included, at most 16 KiB as compact JSON.
rewardoptionalA number.
resolved_atoptionalWhen the outcome became known: RFC 3339 with a zone, from 1900-01-01 to 2299-12-31, kept to the millisecond.
  • It is an upsert. A rollout has one outcome, and a later write replaces the earlier one whole, so each write states every field. Send answer with "outcome": null when the rollout ends, and both when the question resolves.
  • The reply is 200 with stored: true, the ids, stored_at, and expires_at: the latest the outcome is kept unless it is deleted sooner. See Retention.
  • The searches may be gone. An outcome is accepted whether or not the rollout's searches are still kept, because it often arrives after they have expired. The export then carries the outcome and says the searches are gone.
  • It is strictly decoded. An unknown field is 400 outcome_invalid, and so is a missing or oversized answer or outcome, a reward that is not a number, and a resolved_at with no zone or out of range. A bad id is 400 rollout_invalid, a body that is not JSON 400 malformed_json, and a body over 64 KiB 413 body_too_large.
  • It spends nothing, so it works when the project is out of credit or at its spend ceiling. It counts against the request rate like any other call, and is refused while the platform is paused.

The daily quota​

A project may write at most 64 MiB of outcomes a UTC day: the answer, the outcome and the ids of every write, as compact JSON, rewrites included. Outcomes spend nothing, so without a bound on bytes, what one project keeps over its 30 days would be bounded only by its request rate.

  • A write counts when it is sent. One you stopped waiting for still counts, since it may still be stored; one refused before anything was written does not.
  • Past the quota, a write is 429 outcome_quota_exceeded, with a Retry-After that runs to midnight UTC.
  • Reads and deletes are not affected.

Read the rollouts back​

The summary and the export take the same filters, and the filters select whole rollouts.

parameterselects
question_idRollouts of this question.
group_idRollouts in this group, by the rollout's group.
rollout_idOn the export only: this rollout.
since, untilRollouts with a search made, or an outcome written, at or after since and before until, as RFC 3339 instants.
cursorThe previous page's next_cursor, sent with the same filters.
limitRollouts a page: on the summary 200 by default and at most 1,000, on the export 20 by default and at most 100. A larger limit is the maximum, and one that is not a positive whole number is the default; neither is refused.
  • Whole rollouts. A rollout is in when one of its retained searches matches, or its outcome does. With group_id, it is in when the rollout's group is that group, not when one of its searches once named it, so the reads and a delete by group agree on what a group holds. A selected rollout comes back with all of it, not only what matched.
  • Nothing is dropped. A parameter the route does not take, or one given twice, is 400 invalid_request, as is a query string that does not parse, a time that is not RFC 3339 and a cursor the route did not issue. An id of the wrong shape is 400 rollout_invalid. A filter is never ignored, so the answer is never broader than asked.
  • Pages are in (question_id, rollout_id) order. Pass next_cursor back as cursor; it is empty on the last page.
  • Cost is what you were charged, as the ledger bills you. A call on your own provider key is not in it.

The summary​

curl -s "https://api.jevlin.ai/v1/rollouts/summary?question_id=fed-march-2026" \
-H "Authorization: Bearer $JEVLIN_API_KEY"

One page of rollouts under rollouts, each with, over its retained searches:

  • searches, dated, live and cache_hits;
  • cost_micros, what you were charged for those searches;
  • pending, the searches whose slow-lane arms are still running. While it is not 0, cost_micros is a floor, not the final charge;
  • has_outcome and reward.

The same counts are summed per question (questions), per group (groups) and over the page (totals), each with rollouts, how many rollouts it sums. A group is within its question: the same group_id under two questions is two groups. The sums are over the page's rollouts. The answer also carries next_cursor and a coverage with the step kinds, retained_since and a note, as on the export.

The export​

curl -s "https://api.jevlin.ai/v1/rollouts/export?question_id=fed-march-2026" \
-H "Authorization: Bearer $JEVLIN_API_KEY"

The answer is application/x-ndjson: one line per rollout, then one end line.

{"kind":"rollout","question_id":"fed-march-2026","group_id":"step-412","rollout_id":"step-412.r3",
"has_outcome":true,"answer":{"p_cut":0.72},"outcome":{"cut":true},"reward":0.92,
"resolved_at":"2026-03-19T18:00:00Z","outcome_recorded_at":"2026-03-19T18:02:11.204Z",
"steps":[{"kind":"search","trace_id":"019a…","at":"2026-03-01T09:14:02.511Z","seq":3,
"query":"fed funds futures march","as_of":"2026-03-01T00:00:00Z","cost_micros":5000,
"latency_ms":1890,"cache_hit":false,"document":{"…":"the stored response"}}],
"as_of":"2026-03-01T00:00:00Z","as_of_values":["2026-03-01T00:00:00Z"],"as_of_mixed":false,
"totals":{"searches":1,"dated":1,"live":0,"cache_hits":0,"cost_micros":5000,"pending":0},
"line_totals":{"searches":1,"dated":1,"live":0,"cache_hits":0,"cost_micros":5000,"pending":0},
"coverage":{"included":["search"],"not_included":["read"],"retained_since":"2026-10-27T12:00:00Z",
"searches_retained":1,"note":"page reads (POST /v1/fetch) are not in this export yet"}}
{"kind":"end","rollouts":1,"next_cursor":""}

Each rollout line carries:

  • the rollout's ids and its group;
  • its outcome: has_outcome, answer, outcome, reward, resolved_at, and outcome_recorded_at, when it was last written. With no outcome, has_outcome is false, the next four are null, and outcome_recorded_at is left out;
  • steps: each retained search with its stored response (the results it returned), its cutoff and its cost. A step has trace_id, at, seq (the client's trace.seq, when it sent one), query, as_of (null for a live search), cost_micros, latency_ms, cache_hit and document, the stored response. Steps are ordered by the millisecond each search was made, then seq, then the trace id;
  • as_of, as_of_values and as_of_mixed, the cutoffs;
  • totals over every retained search of the rollout, and line_totals over the steps the line carries, each with searches, dated, live, cache_hits, cost_micros and pending;
  • coverage, what the line does not hold.

A step's cost_micros is what you were charged for that search; while the step has pending, its slow-lane arms still running, it is a floor. The stored responses are results from third-party search providers and remain subject to their terms.

Read kind on every line and on every step, and skip a kind you do not know: today every step is a search, and page reads (POST /v1/fetch) are not in the export yet.

Cutoffs. as_of_values lists the distinct cutoffs of the rollout's retained searches, and as_of is there only when every search was made at one cutoff and none was live. as_of_mixed is true when the searches mix cutoffs, or mix dated and live searches: such a rollout may have seen the future of the date it was meant to stand at. All three are over every retained search, so a line cut at its bound is still flagged.

Bounds. A page stops starting new rollouts past 32 MiB, and always carries one. A line carries at most 1,000 searches and stops adding them past 64 MiB, always carrying the first; it then says steps_truncated: true in its coverage, and its line_totals are less than its totals.

Streaming. The export is streamed a line at a time, so read it as it streams.

  • A failure partway through ends the page with an end line carrying "error": {"code": "rollouts_store_failed", …}. A line before it that does not parse was cut, and next_cursor resumes after the last whole line (empty: from the start).
  • A failure before the first line is a plain 503 rollouts_store_failed with Retry-After.
  • A page has two minutes for its reads, and a few seconds more to be written to you. A page not read by then is cut where it stands, with no end line; ask for a smaller limit if a page cannot be read in time.

Coverage says what a line does not hold:

  • included and not_included: the step kinds it carries, ["search"], and does not, ["read"];
  • retained_since: searches made before it are no longer kept;
  • searches_retained: the searches the line carries;
  • searches_may_have_expired: true when none of the rollout's searches is retained, or the first retained one is within a day of retained_since, so earlier ones may be gone;
  • steps_truncated, above, and note, the same in a sentence.

Delete outcomes​

curl -s -X DELETE \
"https://api.jevlin.ai/v1/rollouts/outcome?question_id=fed-march-2026&rollout_id=step-412.r3" \
-H "Authorization: Bearer $JEVLIN_API_KEY"
{"deleted": 1, "question_id": "fed-march-2026", "rollout_id": "step-412.r3"}

Name the outcomes one way, in the query string:

querydeletes
?question_id=…&rollout_id=…One rollout's outcome.
?question_id=…The outcome of every rollout of the question.
?group_id=…The outcome of every rollout in the group, by the rollout's group, under any question.
  • Exactly one of the three. Any other combination, or none, is 400 invalid_request, and an id of the wrong shape is 400 rollout_invalid. A body is not read.
  • The reply is 200 with deleted, the number of live outcomes it removed, and the selector.
  • It removes your own outcomes only, and does not touch the rollouts' searches.
  • The delete is waited for: once it answers, no summary or export returns the outcome.
  • A delete by group takes the outcomes of the rollouts the reads show in that group: one with no group of its own, whose searches name the group, is included; one that names another group is not.

A delete that has answered can still miss an outcome in two windows:

  • A write that timed out may still land. A delete does not wait for your own writes still on their way. An outcome write that timed out or failed on your side may still be stored up to about 130 seconds after it was sent: the store's 120-second wait for a write's flush, and a margin. To be sure such an outcome is gone, delete again after that.
  • An inherited group is not seen until its search is stored. An outcome with no group of its own takes its group from the searches already stored, and the router writes searches in batches: within 2 seconds normally, and at most about 32, longer only while trace writes are failing. Until a search is written, its group is not the rollout's, for the delete and the reads alike, so the two always agree. To be sure an outcome that inherits a new group is gone, delete by that group again once 32 seconds have passed since that search was answered.

A project's deletes run one at a time, because each is a slow operation on the store. Each refusal below is 503 rollouts_store_failed; honor its Retry-After:

  • while another of your deletes is running, Retry-After: 10;
  • for a minute after one failed without an answer, since it may still be running, the rest of that minute;
  • a delete that itself times out, or loses the store's answer, Retry-After: 60;
  • past the few projects' deletes that run at once, Retry-After: 10.

Like the write, a delete spends nothing, counts against the request rate, and is refused while the platform is paused. It answers whatever the project's retention.

Retention​

  • Searches, and so the export's steps, are kept as long as traces: 30 days, less where the project's own retention is shorter.
  • Outcomes are kept for the same period, counted from their last write. An outcome written after its rollout's searches outlives them by that much, and a rewrite starts the count again. The reply's expires_at says when.
  • Sooner when deleted: with DELETE /v1/rollouts/outcome, or with the project. When a project is deleted, or the account that owns it is closed, its outcomes are removed with it. A write on its way at that moment is either refused, with the 401 bad_key its key now gets, or removed with the rest.

Read a rollout back while its searches are kept. After that, its line carries its outcome and no searches.

Nothing of a rollout is kept for a project that keeps no search content; see Who can use them.

Scopes and spend​

callscopespend-free
rollout on POST /v1/search or /v1/search/streamsearchno: the search is billed as usual
POST /v1/rollouts/outcomesearchyes
DELETE /v1/rollouts/outcomesearchyes
GET /v1/rollouts/summaryreadyes
GET /v1/rollouts/exportreadyes

A key with no scopes may make every call, and a call outside a key's scopes is 403 scope; see Key scopes. A spend-free route works when the project is out of credit or at its spend ceiling. Every one of them counts against the request rate. The two reads still answer while the platform is paused; the write and the delete do not.

Errors​

codestatusmeaning
rollout_invalid400A search's rollout is not an object of question_id, rollout_id and an optional group_id, each 1 to 128 of [A-Za-z0-9._:-]; or an outcome's ids, a read's id filter or a delete's selector are not of that shape. Never dropped, unlike trace.
outcome_invalid400POST /v1/rollouts/outcome: answer or outcome missing (null is a value) or over 16 KiB as compact JSON, reward not a number, resolved_at not RFC 3339 with a zone or outside 1900 to 2299, or a field the route does not take.
invalid_request400A delete that names no outcomes, or names them two ways. On the reads and the delete, a parameter the route does not take or one given twice, or a query string that does not parse; on the reads, a time that is not RFC 3339 or a cursor the route did not issue.
rollouts_require_retention403The project keeps no search content, so it keeps no rollouts. The outcome write, the summary and the export refuse it; the delete never does. Final.
outcome_quota_exceeded429The project has written its 64 MiB of outcomes for this UTC day. Send the write again after Retry-After, at midnight UTC.
rollouts_store_failed503The store failed a read or a write this time, is not ready yet, or is still running one of your deletes. Send the same request again after Retry-After. Partway through an export, it is the end line's error.code instead.
rollouts_unavailable503This router keeps no rollouts: it has no store for them, or holds outcomes in memory only and has no room for another. Final.

The rest, such as the 401s, 403 scope, the rate limits and 503 paused, are as for any call; see Errors.