Skip to main content

Install

Import

The TypeScript SDK ships as a dual CJS/ESM package.

Initialize

Options

Environment Variable


Sandbox Mode

Use sandbox mode during development to test your agent logic without executing real actions on GitHub, Stripe, Slack, or any other connector.

Setup

  1. Go to Dashboard → Settings → API Keys and create a new key with Sandbox enabled. Your key will have the prefix ar_test_.
  2. Set your environment variable:
  1. Use the SDK exactly as you would in production — no code changes needed:
Sandbox sessions appear in your dashboard under the Sandbox filter tab, clearly marked with a “Simulated” badge. Switch to your ar_live_ key when you are ready for production — no other code changes needed.
rollbackSession() (Python: rollback_session()) in sandbox mode converts actions whose status is SUCCESS or PENDING_APPROVAL to ROLLED_BACK; FAILED and ROLLBACK_FAILED actions are left untouched. No real compensation runs. A session with no SUCCESS action cannot be rolled back; the request is rejected.
The Python SDK (v1) is synchronous and supports sync connector clients only (Stripe, PyGithub, slack_sdk, simple-salesforce, and similar) — there is no await anywhere in the Python SDK.