# Report on a run

Have the Veryfront Agent read a [run](/docs/concepts/runs.md) and tell you what ran, what it cost and what went wrong, or export the run as a JSON file.

## Before you start

You need a run. Find it with [Find a run that failed](/docs/observability/runs.md).

## Analyze a run

**Studio**

1. In your project, open **Orchestration** > **Runs**.
2. Click **Open** on the run.
3. Open the run's **Actions** menu.
4. Click **Analyze this run**. Studio opens a chat in which the Veryfront Agent reads the run.
5. Wait for the reply. You should now see its breakdown of what ran, the problems it found and the next steps.

**Copy analysis prompt** in the same menu copies the prompt, to use with another assistant.

## Create a report

**Studio**

1. Open the run's **Actions** menu.
2. Click **Create report**. The Veryfront Agent writes it in a chat.
3. Wait for the reply. You should now see the report's link, its verdict and findings.

## Export a run

**Studio**

1. Open the run's **Actions** menu.
2. Click **Export JSON**. You should now see a file named like `run-0b8e1c52-6f3a-4d2e-9b1a-7c4e2f8d1a90-20261112-081530.json` (the run's ID, then the UTC date and time), the run as the API returns it, in your downloads.

**Copy JSON** in the same menu copies it instead.

**API**

1. Set `RUN_ID` to the run's ID ([Find your IDs](/docs/authentication/api-keys.md#find-your-ids)): `export RUN_ID=<id>`.
2. Save the run with your [API key](/docs/authentication/api-keys.md):

```bash
curl https://api.veryfront.com/runs/$RUN_ID \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -o run-$RUN_ID.json
```

3. Open `run-$RUN_ID.json`. You should now see the run's `status`, `input` and `output`.

### Try it in a sandbox

```playground
step: Before you start: a task | curl -fsS -X PUT https://api.veryfront.com/projects/$VERYFRONT_PROJECT_REFERENCE/files/tasks%2Fword-count.ts -H "Authorization: Bearer $VERYFRONT_API_KEY" -H "Content-Type: application/json" -d '{"content":"export default { name: \"word-count\", async run({ input }) { return { words: String(input.text).trim().split(/\\s+/).length }; } };"}'
step: Before you start: run it | curl -fsS -X POST https://api.veryfront.com/runs -H "Authorization: Bearer $VERYFRONT_API_KEY" -H "Content-Type: application/json" -d '{"project_id":"'$VERYFRONT_PROJECT_ID'","target":{"type":"task","id":"word-count"},"input":{"text":"Veryfront runs agents, tasks and workflows"}}' | tee run.json
step: Set RUN_ID | export RUN_ID=$(jq -r .id run.json)
step: Before you start: wait until it is completed | for i in $(seq 40); do curl -s https://api.veryfront.com/runs/$RUN_ID -H "Authorization: Bearer $VERYFRONT_API_KEY" | jq -r .status | grep -qE 'completed|failed|cancelled' && break; sleep 2; done
step: Save the run | curl https://api.veryfront.com/runs/$RUN_ID -H "Authorization: Bearer $VERYFRONT_API_KEY" -o run-$RUN_ID.json
check: jq '{status, input, output}' run-$RUN_ID.json
expect: "words": 6
```

Unlike **Export JSON**, the file keeps the values the run's tool calls wrote, such as an environment variable's. Keep it private.

## With MCP

1. Call `veryfront__get_run` with the run's `run_id`.
2. It worked when the answer holds the run's `status`, `input`, `output` and `usage`. Export JSON saves the same record with the values its tool calls wrote masked.

## Next steps

* [Debug a run](/docs/observability/debug.md)
* [Ask the Veryfront Agent](/docs/agents/veryfront-agent.md)
