Skip to main content
GET
Get Scenario History

Overview

Walks the agent’s saved versions, newest first, and returns the scenario node’s saved content at each one, 25 versions per page, alongside the node as currently pinned in staging and production. Works for scenario, complex-scenario, auth, auth-zone, and complex-auth nodes, and for the agent’s hub prompt by passing agent as the node_id. Node content is returned as stored, so older versions may carry fields the editor no longer writes. To read a whole version instead, use Get Latest Agent Version.

Headers

string
required
Your API key for authentication.

Path Parameters

string
required
The agent’s unique identifier. Must be a UUID; otherwise the request returns 400 BAD_REQUEST.
string
required
The scenario node’s id within its flow. 1 to 200 characters and not blank. Pass the literal value agent to read the agent’s hub prompt instead of a scenario; the hub lives in the root flow, so path must be omitted or empty for that value.

Query Parameters

string
An open branch’s ID (UUID). Lists that branch’s own saves followed by the dev version it was cut from. Returns 404 NOT_FOUND if the branch is not open or does not belong to this agent. Omit to read the dev timeline.
string
default:"[]"
JSON-encoded array of container node IDs leading from the root flow to the flow that holds node_id, outermost first, for example ["76c53696-04da-4dfa-be12-ebd286070549"]. At most 10 IDs of 1 to 200 characters each, and the raw string may not exceed 12,500 characters. Omit for a node in the root flow. Malformed values return 400 BAD_REQUEST.
string
Pagination cursor: the next_cursor from the previous page (a version ID). Returns the versions saved before it. A cursor that is not in the requested timeline returns 400 BAD_REQUEST.

Response

array
Up to 25 versions, newest first.
string | null
Pass as before to fetch the next page. null when there are no older versions.
array
Always two entries, one for staging and one for production, independent of the requested page.
null | array
null on success, or a list of error objects if the request failed.

Docs for agents: llms.txt