Download every trial of a run as a CSV file
export_runGives you one of your finished runs as a file of every trial, as a CSV, and returns a temporary download link. Use this when the user wants the raw data as a file: all the trials of a run to open in a spreadsheet such as Excel or Google Sheets, or to hand to someone. The file has one row per trial: a trial column (counting from 0), then one column per node and period, named like "revenue [p2]" (the node id, then period 2). Every node and every period is included unless you pass nodes or periods to include only some. The values are the exact values drawn in each trial. It returns download_url, expires_at, rows (the trial count) and columns (the header row). The link needs no credential and expires; call again for a fresh one. Only a simulation made with an account (run_monte_carlo_simulation) keeps its trials; for any other run it returns per_trial_not_kept. To read or analyse trials yourself in the conversation, such as how correlated two nodes were across trials, use get_simulation_results with trials instead: this tool is for handing the data over as a file, not for reading it. It reads a run that already happened and never runs the model again. It needs a Neumann account: send your key, or your signed-in token, in the Authorization header as a Bearer credential. No Neumann tool takes an api_key argument. Cost: free -- it debits no credits and spends none of your free daily runs -- but it needs an account; an anonymous caller gets account_required.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"run_id": "<run_id>"
},
"name": "export_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | No | Ids of the nodes to include, one column per node and period. Default: every node. | |
| run_id | Yes | The run to export, as returned by any run tool or list_runs. It must be a run_monte_carlo_simulation run made with an account, the only kind that keeps its trials. | |
| periods | No | Time period indices to include, counting from 0. Default: every period. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | How many rows the file has: one per trial. | |
| run_id | Yes | The run the file is of. | |
| billing | No | Who you are and what this call cost: principal, auth source, credits debited and balance, or the anonymous allowance left today. | |
| columns | Yes | The file's header row, in order: trial, then one name like "revenue [p2]" (node id, then period) per column. | |
| expires_at | Yes | When download_url stops working, as an ISO-8601 time. | |
| download_url | Yes | A temporary web address of the .csv file. It needs no credential. Open it, or give it to the user; it stops working at expires_at, and calling export_run again returns a fresh one. |