Skip to main content
A deliverable is a file an agent produces for you, such as a report, a CSV, or a patch. Agents already know where to save deliverables, so you only need to ask for a named file. At the end of each turn, the files in the deliverables folder are kept with the session, so you and later sessions can use them.
To start sessions, you need the Developer or Admin role in the organization. See Organizations and roles. Every session runs in an environment’s sandbox. See Environments.

Ask for a deliverable

Name the file and its format in the task, and say what it must contain. This session asks for a CSV and a short summary.
  1. In the sidebar, click Sessions, then click Launch session.
  2. Choose the Agent and Environment.
  3. In Opening message, describe the task and name the deliverables.
  4. Click Launch session.
The API answers 202 Accepted:
In the transcript, the agent’s write_artifact call answers with the path and “it is captured as a session output when this turn ends”. A call that includes metadata answers that the file was stored as a session output instead. When the session finishes, download the deliverables.
Keep scratch work out of the deliverables folder. Everything in it is kept, so intermediate files there clutter the result and count toward the per-turn limits.

Label deliverables with metadata

An agent can attach key/value metadata when it calls write_artifact, for example {"kind": "report", "ticket": "OPS-12"}. The metadata is stored on the deliverable’s file, returned as metadata beside path when you list or get the file, and shown under Metadata in the file preview. Ask for it in the task: “Save summary.md with metadata kind set to summary and quarter set to Q3.” Later sessions of the same agent can find deliverables by their metadata when the agent has File history on. See Agent file history.
  • A write that includes metadata is kept at once rather than at the end of the turn, so it doesn’t count toward the per-turn limits.
  • A write that includes metadata replaces the deliverable’s earlier metadata, and {} clears it. A write that leaves it out keeps it.
  • The metadata stays when the file is changed later by another tool or command.
  • The rules are the same as for uploaded files: at most 32 keys, each up to 64 characters of letters, digits, _, ., and -, and at most 64 KiB of JSON in total. The path key is reserved.

Show images inline

Ask the agent to share a chart or screenshot: “Plot weekly signups and share the chart.” The agent saves the image under /workspace and calls share_file.
  1. In the sidebar, click Sessions, then open the session.
  2. Find the share_file row in the transcript and click the thumbnail.
The image opens at full size, with its caption and path, and you can page through every image in the session.
In the console, the transcript row for a shared image shows a thumbnail. Through the API, the artifact event carries the caption and the image.
A signed url is omitted when none can be issued for that read. The image is always available through the authenticated session image endpoint, GET /managed-agents/v1/sessions/{sessionId}/images, with the image block’s uri as the uri query parameter.

Download deliverables

Every kept deliverable is a file in your organization’s library with source: "session_output", listed under the root session, including deliverables that subagents and teammates saved. Open the session and choose the Files tab in the side panel. Outputs shows each deliverable with its path under the deliverables folder. Click it to preview it, and download it from the preview. Through the API, list a session’s deliverables with listFiles and scope_session_id, then download each with getFileContent. See Download session deliverables. Each output keeps its path under the deliverables folder, such as reports/q3.md. Saving to the same path again replaces the earlier version at the end of the turn, or at once when the write_artifact call includes metadata.

Where work happens

Files outside the deliverables folder stay in the session workspace for later turns when it reopens, but aren’t saved separately as deliverables or shown in the Files tab. Deleting the session removes access to its workspace.
Agents use these tools on their own. You can also name them in prompts.write_artifact takes text. For a binary deliverable, such as a PDF or a spreadsheet, the agent creates the file with a command and saves it anywhere under /workspace/.managed-agents/outputs. Files placed there by any tool are kept the same way.

What gets kept

At the end of each turn, once the agent stops and nothing is queued, the deliverables folder is checked and every new or changed file is kept. A file that can’t be kept is reported as a warning; the session keeps running.
  • Changes. A file saved again under the same path replaces the earlier version. A file that hasn’t changed isn’t kept twice.
  • Children. Subagents and teammates share the root’s sandbox, so their deliverables count as the root session’s deliverables.
  • Problems are reported, not fatal. A file that can’t be kept adds a session_status event with event_status warning, the code session_output_degraded, and a message naming the file. The session keeps running. A file refused once is not reported again until it changes.
  • Earlier versions survive a bad rewrite. If a kept file is later emptied, grows past the size limit, or becomes unreadable, the earlier kept version stays.

Limits

One deliverable can be at most 1 GiB on managed computes or 64 MiB on self-hosted workers. Each turn keeps at most 200 files and normally 512 MiB. A single file over the turn byte budget can still be kept as the first file of that turn. Files that wait for a later turn are kept only if the session has one.
A session also has an overall image budget, shared by every tool that returns images, of 500 images and 100 MiB. See Limits.

What can go wrong

The most common problems:
  • A deliverable is missing from the Files tab. It was saved outside the deliverables folder. Ask for it by name as a deliverable, or save it under /workspace/.managed-agents/outputs.
  • session_output_degraded warning about the per-file limit. A deliverable exceeds the limit for its compute provider. Split or compress the file.
  • share_file fails with “supports PNG, JPEG, and WebP images”. The file is another format, such as SVG or PDF. Ask the agent to render a PNG first.

Next steps

Files

Attach input files and download session outputs.

Referenced sessions

Read an earlier session’s deliverables from a new one.

Teams

Have several agents produce parts of one deliverable.

Research team tutorial

A team session that ends in a report.