Skip to main content

iCommerce Agent Sandbox Runbook

This runbook provides an end-to-end flow for running the iCommerce agent inside a sandbox.

1) Provision a Sandbox

curl -X POST https://api.sandbox.stateset.app/api/v1/sandbox/create \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"timeout_seconds": 600}'
Save the sandbox_id from the response.

2) Verify Connectivity

curl -X POST https://api.sandbox.stateset.app/api/v1/sandbox/SANDBOX_ID/execute \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command": "stateset \"show me pending orders\""}'

3) Execute Write Actions (Explicit)

curl -X POST https://api.sandbox.stateset.app/api/v1/sandbox/SANDBOX_ID/execute \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command": "stateset --apply \"ship order #12345 with tracking FEDEX123\""}'

4) Capture Outputs

  • Stream output from the execution response
  • Store logs and results for audit trails

5) Stop the Sandbox

curl -X POST https://api.sandbox.stateset.app/api/v1/sandbox/SANDBOX_ID/stop \
  -H "Authorization: ApiKey YOUR_API_KEY"