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.
{
"period": "last_week"
}- Na filaorçamento de $0.05 reservado
- MicroVMmicroVM ready
- MicroVMworker started · shell on · web off
- Conexãoanalytics GET /metrics?period=last_week
- Resultado
analytics GET → 200 - Shell
$ python3 - <<'PY' from decimal import Decimal metrics={ 'Signups':(294,196,0), 'Active users':(280… - MicroVMmicroVM destroyed
- 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
Metric Current Previous Change Signups 294 196 +98 (+50.00%) Active users 2,803 2,521 +282 (+11.19%) Revenue $22,853.85 $23,400.70 −$546.85 (−2.34%) Churned accounts 8 8 0 (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.
- Worker destruído$0.004644 cobrados, $0.045356 liberados
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ção | Permitido |
|---|---|
| Conexões | analytics: somente GET, em ephemer.al/api/samples/analytics-api |
| Web | Desativado |
| Shell | Ativado, dentro da máquina isolada |
| Arquivos | Nenhuma |
| Retenção zero de dados | Desativada: o registro é mantido por 30 dias |
| Orçamento | $0.05, um limite rígido |
| Tempo limite | 120 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.jsonCorpo completo da requisição request.json
O mesmo corpo, com os arquivos inline.
{
"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
}