Explique com IA por que a receita mudou esta semana

Um agente busca duas semanas de métricas, calcula as variações com comandos reais e explica os prováveis fatores, com ressalvas.

  • Conexão somente leitura
  • Shell
  • Limite de orçamento

Veja uma execução real

Uma execução real em 7 de out. de 2026, reproduzida. Modelo: openai/gpt-6-luna.

Entrada
{
  "period": "last_week"
}
Concluídarun_9550d4a9f62feef78ceb948d1c55da88$0.004644 de $0.05
  1. Na filaorçamento de $0.05 reservado
  2. MicroVMmicroVM ready
  3. MicroVMworker started · shell on · web off
  4. Conexãoanalytics GET /metrics?period=last_week
  5. Resultadoanalytics GET → 200
  6. Shell$ python3 - <<'PY' from decimal import Decimal metrics={ 'Signups':(294,196,0), 'Active users':(280…
  7. MicroVMmicroVM destroyed
  8. Concluída3 chamadas ao modelo, 6,404 tokensSaída gravada (em inglês)

    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. Worker destruído$0.004644 cobrados, $0.045356 liberados
Modelo $0.000644 · Web $0.00 · Computação $0.004

Execute você mesmo

Abra o exemplo no playground com a requisição inteira preenchida. Ele roda na sua própria conta, dentro do orçamento indicado, contra os mesmos sistemas de exemplo somente leitura.

Orçamento deste exemplo: $0.05

Como funciona

Modelos são ruins em aritmética, então o shell está ativado: o agente calcula cada diferença e cada porcentagem no sandbox em vez de de cabeça. Depois relaciona as variações (cadastros, usuários ativos, churn) à receita e diz o que os dados não conseguem mostrar.

O que o agente pode e não pode fazer

As permissões fazem parte da requisição. Tudo o que não está listado aqui não está disponível para a execução.

ConfiguraçãoPermitido
Conexões
analytics: somente GET, em ephemer.al/api/samples/analytics-api
WebDesativado
ShellAtivado, dentro da máquina isolada
ArquivosNenhuma
Retenção zero de dadosDesativada: o registro é mantido por 30 dias
Orçamento$0.05, um limite rígido
Tempo limite120 segundos

As credenciais nunca entram na máquina: um broker as adiciona a cada chamada e aplica os métodos acima.

O código

Esta é a requisição exata que o exemplo envia. Defina EPHEMERAL_API_KEY com uma chave de membro da sua organização.

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
Corpo completo da requisição request.json

O mesmo corpo, com os arquivos inline.

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
}

Saiba mais

Exemplos relacionados

esc

Nada corresponde a “”.