Skip to main content
Version: 1.0.11

Code interpreter and datasets

Agents don't just talk — they can run code to analyze your data, transform files, and produce results. This page explains how an agent delegates analysis to a coder that runs in your execution environment, the per-conversation workspace where files live, and how results become datasets that the chat can preview as tables and charts.

How agents run code

When an agent needs to compute something — query a connected database, crunch numbers, generate a file — it doesn't write code snippet by snippet. Instead, it hands the whole job to a coder: a spec-driven coding assistant that runs inside the agent's execution environment. The agent describes the analysis it wants — the objective, the inputs, and what outputs to produce — and the coder writes and runs the Python and shell commands to deliver it. This all happens in your own AWS account, so your data and computations stay inside your boundary.

The coder can read documents you've attached, fetch data from the agent's data connectors (so it can pull from your databases, APIs, and other sources directly), run code over what it retrieves, and register durable results back to the conversation. You don't write any of this code yourself — you ask in plain language, and the agent decides when to delegate work to the coder.

While the coder is working, the chat shows a live Coder working panel that streams its progress as it reads inputs, runs code, and produces results.

For the technical detail of how execution is sandboxed and isolated, see How agents run code.

The conversation workspace

Each conversation gets its own isolated workspace — a working folder for files the agent creates or reads while it works (data extracts, generated charts, exports, intermediate results). The workspace:

  • Is per conversation, so one conversation's files don't bleed into another.
  • Is stored in your own account, and the files persist so you can view and download them.
  • Is private to you — workspaces are scoped to the user who owns the conversation.

You can browse a conversation's workspace from the Workspace view in chat (see Chat), which lists files with their sizes and lets you download them. While the agent is actively working, the workspace updates live.

Datasets: results without dumping rows

When the coder produces a tabular result — say, the output of a database query or an analysis — it registers that result as a dataset rather than pasting every row into the conversation. A dataset is a reference to the full data (kept in your workspace storage) plus a small amount of metadata: a meaningful name and description (its source, grain, and units), the columns, the row and column counts, and a few preview rows. Charts and reports are registered as durable artifacts in the same way.

This matters for two reasons:

  • The chat stays readable. Instead of a wall of raw rows, you see a compact preview, a sortable grid, or a chart.
  • Full data is preserved. The complete result stays in your account and can be paged through or charted on demand, without forcing the entire table through the model.

Registered datasets remain available for the whole conversation — including after you leave and come back to it later. When you return, the agent can list the datasets it registered earlier, reload one, and modify it, instead of regenerating the data from scratch. There is no fixed expiry. If you need a result outside the conversation, download it from the workspace.

Datasets are tracked by a stable dataset ID, and the platform resolves the underlying file for you. So when an agent shows a table or chart — or reuses an earlier dataset to build a new one — it refers to the dataset by its ID and the correct data is loaded automatically. This keeps grids and charts pointing at the right data reliably, even across turns, after you leave and return, and between workflow steps.

Previews, grids, and charts

In the chat, a registered dataset appears as a reference chip showing its name, description, and shape (row and column counts). From that reference the chat can render results in compact, interactive forms:

  • Preview — the first few rows, so you can see the shape of the result at a glance.
  • Grid — a paginated table you can scroll through; rows are fetched on demand from the full dataset.
  • Chart — a visualization built from specific columns of the dataset. A single chart can combine multiple datasets and series.

Because these are drawn from the dataset reference, you can explore a large result inline without the conversation becoming unwieldy.

Charting series with very different ranges

When several series on one chart span very different magnitudes — for example, a stock's price near $200 alongside its trading volume in the tens of millions — the chart automatically moves the mismatched series onto a secondary (right-hand) Y axis so neither is flattened. This dual-axis handling is applied for you when you don't pin the axes yourself. For especially diverse data you can still ask the agent to split it into multiple charts (for instance, grouping series with similar ranges).

Datasets across workflow steps

In a workflow, each step runs with its own workspace, so steps don't automatically share files. When a later step needs a dataset that an earlier step produced, the data is loaded into the later step's workspace from the shared storage — letting results flow from one step to the next even though the steps run separately. See Datasets and data flow for how this works.