Testing an AI shopping agent's checkout flow? There's no sandbox for that yet — so I built one
Описание и применение
Создана мок‑среда acp-sandbox для тестирования протоколов агентского коммерческого взаимодействия, позволяющая проверять создание сессий, обработку ошибок и завершение покупок без реальных платежей.
Задача
AI agents that shop need a sandbox to test the full checkout protocol, not just payment. Existing test modes cover payment but lack a fake merchant to validate session creation, idempotency, order parsing, and retries.
Результат
Agents can now validate full checkout flows against a realistic mock merchant, ensuring protocol compliance before live deployment.
Рабочий процесс
- 1. Obtain a test API key via POST /keys with an email.
- 2. Create a checkout session via POST /checkout_sessions with line_items and currency.
- 3. Retrieve, update, or cancel the session as needed using the session ID.
- 4. Complete the session by POSTing any payment_data to /checkout_sessions/{id}/complete.
- 5. Inspect logs via GET /logs to debug agent interactions.
Доказательства
It implements the real checkout_sessions lifecycle from ACP's 2026-04-17 spec: create, retrieve, update, complete, cancel.
Every request/response is logged per API key (GET /logs), so you can see exactly what your agent sent when something doesn't work.
- Дата записи: 2026-09-02T14:27:44.227Z