Agents SDK now supports Pi 1.6 with tools that wait without keeping your agent awake
changelog / AI / Agents / 2026/11/20 09:00 JST
Cloudflare の Agents SDK v0.34.0 が Pi 1.6 に対応し、エージェントのツールが「待つ」ことができるようになった。ツールは結果の代わりに park を返すことで、人の承認や期限、別セッションからの入力を待ちながら Durable Object を休眠させられる。待機中は呼び出しを保持しないためコストがかからず、シグナルが届くか期限が来ると再実行される。新しい harness.signal() でシグナルを送り、submit() / continue() の notify で別セッションの入力確定時に起床させることも可能だ。beforeTool フックで承認ゲートとして使うこともできる。さらに既存の会話履歴からセッションを開始できるようになり、ルートセッションは初回利用時に作られる。長時間の人の判断を挟むエージェントや、複数セッションが連携するワークフローを作る開発者にとって、待機コストと承認フローの両面で実用的な前進だ。
出典サイトで原文を開く → 出典サイトの説明: Agents SDK v0.34.0 adds Pi 1.6, so a Pi tool can wait for a person, a deadline, or another session while the Durable Object hibernates, and a Pi session can start from an existing history.
Agents SDK v0.34.0 upgrades PiHarness to Pi 1.6 ↗︎ . A Pi tool can now wait for a person, a deadline, or another session without keeping the Durable Object awake, and a session can start from a history that your application already has. Tools that wait Park until a signal or a deadline. A tool can return a park instead of a result, and Pi runs it again when a signal arrives or the deadline passes. While it waits, the call holds no invocation, so the Durable Object can hibernate. Deliver signals with the new harness.signal() . Refer to Tools that wait . Wait for a subagent. submit() and continue() take notify , so a parked tool wakes when another session’s input settles. Refer to Wait for a subagent . Approval gates. A beforeTool hook can park a tool call before it runs, for example until a person approves it. Session updates Start a session from an existing history. harness.root() , sessions.create() , and sessions.fork() take Pi’s init , which writes messages into the transcript in the commit that creates the session. The root session is now created on its first use, so harness.root() can seed it. Refer to Seed a session with an existing history . Keep queued input across an abort
出典: 公式ページ