agents · intermediate
Task Completion
Verify an agent's claim of completion against tool evidence and the observed final state.
noulchoice
When to use it
- Agent QA
- Stop hooks
- Workflow verification
Example state
{
"requested_task": "Update the account plan to Pro.",
"assistant_claim": "Done — the account is now on Pro.",
"tool_events": [
{
"tool": "update_plan",
"status": "error",
"detail": "permission denied"
}
],
"final_observed_state": {
"plan": "Starter"
}
}Decision questions
noultask_complete
Does tool evidence and the final observed state establish that the requested task was actually completed? The assistant's claim alone is not evidence.
choicereview_route
Choose the next review route.
close— Evidence establishes completionretry— The task is incomplete but can be retried safelydebug— Execution failed or evidence contradicts completionhuman_review— The evidence or authorization boundary needs a person
Expected structured output
A completion probability grounded in evidence plus an operational review route.
TypeScript example
import { choice, noul, TypeSafeClient } from "@typesafe-ai/sdk";
const client = new TypeSafeClient();
const result = await client.systemOne({
state: {
requested_task: "Update the account plan to Pro.",
assistant_claim: "Done — the account is now on Pro.",
tool_events: [
{ tool: "update_plan", status: "error", detail: "permission denied" },
],
final_observed_state: { plan: "Starter" },
},
questions: {
task_complete: noul(
"Does tool evidence and the final state establish actual completion? The assistant's claim alone is not evidence."
),
review_route: choice("Choose the next review route.", {
close: "Evidence establishes completion",
retry: "Incomplete but safe to retry",
debug: "Execution failed or contradicts completion",
human_review: "Needs human review",
}),
},
});Why this design works
- The state contains claims and independent evidence as separate fields.
- The completion question explicitly gives tool evidence higher authority than self-report.
- The review route gives the surrounding program a bounded next step.
Limits and boundaries
- The verifier can only judge evidence you actually include.
- For high-impact actions, pair semantic verification with deterministic postconditions.
Sources and inspiration
Continue
Browse all templates, learn the official SDK shape, or estimate production volume with the cost calculator.