Explica con IA por qué cambiaron los ingresos esta semana
Un agente obtiene dos semanas de métricas, calcula las variaciones con comandos reales y explica los factores probables, con salvedades.
- Conexión de solo lectura
- Shell
- Límite de presupuesto
Mira una ejecución real
Una ejecución real del 7 oct 2026, reproducida. Modelo: openai/gpt-6-luna.
{
"period": "last_week"
}- En colapresupuesto de $0.05 reservado
- MicroVMmicroVM ready
- MicroVMworker started · shell on · web off
- Conexiónanalytics 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
- Completada3 llamadas al modelo, 6,404 tokensResultado grabado (en 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 destruido$0.004644 cobrados, $0.045356 liberados
Ejecútalo tú mismo
Abre el ejemplo en el playground con la solicitud completa ya rellenada. Se ejecuta en tu propia cuenta, dentro del presupuesto indicado, contra los mismos sistemas de ejemplo de solo lectura.
Presupuesto de este ejemplo: $0.05
Cómo funciona
Los modelos son malos en aritmética, así que el shell está activado: el agente calcula cada diferencia y porcentaje en el sandbox en lugar de hacerlo de cabeza. Después relaciona los movimientos (registros, usuarios activos, bajas) con los ingresos y dice lo que los datos no pueden mostrar.
Lo que el agente puede y no puede hacer
Los permisos forman parte de la solicitud. Todo lo que no figura aquí no está disponible para la ejecución.
| Ajuste | Permitido |
|---|---|
| Conexiones | analytics: solo GET, en ephemer.al/api/samples/analytics-api |
| Web | Desactivado |
| Shell | Activado, dentro de la máquina sellada |
| Archivos | Ninguna |
| Retención cero de datos | Desactivada: el registro se conserva 30 días |
| Presupuesto | $0.05, límite estricto |
| Tiempo límite | 120 segundos |
Las credenciales nunca entran en la máquina: un broker las añade a cada llamada y aplica los métodos indicados arriba.
El código
Esta es la solicitud exacta que envía el ejemplo. Define EPHEMERAL_API_KEY con una clave de miembro de tu organización.
curl -X POST $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d @request.jsonCuerpo completo de la solicitud request.json
El mismo cuerpo, con los archivos en línea.
{
"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
}