The core idea in one sentence: A fast, calibrated model answers routine cases in milliseconds; plain code escalates to a stronger model or a human expert only when the expected cost of a mistake is higher than the cost of a second opinion.
Why route instead of picking one model?
When an agent has to make the same kind of decision thousands of times a day, picking a single model forces an awkward trade-off:
Every decision is recorded with a receipt and later linked to its real outcome. That lets you measure a runtime by what its mistakes actually cost — not just raw accuracy — and improve it from real-world results.
Core concepts at a glance
New to decision runtimes? These breakout cards spell out the six terms you will see throughout AskWithAI.Decision Runtime
One repeated decision your app or agent asks — with its questions, rules, mistake costs, models, versions, and history. For example:
acme/payment-refund.Control plane
The plain code inside a runtime that decides, for each request, whether a second opinion is worth paying for. AskWithAI never asks an LLM whether to escalate.
Mistake cost
What a wrong answer costs you, in dollars, set per kind of mistake. Wrongly approving a $240 refund loses $240; wrongly denying a valid one might cost $15 in goodwill.
Honest confidence (calibration)
Whether a model that says it is “90% sure” is actually right about 90% of the time. AskWithAI measures calibration and blocks overconfident fast models from answering alone.
Receipt
What comes back with every decision: the answer, which tier answered, why it escalated (or did not), how long it took, and what it cost.
Expert Review
The queue of cases that only a person can settle — high-stakes uncertainty, missing facts, or rule disagreements. Each ruling becomes a verified test case.
Where to go next
Quickstart
Install
@askwithai/sdk, make your first decision, and adopt safely with parity, shadow, and active modes.How decisions work
Walk through a real refund example to see the escalation ladder, mistake-cost math, and outcome learning.
SDK, CLI & Decision API
Call your Decision Runtime from TypeScript, your terminal, or any HTTP client.
Connect your agent
Give Claude Code, Cursor, Codex, or Windsurf full AskWithAI skills with a single command.