AI エージェントで乱れた CSV をクリーニングし、内容を分析する
エージェントがサンドボックスで実際のコマンドを使って CSV を分析し、重複、欠損値、不正な形式、外れ値を報告します。
- ファイル
- シェル
- 予算の上限
実際の実行を見る
2026年10月7日 の実際の実行を、本日の料金で再生して価格を計算しています。モデル: openai/gpt-6-luna。
準備完了実行中成功run_a95629e4250a32c985f2bd387bfe25f3予算 $0.05暫定$0.05 のうち $0.011582
- 待機中予算 $0.05 を確保
- MicroVMmicroVM ready
- MicroVMworker started · shell on · web off
- ファイル
read orders.csv - シェル
$ python3 - <<'PY' import csv p='/tmp/ephemeral-run-s2TPIy/bundle/orders.csv' with open(p,newline='')… - シェル
$ python3 - <<'PY' import csv,re,datetime,collections p='/tmp/ephemeral-run-s2TPIy/bundle/orders.csv'… - MicroVMmicroVM destroyed
- 成功モデル呼び出し 3 回、トークン 9,333記録された出力(英語)
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. - ワーカーを破棄$0.011582 を請求、$0.038418 を解放
実行料金 $0.005 · コンピュート $0.0054 · モデル $0.001182 · Web $0.00
自分で実行する
リクエスト全体が入力された状態で、サンプルをプレイグラウンドで開きます。実行はご自身のアカウントで、表示された予算の範囲内で、同じ読み取り専用のサンプルシステムに対して行われます。
このサンプルの予算: $0.05
仕組み
ファイルは読み取り専用で、サンドボックスにはネットワークがないため、データは元の場所から出ません。エージェントは目視ではなくシェルで問題を数え、それぞれの問題を行番号と修正案とともに挙げます。
エージェントにできること、できないこと
権限はリクエストの一部です。ここに挙げていないものは、実行では利用できません。
| 設定 | 許可 |
|---|---|
| 接続 | なし |
| Web | オフ |
| シェル | オン(隔離されたマシンの内部) |
| ファイル | orders.csv(読み取り専用) |
| ゼロデータ保持 | オフ: 記録は 30 日間保存されます |
| 予算 | $0.05、厳格な上限 |
| タイムアウト | 120 秒 |
認証情報がマシンに入ることはありません。ブローカーが各呼び出しに認証情報を付与し、上記のメソッドだけを通します。
コード
サンプルが送信する正確なリクエストです。EPHEMERAL_API_KEY には、組織のメンバーキーを設定してください。
curl -X POST $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d @request.jsonリクエストに含まれるファイル
インラインで渡すため、事前にアップロードする必要はありません。エージェントには、それぞれが読み取り専用のファイルとして見えます。
orders.csv
order_id,customer_email,country,order_date,quantity,unit_price,status
1001,anna@example.com,DE,2026-09-01,2,19.90,shipped
1002,ben@example.com,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,dan@example.com,FR,02/09/2026,1,49.00,delivered
1006,eva@example.com,FR,2026-09-03,-1,19.90,refunded
1007,fay@example.com,US,2026-09-03,2,9.50,shipped
1007,fay@example.com,US,2026-09-03,2,9.50,shipped
1008,gus@example.com,GB,2026-09-04,1,,shipped
1009,hana@example.com,JP,2026-09-04,5,19.90,delivered
1010,ivan@example.com,DE,2026-09-05,1,19.90,shipped
1011,jo@example.com,US,2026-09-05,1,9.50,Shipped
1012,kim@example.com,KR,2026-09-06,1,49.00,delivered
1013,lee@example.com,US,2026-09-31,2,9.50,shipped
1014,mia@example.com,DE,2026-09-07,1000,19.90,shipped
1015,noa@example.com,FR,2026-09-08,1,19.90,delivered
1016,omar@example.com,GB,2026-09-08,2,49.00,delivered
1017,pia@example.com,US,2026-09-09,1,9.50,cancelled
1018,quin@example.com,DE,2026-09-09,1,19.90,delivered
1019,ravi@example.com,US,2026-09-10,2,9.50,shipped
1020,sara@example.com,JP,2026-09-10,1,49.00,delivered
リクエスト本文の全体 request.json
同じ本文を、ファイルをインラインにした形で示します。
{
"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,anna@example.com,DE,2026-09-01,2,19.90,shipped\n1002,ben@example.com,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,dan@example.com,FR,02/09/2026,1,49.00,delivered\n1006,eva@example.com,FR,2026-09-03,-1,19.90,refunded\n1007,fay@example.com,US,2026-09-03,2,9.50,shipped\n1007,fay@example.com,US,2026-09-03,2,9.50,shipped\n1008,gus@example.com,GB,2026-09-04,1,,shipped\n1009,hana@example.com,JP,2026-09-04,5,19.90,delivered\n1010,ivan@example.com,DE,2026-09-05,1,19.90,shipped\n1011,jo@example.com,US,2026-09-05,1,9.50,Shipped\n1012,kim@example.com,KR,2026-09-06,1,49.00,delivered\n1013,lee@example.com,US,2026-09-31,2,9.50,shipped\n1014,mia@example.com,DE,2026-09-07,1000,19.90,shipped\n1015,noa@example.com,FR,2026-09-08,1,19.90,delivered\n1016,omar@example.com,GB,2026-09-08,2,49.00,delivered\n1017,pia@example.com,US,2026-09-09,1,9.50,cancelled\n1018,quin@example.com,DE,2026-09-09,1,19.90,delivered\n1019,ravi@example.com,US,2026-09-10,2,9.50,shipped\n1020,sara@example.com,JP,2026-09-10,1,49.00,delivered\n"
}
],
"web": false,
"shell": true,
"timeout_seconds": 120,
"max_cost_micros": 50000
}