Skip to main content
Get a working Decision Runtime wired into your app or agent in a few minutes. You can start with the TypeScript SDK, the askwithai CLI, or a plain HTTP call to the Decision API.
Using an AI coding agent? You can let Claude Code, Cursor, or Codex set this up for you. See Connect your agent to install the AskWithAI skills with npx skills add https://docs.askwith.ai.

Make your first decision

1

Create an API key

Sign in to the AskWithAI Platform, create a workspace (or start from the Payment Refund template in the guided start), and generate an API key in Settings → API keys.Export it in your shell or .env.local file:
Keep your API key on the server. Never commit it to Git or ship it in client-side browser code.
2

Install the SDK (optional for HTTP)

If you use TypeScript or JavaScript (Node.js 22+), install @askwithai/sdk — it includes both the typed client and the askwithai CLI:
3

Call your Decision Runtime

Ask your runtime for a decision on a sample refund request:
4

Report the real outcome later

Once you know what actually happened (for example, a return was verified or a chargeback arrived), report the outcome back to AskWithAI. Real outcomes become verified test cases that improve future versions of your runtime.

Roll out safely with serving modes

You never have to switch production traffic to routed decisions overnight. Every Decision Runtime supports three serving modes so you can verify behavior before it changes a single live answer.

1. Parity mode

Returns your fast model’s answer unchanged while recording every call and receipt. Zero behavioral change for your users.

2. Shadow mode

Still returns the parity answer to your app, while AskWithAI runs full routing in the background so you can compare what it would have done.

3. Active mode

Serves routed decisions live — fast answers for routine cases, automatic second opinions when expected mistake cost is high.
Switch modes from the Platform or in one command with the CLI: