Agent · intermediate
タスク完了の確認
tool の結果と最終状態から Agent の完了主張を確認します。
noulchoice
使用する場面
- Agent QA
- Stop hooks
- Workflow verification
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"
}
}判断の質問
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
期待される出力
A completion probability grounded in evidence plus an operational review route.
TypeScript
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",
}),
},
});この設計の理由
- 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.
注意点
- The verifier can only judge evidence you actually include.
- For high-impact actions, pair semantic verification with deterministic postconditions.
公式ソース
2026-09-21
次のステップ: Jev Playground、テンプレート。