Clean and profile a messy CSV with an AI agent
An agent profiles a CSV with real commands in a sandbox and reports duplicates, missing values, bad formats and outliers.
- Files
- Shell
- Budget cap
Watch a real run
A real run on Oct 7, 2026, replayed. Model: openai/gpt-6-luna.
- Queuedbudget $0.05 reserved
- MicroVMmicroVM ready
- MicroVMworker started · shell on · web off
- File
read orders.csv - Shell
$ python3 - <<'PY' import csv p='/tmp/ephemeral-run-s2TPIy/bundle/orders.csv' with open(p,newline='')… - Shell
$ python3 - <<'PY' import csv,re,datetime,collections p='/tmp/ephemeral-run-s2TPIy/bundle/orders.csv'… - MicroVMmicroVM destroyed
- Succeeded3 model calls, 9,333 tokensRecorded output (English)
Verdict: Found data-quality issues in missing values, duplicates, email, casing, dates, and quantity.
Issue Count Affected data rows Suggested fix Missing customer_email1 3 Populate or explicitly mark unknown. Missing unit_price1 9 Populate or explicitly mark unknown. Duplicate full rows 2 7, 8 Remove one duplicate. Duplicate order_id2 7, 8 Confirm which order is valid; make IDs unique. Invalid email 1 4 Correct the address (e.g., add a valid domain). Inconsistent country casing 1 2 Normalize detoDE.Inconsistent status casing 1 12 Normalize Shippedtoshipped.Date not in YYYY-MM-DDformat1 5 Convert to 2026-09-02.Nonexistent date 1 14 Correct 2026-09-31to the intended valid date.Negative quantity 1 6 Verify and correct the quantity. Extreme quantity outlier ( 1000)1 15 Verify against the source order. - Worker destroyed$0.006427 charged, $0.043573 released
Run it yourself
Open the sample in the playground with the whole request filled in. It runs on your own account, within the budget shown, against the same read-only sample systems.
Budget for this sample: $0.05
How it works
The file is read-only and the sandbox has no network, so the data stays where it is. The agent counts problems with the shell instead of eyeballing them, and lists each issue with row numbers and a suggested fix.
What the agent can and cannot do
The permissions are part of the request. Anything not listed here is not available to the run.
| Setting | Allowed |
|---|---|
| Connections | None |
| Web | Off |
| Shell | On, inside the sealed machine |
| Files | orders.csv (read-only) |
| Zero data retention | Off: the record is kept for 30 days |
| Budget | $0.05, a hard cap |
| Timeout | 120 seconds |
Credentials never enter the machine: a broker adds them to each call and enforces the methods above.
The code
This is the exact request the sample sends. Set EPHEMERAL_API_KEY to a member key of your organization.
curl -X POST $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d @request.jsonFiles in the request
Passed inline, so nothing is uploaded first. The agent sees each one as a read-only file.
orders.csv
order_id,customer_email,country,order_date,quantity,unit_price,status
1001,[email protected],DE,2026-09-01,2,19.90,shipped
1002,[email protected],de,2026-09-01,1,19.90,shipped
1003,,US,2026-09-02,3,9.50,shipped
1004,carla@example,US,2026-09-02,1,49.00,delivered
1005,[email protected],FR,02/09/2026,1,49.00,delivered
1006,[email protected],FR,2026-09-03,-1,19.90,refunded
1007,[email protected],US,2026-09-03,2,9.50,shipped
1007,[email protected],US,2026-09-03,2,9.50,shipped
1008,[email protected],GB,2026-09-04,1,,shipped
1009,[email protected],JP,2026-09-04,5,19.90,delivered
1010,[email protected],DE,2026-09-05,1,19.90,shipped
1011,[email protected],US,2026-09-05,1,9.50,Shipped
1012,[email protected],KR,2026-09-06,1,49.00,delivered
1013,[email protected],US,2026-09-31,2,9.50,shipped
1014,[email protected],DE,2026-09-07,1000,19.90,shipped
1015,[email protected],FR,2026-09-08,1,19.90,delivered
1016,[email protected],GB,2026-09-08,2,49.00,delivered
1017,[email protected],US,2026-09-09,1,9.50,cancelled
1018,[email protected],DE,2026-09-09,1,19.90,delivered
1019,[email protected],US,2026-09-10,2,9.50,shipped
1020,[email protected],JP,2026-09-10,1,49.00,delivered
Full request body request.json
The same body, with the files inline.
{
"prompt": "Profile orders.csv (columns: order_id, customer_email, country, order_date, quantity, unit_price, status). Use the shell (python3, awk, sort, uniq, whatever is installed) to count the problems; do not count by eye. Check duplicate rows and duplicate order_ids, missing values per column, invalid emails, inconsistent country or status casing, dates that are not YYYY-MM-DD or do not exist, negative quantities and extreme outliers. Reply in Markdown, at most 220 words: a one-line verdict, then a table of issue, count, affected row numbers (data rows, header excluded) and a suggested fix. If a check finds nothing, omit it.",
"files": [
{
"path": "orders.csv",
"content": "order_id,customer_email,country,order_date,quantity,unit_price,status\n1001,[email protected],DE,2026-09-01,2,19.90,shipped\n1002,[email protected],de,2026-09-01,1,19.90,shipped\n1003,,US,2026-09-02,3,9.50,shipped\n1004,carla@example,US,2026-09-02,1,49.00,delivered\n1005,[email protected],FR,02/09/2026,1,49.00,delivered\n1006,[email protected],FR,2026-09-03,-1,19.90,refunded\n1007,[email protected],US,2026-09-03,2,9.50,shipped\n1007,[email protected],US,2026-09-03,2,9.50,shipped\n1008,[email protected],GB,2026-09-04,1,,shipped\n1009,[email protected],JP,2026-09-04,5,19.90,delivered\n1010,[email protected],DE,2026-09-05,1,19.90,shipped\n1011,[email protected],US,2026-09-05,1,9.50,Shipped\n1012,[email protected],KR,2026-09-06,1,49.00,delivered\n1013,[email protected],US,2026-09-31,2,9.50,shipped\n1014,[email protected],DE,2026-09-07,1000,19.90,shipped\n1015,[email protected],FR,2026-09-08,1,19.90,delivered\n1016,[email protected],GB,2026-09-08,2,49.00,delivered\n1017,[email protected],US,2026-09-09,1,9.50,cancelled\n1018,[email protected],DE,2026-09-09,1,19.90,delivered\n1019,[email protected],US,2026-09-10,2,9.50,shipped\n1020,[email protected],JP,2026-09-10,1,49.00,delivered\n"
}
],
"web": false,
"shell": true,
"timeout_seconds": 120,
"max_cost_micros": 50000
}