API sandboxes for
testing and training AI agents

Run stateful sandboxes for 28 third-party APIs. Test agent workflows, simulate failures, and train agents without production accounts or mocks.

$ npx @deploybaseline/cli
Read the docs

28 supported APIs

The APIs your agents use,
ready for testing

Stateful emulators for payments, CRM, accounting, messaging, and more. Tested with official SDKs and checked against published API specs where available.

Explore API coverage
5 in payments SDK tested

Stripe

141 routes

Supported functionality

Customers, Payment and Setup Intents, charges, refunds, subscriptions, invoices, Checkout, Connect, webhooks

Tested with

  • SDK stripe
$ npx @deploybaseline/cli start --service stripe
Stripe setup, seed config, and limits

Stateful environments

Test complete workflows,
not just API calls

Every request can change the sandbox's state. Agents can create, update, and retrieve records across multiple steps. OAuth, webhooks, and hosted flows work locally too.

Stripe checked against Stripe's OpenAPI
~/app (zsh)
$ curl -u sk_test_123: localhost:4009/v1/customers \
    -d email=ada@example.com -d name="Ada Lovelace"
{
  "id": "cus_EBr09ShO0TveghuW",
  "object": "customer",
  "email": "ada@example.com",
  "name": "Ada Lovelace",
  "livemode": false
}

$ curl -u sk_test_123: localhost:4009/v1/payment_intents \
    -d amount=2000 -d currency=usd -d "payment_method_types[]=card"
{
  "id": "pi_2xyXDzK4R5iFXfLg",
  "object": "payment_intent",
  "amount": 2000,
  "client_secret": "pi_2xyXDzK4R5iFXfLg_secret_P7tM...",
  "status": "requires_payment_method"
}

$ curl -u sk_test_123: localhost:4009/v1/customers
{ "object": "list", "data": [ { "id": "cus_EBr09ShO0TveghuW", ... } ] }
providers
28
payments, auth, email, messaging, CRM, ERP
default set
11
ready on fixed ports
routes
2,728
supported and tested
spec checked
13
validated against OpenAPI specs

Repeatable testing

Run the same scenarios,
as often as you need

Seed realistic data, simulate API failures, and reset environments between runs. Test changes to your agents against the same starting conditions.

State and snapshots
$ npx @deploybaseline/cli
baseline

  github     http://localhost:4001
  google     http://localhost:4002
  slack      http://localhost:4003
  apple      http://localhost:4004
  microsoft  http://localhost:4005
  okta       http://localhost:4006
  resend     http://localhost:4008
  stripe     http://localhost:4009
  clerk      http://localhost:4010
  linear     http://localhost:4011
  twilio     http://localhost:4012

  API reference: http://localhost:3999/docs  (every service above)

  Control API: http://localhost:3999/_baseline/control  (also on any service port)
    Token: W7f_nW_UTAtbvfnv6NldeGCMYNaVoWeb  (header X-Baseline-Control-Token)
    Inspector: http://localhost:3999/_baseline/control/inspector?token=...  (faults, state, snapshots)

  Ready.

Step 01

Start your sandboxes

Start 11 providers with one command. No accounts or credentials required.

Step 02

Connect your agent

Point your SDK at localhost. Keep your existing API calls and workflows.

Step 03

Test and repeat

Seed data, inject failures, and restore snapshots to rerun scenarios.

Custom emulators

Build sandboxes for
any other API

Emulate internal services, partner APIs, or providers we don't support yet. Build in TypeScript and run alongside existing sandboxes.

emulators/acme.ts
import { defineEmulator } from "@deploybaseline/cli";

export default defineEmulator({
  name: "acme",
  state: () => ({ anvils: 100 }),
  setup({ app, state }) {
    app.get("/inventory", (c) => c.json(state));
    app.post("/orders", (c) => {
      if (!state.anvils) return c.json({ error: "sold_out" }, 409);
      state.anvils -= 1;
      return c.json({ shipped: "anvil", to: "coyote" }, 201);
    });
  },
});

Custom emulators

Build stateful HTTP emulators with seeding, snapshots, and resets.

Custom emulators

Provider packages

Install additional emulators from npm with pinned versions.

Provider packages

Programmatic API

Start sandboxes from your test runner with createEmulator, then reset, snapshot, and close them per test.

Programmatic API

Local development and CI

Run anywhere,
without production access

Run locally, in CI, or inside agent sandboxes. State stays in memory by default, with optional persistence to JSON, SQLite, or libSQL.

Isolated by default

Binds to 127.0.0.1 unless explicitly exposed.

Controlled access

Control API changes require a per-process token.

Works offline

Cache providers once, then run with --offline.

Start testing agents with Baseline

One command starts 11 API sandboxes. Requires Node 24+.

$ npx @deploybaseline/cli
Read the docs