KI-Analyse fehlgeschlagener Zahlungen: Warum ist diese Zahlung gescheitert?
Ein Agent liest eine Zahlung, ihre Versuche und die Statusseite des Zahlungsanbieters und erklärt dann Ihrem Support-Team die Ursache und den nächsten Schritt.
- Dateien
- Schreibgeschützte Verbindung
- Web
- Callback
- Budgetlimit
Eine echte Ausführung ansehen
Eine echte Ausführung vom 7. Okt. 2026, erneut abgespielt. Modell: openai/gpt-6-luna.
{
"payment_id": "pay_123"
}- In WarteschlangeBudget $0.04 reserviert
- MicroVMmicroVM ready
- MicroVMworker started · shell off · web on
- Datei
read playbook.md - Verbindungpayments GET /payments/pay_123
- Ergebnis
payments GET → 200 - Verbindungpayments GET /payments/pay_123/attempts
- Ergebnis
payments GET → 200 - MicroVMmicroVM destroyed
- Erfolgreich4 Modellaufrufe, 6,787 TokensAufgezeichnete Ausgabe (Englisch)
Cause: The card issuer declined the payment for insufficient funds.
Evidence:failure_code=insufficient_funds;failure_message=The card issuer declined the charge: insufficient funds.Both attempts failed for the same reason.
Next step: Suggest the customer retry or use another card. - Worker zerstört$0.004055 berechnet, $0.035945 freigegeben
Selbst ausführen
Öffnen Sie das Beispiel im Playground, mit der vollständig ausgefüllten Anfrage. Es läuft in Ihrem eigenen Konto, innerhalb des angezeigten Budgets, gegen dieselben schreibgeschützten Beispielsysteme.
Budget für dieses Beispiel: $0.04
So funktioniert es
Geben Sie ihm eine Zahlungs-ID und ein kurzes Playbook. Er ruft Ihre Payments-API über eine schreibgeschützte Verbindung auf, prüft die Statusseite, wenn der Fehler nach einem Ausfall aussieht, und antwortet in sechs Zeilen. Er kann nichts erstatten oder wiederholen, weil die Verbindung nur GET erlaubt.
Was der Agent tun kann und was nicht
Die Berechtigungen sind Teil der Anfrage. Alles, was hier nicht aufgeführt ist, steht der Ausführung nicht zur Verfügung.
| Einstellung | Erlaubt |
|---|---|
| Verbindungen | payments: nur GET, unter ephemer.al/api/samples/payments-api |
| Web | Nur ephemer.al |
| Shell | Aus |
| Dateien | playbook.md (schreibgeschützt) |
| Null-Datenspeicherung | Aus: Das Protokoll wird 30 Tage lang gespeichert |
| Budget | $0.04, ein festes Limit |
| Timeout | 90 Sekunden |
Zugangsdaten gelangen nie in die Maschine: Ein Broker ergänzt sie bei jedem Aufruf und erzwingt die oben genannten Methoden.
Der Code
Das ist die genaue Anfrage, die das Beispiel sendet. Setzen Sie EPHEMERAL_API_KEY auf einen Mitgliedsschlüssel Ihrer Organisation.
curl -X POST $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d @request.jsonDateien in der Anfrage
Inline übergeben, es wird also nichts vorher hochgeladen. Der Agent sieht jede einzelne als schreibgeschützte Datei.
playbook.md
# Failed payment playbook
You can only read. The payments connection allows GET, and web access is limited to ephemer.al.
1. GET /payments/{payment_id}. Note status, amount, currency, failure_code and failure_message.
2. GET /payments/{payment_id}/attempts. Check whether earlier attempts failed for the same reason.
3. If failure_code is processor_error or timeout, read https://ephemer.al/api/samples/status for incidents around that time.
4. Decide the cause:
- card_declined, insufficient_funds, expired_card: the customer's bank or card. Suggest a retry or another card.
- processor_error, timeout: ours or the processor's. Say whether the status page shows an incident.
- fraud_review: a risk rule held it. Do not suggest bypassing it.
5. Never guess. If a call fails or a field is missing, say so.
Answer in at most six lines: the cause, the evidence (field and value) and the next step for the support agent.
Do not include card numbers or customer email addresses.
Vollständiger Anfragetext request.json
Derselbe Text, mit den Dateien inline.
{
"prompt": "Find out why the payment in input.payment_id failed. Follow playbook.md exactly. Use only what the data returns and never guess; if a call fails or a field is missing, say so.",
"input": {
"payment_id": "pay_123"
},
"files": [
{
"path": "playbook.md",
"content": "# Failed payment playbook\n\nYou can only read. The payments connection allows GET, and web access is limited to ephemer.al.\n\n1. GET /payments/{payment_id}. Note status, amount, currency, failure_code and failure_message.\n2. GET /payments/{payment_id}/attempts. Check whether earlier attempts failed for the same reason.\n3. If failure_code is processor_error or timeout, read https://ephemer.al/api/samples/status for incidents around that time.\n4. Decide the cause:\n - card_declined, insufficient_funds, expired_card: the customer's bank or card. Suggest a retry or another card.\n - processor_error, timeout: ours or the processor's. Say whether the status page shows an incident.\n - fraud_review: a risk rule held it. Do not suggest bypassing it.\n5. Never guess. If a call fails or a field is missing, say so.\n\nAnswer in at most six lines: the cause, the evidence (field and value) and the next step for the support agent.\nDo not include card numbers or customer email addresses.\n"
}
],
"connections": {
"payments": {
"type": "http",
"url": "https://ephemer.al/api/samples/payments-api",
"auth": {
"type": "bearer",
"token": "sample_read_key"
},
"allowed_methods": [
"GET"
],
"instructions": "GET /payments/{id} returns a payment (status, amount in cents, currency, failure_code, failure_message, attempt_count). GET /payments/{id}/attempts returns its attempts."
}
},
"web": {
"allow": [
"ephemer.al"
],
"search": false
},
"shell": false,
"timeout_seconds": 90,
"max_cost_micros": 40000
}