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

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture ๆŠ•็จฟใฏๅ€‹ไบบใฎๆ„่ฆ‹ใงใ™ใ€‚
๊ฐ€์ž… May 2026
280 ํŒ”๋กœ์ž‰ ์ค‘    415 ํŒฌ
# Useful but Little-Known Features of ADK 2.0 ๐ŸŒ Ever had an AI agent fail mid-workflow because of a transient API hiccup, forcing you to manually re-run everything? ADK 2.0 introduces RetryConfig, a framework-level automatic retry mechanism. Define your retry strategy declaratively โ€” no more manual try-catch blocks scattered throughout your agent code. ๐Ÿ“Œ Title: Automatic Retry (RetryConfig) ๐Ÿ”— URL: ๐Ÿงฉ Overview RetryConfig lets the framework automatically manage retries when transient errors occur during agent or tool execution. By simply specifying max_attempts, you can automate recovery from network timeouts, API rate limits, and other temporary failures. This eliminates the need for developers to implement retry logic individually, dramatically improving agent robustness. ๐Ÿ›  How to use it Just attach a RetryConfig to your agent โ€” automatic retries are immediately enabled. ```python from adk import Agent, RetryConfig agent = Agent( name="api_caller", model="gemini-2.0-flash", instruction="Fetch data from the external API", retry_config=RetryConfig(max_attempts=3), ) ``` When the framework detects an error, it automatically retries up to the specified number of attempts. No manual try-except blocks needed. ๐Ÿ— Building it into production ใƒปAlways configure RetryConfig for agents that call external APIs ใƒปSet max_attempts appropriately based on target API rate limits and SLAs ใƒปDesign with a clear distinction between transient and permanent errors ใƒปMonitor retry counts and error details in logs to identify root causes ๐Ÿ’ก Use cases ๐ŸŒ Automatic recovery from external API rate limits and timeouts ๐Ÿ—„๏ธ Handling temporary database connection drops โ˜๏ธ Building resilience against brief cloud service outages ๐Ÿ”„ Improving stability at intermediate steps in multi-step workflows โš ๏ธ Watch out Broad `except Exception:` blocks will break the framework's retry mechanism by swallowing errors before the framework can handle them. Catching `BaseException` is even worse โ€” it traps `NodeInterruptedError`, which breaks Human-in-the-Loop (HITL) flows. Also, be careful not to waste retries on non-recoverable errors like authentication failures. โœจ With RetryConfig, you can free yourself from manual error handling and build robust agents that run reliably in production environments. #ADK# #AIAgent#
๋” ๋ณด๊ธฐ