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

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture ๆŠ•็จฟใฏๅ€‹ไบบใฎๆ„่ฆ‹ใงใ™ใ€‚
๊ฐ€์ž… May 2026
286 ํŒ”๋กœ์ž‰ ์ค‘    469 ํŒฌ
# Useful but Little-Known Features of ADK 2.0 ๐ŸŒ Struggling to manage binary data like images, PDFs, and audio files that your AI agents produce and consume? ADK 2.0's artifact management provides a unified system for handling binary data, identified by filename with automatic versioning built in. ๐Ÿ“Œ Title: Artifact Management ๐Ÿ”— URL: ๐Ÿงฉ Overview Artifacts provide a unified way to manage binary data generated and stored within agent sessions. Each artifact is represented as a `google.genai.types.Part` with inline_data (data bytes + MIME type) and identified by filename. Every save automatically assigns a version number (0, 1, 2...), enabling change tracking. Scope can be session-level (default) or user-level (with the `user:` prefix). ๐Ÿ›  How to use it Use the `context` object to save, load, and list artifacts. ```python from google.genai import types # Save an artifact image_part = types.Part(inline_data=types.Blob( data=image_bytes, mime_type="image/png" )) version = "report_chart.png", image_part) # Load an artifact artifact = context.load_artifact("report_chart.png") # List all artifacts artifact_names = context.list_artifacts() ``` Use `InMemoryArtifactService` for development and `GcsArtifactService` for production, enabling flexible deployment across environments. ๐Ÿ— Building it into production ใƒปUse `GcsArtifactService` in production for durable, persistent storage ใƒปLeverage user-scoped artifacts (with `user:` prefix) for data shared across sessions ใƒปTake advantage of versioning to build change history tracking and rollback mechanisms ใƒปSet MIME types correctly to ensure downstream processing compatibility ๐Ÿ’ก Use cases ๐Ÿ–ผ๏ธ Saving and reusing agent-generated charts and diagrams ๐Ÿ“„ PDF report generation with version control ๐ŸŽต Storing synthesized audio and passing it to downstream processing ๐Ÿ‘ค Managing per-user profile images and documents โš ๏ธ Watch out `InMemoryArtifactService` loses all data when the process terminates โ€” use it only for development and testing. For large volumes of binary data, watch GCS storage costs and quotas. Session-scoped artifacts become inaccessible after the session ends, so use user-scoped artifacts for data that needs to persist. โœจ With artifact management, handling binary data becomes straightforward, making it dramatically easier to build multimodal agent capabilities. #ADK# #AIAgent#
๋” ๋ณด๊ธฐ