AI で今週の売上が変わった理由を説明する

エージェントが 2 週間分の指標を取得し、実際のコマンドで増減を計算して、考えられる要因を注意点とともに説明します。

  • 読み取り専用の接続
  • シェル
  • 予算の上限

実際の実行を見る

2026年10月7日 の実際の実行を再生しています。モデル: openai/gpt-6-luna。

入力
{
  "period": "last_week"
}
成功run_9550d4a9f62feef78ceb948d1c55da88$0.05 のうち $0.004644
  1. 待機中予算 $0.05 を確保
  2. MicroVMmicroVM ready
  3. MicroVMworker started · shell on · web off
  4. 接続analytics GET /metrics?period=last_week
  5. 結果analytics GET → 200
  6. シェル$ python3 - <<'PY' from decimal import Decimal metrics={ 'Signups':(294,196,0), 'Active users':(280…
  7. MicroVMmicroVM destroyed
  8. 成功モデル呼び出し 3 回、トークン 6,404記録された出力(英語)

    Revenue fell $546.85 (2.34%) in 2026-W40 vs. 2026-W39

    MetricCurrentPreviousChange
    Signups294196+98 (+50.00%)
    Active users2,8032,521+282 (+11.19%)
    Revenue$22,853.85$23,400.70−$546.85 (−2.34%)
    Churned accounts880 (0.00%)

    Likely drivers

    • Signups and active users rose while revenue fell; this may mean user growth did not translate into higher revenue during the week.
    • Churned accounts were unchanged as revenue declined; the revenue drop may not be reflected in this churn count.

    What this data cannot tell us

    • It does not explain why revenue changed or show revenue per user, signup conversion, or churn rates.
  9. ワーカーを破棄$0.004644 を請求、$0.045356 を解放
モデル $0.000644 · Web $0.00 · コンピュート $0.004

自分で実行する

リクエスト全体が入力された状態で、サンプルをプレイグラウンドで開きます。実行はご自身のアカウントで、表示された予算の範囲内で、同じ読み取り専用のサンプルシステムに対して行われます。

このサンプルの予算: $0.05

仕組み

モデルは算術が得意ではないため、シェルをオンにしています。エージェントはすべての差分と割合を、頭の中ではなくサンドボックスで計算します。そのうえで、登録数、アクティブユーザー、解約の動きを売上に結びつけ、データからは分からないことも示します。

エージェントにできること、できないこと

権限はリクエストの一部です。ここに挙げていないものは、実行では利用できません。

設定許可
接続
analytics: GET のみ、ephemer.al/api/samples/analytics-api へ
Webオフ
シェルオン(隔離されたマシンの内部)
ファイルなし
ゼロデータ保持オフ: 記録は 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
リクエスト本文の全体 request.json

同じ本文を、ファイルをインラインにした形で示します。

request.json
{
  "prompt": "Explain how revenue changed in input.period. Call GET /metrics?period=<input.period> on the analytics connection. Use the shell to calculate the absolute and percentage change of each metric against the previous week; do not do arithmetic in your head. Reply in Markdown, at most 180 words: a headline with the revenue change in dollars and percent, a table of the four metrics with current, previous and change, then 'Likely drivers' (two bullets that link the metrics, worded as hypotheses) and 'What this data cannot tell us' (one bullet). Use only what the data returns and never guess; if a call fails or a field is missing, say so.",
  "input": {
    "period": "last_week"
  },
  "connections": {
    "analytics": {
      "type": "http",
      "url": "https://ephemer.al/api/samples/analytics-api",
      "auth": {
        "type": "bearer",
        "token": "sample_read_key"
      },
      "allowed_methods": [
        "GET"
      ],
      "instructions": "GET /metrics?period=last_week or period=2026-W40 returns signups, active_users, revenue_cents and churned_accounts for that ISO week, with the same figures for the week before. Amounts are in cents."
    }
  },
  "shell": true,
  "timeout_seconds": 120,
  "max_cost_micros": 50000
}

さらに読む

関連するサンプル

esc

「」に一致する項目はありません。