plan_artifact_ids (see Get Session), which lists the latest artifact for each plan, oldest plan first — so the last entry is the most recent plan.
kind is plan or file. Iterations of the same plan share a plan_id; older iterations stay downloadable by their own ID. url is a presigned download link valid for 6 days — fetch it without the Authorization header.
Request
Path parameters
string (uuid)
required
The session the artifact belongs to.
string (uuid)
required
The artifact ID, taken from the session’s
plan_artifact_ids.Response
string (uuid)
Artifact ID.
string
Presigned download URL, valid for 6 days. Fetch it directly, without the
Authorization header.string
Base name of the file, e.g.
plan.md.string
Absolute path of the file inside the agent’s sandbox when it was captured.
number
File size in kilobytes.
string
MIME type the download is served with, e.g.
text/markdown.string
plan for a plan the agent wrote, file for any other captured file.string (uuid) | null
Groups iterations of the same plan.
null when kind is file.string (ISO 8601)
When the artifact was captured.
Download the latest plan
Fetch the session, take the last entry ofplan_artifact_ids, resolve it to a download URL, then fetch the URL. Iterate the array instead of taking the last entry to download every plan.

