Agent escalation
Jev answered a noul at 0.55 with confidence 0.1. That is a coin flip; hand it to a person.
import { AmbientClient } from "@ambientprecision/sdk";
const ap = new AmbientClient();
const q = { type: "noul", instructions: "Is this vendor invoice a duplicate of `previous`?" } as const;
const t = await ap.handoff({ state: { invoice, previous }, questions: { dup: q }, machine: { answers: { dup: { noul: 0.55 } } } });
const r = await ap.waitForAnswer(t.ticket, { timeout: 15 * 60_000 });
r.answers.dup; // { noul: 0.1, distribution: { yes: 0.1, no: 0.9 }, confidence: 0.9, source: "human", … }The person never sees 0.55 before locking.