๊ฐ€์ž… ํ›„ ์ดˆ๋Œ€ ๋งํฌ๋ฅผ ๊ณต์œ ํ•˜๋ฉด ๋™์˜์ƒ ์žฌ์ƒ ๋ฐ ์ดˆ๋Œ€ ๋ณด์ƒ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture ๆŠ•็จฟใฏๅ€‹ไบบใฎๆ„่ฆ‹ใงใ™ใ€‚
๊ฐ€์ž… May 2026
258 ํŒ”๋กœ์ž‰ ์ค‘    228 ํŒฌ
# Useful but Little-Known Features of ADK 2.0 ๐ŸŒ What if a long-running agent workflow could pick up right where it left off after a failure, instead of starting over from scratch? ADK 2.0's ResumabilityConfig records workflow execution state as event logs, allowing you to resume from the point of failure by specifying an invocation_id. ๐Ÿ“Œ Title: Workflow Resumption (ResumabilityConfig) ๐Ÿ”— URL: ๐Ÿงฉ Overview Setting ResumabilityConfig(is_resumable=True) on an App causes completed tasks to be logged as events during workflow execution. On failure, you can resume by providing the same invocation_id, and built-in agents automatically restore their state. SequentialAgent resumes from current_sub_agent, LoopAgent preserves times_looped and runs remaining iterations, and ParallelAgent executes only uncompleted sub-agents. This eliminates the waste of re-running completed steps when part of a large pipeline fails. ๐Ÿ›  How to use it Set ResumabilityConfig on the App and pass invocation_id when resuming. ```python from adk import App, ResumabilityConfig app = App( agent=my_workflow, resumability_config=ResumabilityConfig(is_resumable=True) ) # Initial run result = await "process data") invocation_id = result.invocation_id # Resume after failure (same invocation_id) resumed_result = await input="process data", invocation_id=invocation_id ) ``` For custom agents that need resumability, extend BaseAgentState to persist your custom intermediate state. ๐Ÿ— Building it into production ใƒปStore invocation_id in a database or message queue so it can be referenced during retries ใƒปEnsure tool idempotency โ€” tools run at least once and may re-run on resume ใƒปFor custom agents, extend BaseAgentState and explicitly define the intermediate state needed for resumption ใƒปIn long-running workflows, insert checkpoint steps at regular intervals to enable finer-grained resumption ๐Ÿ’ก Use cases ๐Ÿ“Š Efficiently recovering from mid-pipeline failures in large-scale data processing with dozens of steps ๐Ÿ’ฐ Avoiding wasted API billing by not re-calling expensive external APIs on retry ๐Ÿ”„ Improving reliability of long-running agent execution in unstable network environments ๐Ÿญ Continuing batch processing when some items fail, without reprocessing completed ones โš ๏ธ Watch out Tools may re-execute on resume (they run at least once), so any tool with side effects (database writes, external API calls, etc.) must be designed to be idempotent โ€” the same input should always produce the same result regardless of how many times it runs. Also note that ParallelAgent resume granularity is at the sub-agent level; intermediate state within a sub-agent is not preserved. โœจ ResumabilityConfig dramatically simplifies the operation of long-running workflows. The ROI is especially high for pipelines that include expensive or time-consuming steps. #ADK# #AIAgent#
๋” ๋ณด๊ธฐ