📦

[ADK] What's new in 1.19.0

に公開

こんにちは、サントリーこと大橋です。

2025/11/19 に Google Agent Development Kit (ADK) 1.19.0 がリリースされました。

https://github.com/google/adk-python/releases/tag/v1.19.0

今回のリリースには、Gemini 3.0 Pro の機能を先取りした実験的な機能、ローカル開発を効率化するサービス、そして分析基盤の強化などが含まれています。
この記事では、リリース全体の概要を説明しつつ、特に注目すべき以下の機能をピックアップして詳しく解説していきます。

  • progressive SSE streaming feature: ストリーミングでのツール呼び出し引数のサポート
  • file-backed artifact service: ローカルファイルシステムを利用したアーティファクト管理
  • BigQuery Agent Analytics Plugin: BigQuery へのログ保存プラグインの刷新

対象

  • ADK を触ったことがある Python ユーザー
  • AI エージェント向けの UI を作成したいと思っている開発者

なお本記事中では ADK の Agent をAgent、それ以外の AI エージェントをエージェントと表記します。

What's new in 1.19.0

まずは 1.19.0 のリリースノートを見てみましょう。

リリースノート全文(原文と和訳)を見る

Features

  • [Core]

    • Add id and custom_metadata fields to MemoryEntry (4dd28a3)
    • Add progressive SSE streaming feature (a5ac1d5)
    • Add a2a_request_meta_provider to RemoteAgent init (d12468e)
    • Add feature decorator for the feature registry system (871da73)
    • Breaking: Raise minimum Python version to 3_10 (8402832)
    • Refactor and rename BigQuery agent analytics plugin (6b14f88)
    • Pass custom_metadata through forwarding artifact service (c642f13)
    • Update save_files_as_artifacts_plugin to never keep inline data (857de04)
  • [Evals]

    • Add support for InOrder and AnyOrder match in ToolTrajectoryAvgScore Metric (e2d3b2d)
  • [Integrations]

    • Enhance BQ Plugin Schema, Error Handling, and Logging (5ac5129)
    • Schema Enhancements with Descriptions, Partitioning, and Truncation Indicator (7c993b0)
  • [Services]

    • Add file-backed artifact service (99ca6aa)
    • Add service factory for configurable session and artifact backends (a12ae81)
    • Add SqliteSessionService and a migration script to migrate existing DB using DatabaseSessionService to SqliteSessionService (e218254)
    • Add transcription fields to session events (3ad30a5)
    • Full async implementation of DatabaseSessionService (7495941)
  • [Models]

    • Add experimental feature to use parameters_json_schema and response_json_schema for McpTool (1dd97f5)
    • Add support for parsing inline JSON tool calls in LiteLLM responses (22eb7e5)
    • Expose artifact URLs to the model when available (e3caf79)
  • [Tools]

    • Add BigQuery related label handling (ffbab4c)
    • Allow setting max_billed_bytes in BigQuery tools config (ffbb0b3)
    • Propagate application_name set for the BigQuery Tools as BigQuery job labels (f13a11e)
    • Set per-tool user agent in BQ calls and tool label in BQ jobs (c0be1df)
  • [Observability]

    • Migrate BigQuery logging to Storage Write API (a2ce34a)

主な和訳は以下の通りです。

機能 (Features)

  • [Core]

    • MemoryEntryidcustom_metadataフィールドを追加
    • Progressive SSE streaming 機能を追加
    • RemoteAgent の初期化にa2a_request_meta_providerを追加
    • 機能レジストリシステム用の feature デコレータを追加
    • 破壊的変更: 最小 Python バージョンを 3.10 に引き上げ
    • BigQuery Agent Analytics Plugin のリファクタリングとリネーム
    • Forwarding Artifact Service を通してcustom_metadataを渡すように変更
    • save_files_as_artifacts_pluginがインラインデータを保持しないように更新
  • [Evals]

    • ToolTrajectoryAvgScore Metric で InOrder と AnyOrder のマッチングをサポート
  • [Integrations]

    • BQ Plugin のスキーマ、エラーハンドリング、ロギングを強化
    • スキーマに説明、パーティショニング、切り捨てインジケーターを追加して強化
  • [Services]

    • ファイルベースの Artifact Service を追加
    • 設定可能なセッションおよびアーティファクトバックエンド用のサービスファクトリを追加
    • SqliteSessionService を追加し、DatabaseSessionService を使用している既存の DB を移行するスクリプトを追加
    • セッションイベントに文字起こしフィールドを追加
    • DatabaseSessionService の完全な非同期実装
  • [Models]

    • McpTool でparameters_json_schemaresponse_json_schemaを使用する実験的機能を追加
    • LiteLLM レスポンス内のインライン JSON ツールコールのパースをサポート
    • 利用可能な場合、アーティファクト URL をモデルに公開
  • [Tools]

    • BigQuery 関連のラベル処理を追加
    • BigQuery ツール設定でmax_billed_bytesを設定可能に
    • BigQuery ツールに設定されたapplication_nameを BigQuery ジョブラベルとして伝播
    • BQ 呼び出しにツールごとのユーザーエージェントを設定し、BQ ジョブにツールラベルを設定
  • [Observability]

    • BigQuery ロギングを Storage Write API に移行

Pick up Feature

ここからは、今回のリリースからいくつかの機能をピックアップして詳細を解説します。

1. progressive SSE streaming feature

現時点で詳細な仕様は調査中ですが、コミット内容やサンプルを見る限り、Gemini 3.0 Pro から利用可能になった Streaming function call arguments をサポートするための機能だと推測されます。

通常、Function Calling(ツール呼び出し)は、LLM がすべての引数を生成し終えてから一度に送信されます。しかし、Streaming function call を利用すると、引数の生成途中でもストリーミングでデータを受け取ることができます。これにより、LLM が長い引数を生成している最中でも、待機時間を短縮し、よりリアルタイム性の高い応答が可能になります。

ADK でこの機能を利用するには、FunctionCallingConfigstream_function_call_arguments=True を設定します。

root_agent = Agent(
    model='gemini-3-pro-preview', # Gemini 3.0 Pro以降が必要
    name='hello_world_stream_fc_args',
    # ...
    generate_content_config=types.GenerateContentConfig(
        automatic_function_calling=types.AutomaticFunctionCallingConfig(
            disable=True, # 自動実行はOFFにする必要がある場合があります
        ),
        tool_config=types.ToolConfig(
            function_calling_config=types.FunctionCallingConfig(
                stream_function_call_arguments=True, # ここをTrueに
            ),
        ),
    ),
)

なお、この機能は実験的な位置付けであり、デフォルトでは無効化されています。利用するには環境変数 ADK_ENABLE_PROGRESSIVE_SSE_STREAMING=1 を設定して ADK を実行する必要があります。

サンプルコード全体は以下で確認できます。
https://github.com/google/adk-python/blob/786aaed335e1ce64b7e92dff2f4af8316b2ef593/contributing/samples/hello_world_stream_fc_args/agent.py

2. file-backed artifact service

ありそうでなかった、ローカルファイルシステムにアーティファクトを保存する FileArtifactService が追加されました。
これまでアーティファクト(生成された画像やファイルなど)の保存先としては、メモリ上(InMemoryArtifactService)や Google Cloud Storage(GcsArtifactService)がありましたが、ローカル開発時などに手軽にファイルを永続化したい場合に便利です。

使い方は非常にシンプルで、FileArtifactService のコンストラクタに保存先のルートディレクトリを指定するだけです。

from google.adk.artifacts.file_artifact_service import FileArtifactService

# アーティファクトを保存するディレクトリを指定
artifact_service = FileArtifactService(root_dir="./my_artifacts")

# Runnerなどに渡して利用
runner = Runner(
    agent=agent,
    artifact_service=artifact_service,
    # ...
)

これで、Agent が生成したファイルなどが ./my_artifacts ディレクトリ以下に保存されるようになります。ディレクトリ構造は apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/... のように整理されて保存されます。

実際に試してみましょう。
簡単なアーティファクトを保存・読み込みする Agent を作成します。

adk create file_backed

作成した Agent を以下のように修正します。

file_backed/agent.py
from google.adk.agents.llm_agent import Agent
from google.adk.tools import load_artifacts, ToolContext
from google.genai import types

async def save_artifacts(filename: str, save_text: str, tool_context: ToolContext) -> int:
    """
    Save artifacts to the agent's workspace.
    Args:
        filename: filename
        save_text: save text
        tool_context: tool context
    Returns: int version of artifact
    """
    return await tool_context.save_artifact(filename, types.Part.from_text(text=save_text))


root_agent = Agent(
    model='gemini-2.5-flash',
    name='root_agent',
    description='A helpful assistant for user questions.',
    instruction='Save user input to a artifact file by using `save_artifacts` tool. if user want to see the saved file, use `load_artifacts` tool.',
    tools=[
        load_artifacts,
        save_artifacts
    ]
)

アーティファクトの保存は自前のツール、アーティファクトの読み込みはビルドインツールを利用します。

次に ADK Web を起動します。このとき、--artifact_service_uri file://localhost/$(pwd)/artifact-dir のように --artifact_service_urifile://localhost/path/to/dir の URI で指定します。
こうすることで ADK Web が利用する Artifact Service が今回追加された file-backed Artifact Service になります。

実際に試してみましょう。

adk web --artifact_service_uri file://localhost/$(pwd)/artifact-dir

※ コマンドは Mac/Linux 環境を想定しています。Windows の場合はカレントディレクトリのパスに置き換えてください。


実行結果

実際に試してみると、以下のようにファイルが作成されていることが確認できます。

artifact-dir
└── users
    └── user
        └── sessions
            └── 901a2afb-0393-4867-b328-93b30373d11b
                └── artifacts
                    └── hello.txt
                        └── versions
                            └── 0
                                ├── hello.txt
                                └── metadata.json

9 directories, 2 files

デバッグなどには非常に有用ですね。

3. BigQuery Agent Analytics Plugin

ADK の各種やり取り(イベントログなど)を BigQuery に保存するプラグインが刷新されました。
もともと BigQueryLoggingPlugin という名前で開発されていましたが、今回 BigQueryAgentAnalyticsPlugin にリネームされ、実装も大きく変わっています。

特筆すべき点は、BigQuery への書き込みが非同期(バックグラウンドタスク)で行われるようになったことです。これにより、ログ保存の処理が Agent のメインの応答速度に影響を与えることがなくなりました。また、Storage Write API への移行も行われており、より堅牢で高スループットなロギングが可能になっています。

このプラグインの詳細や解説については、@msd05keisuke さんが詳細に記事を公開されていますので、そちらも併せて参照すると良いでしょう。

https://zenn.dev/msd05keisuke/articles/6ddfeac30743cb

まとめ

ADK 1.19.0 は、Gemini 3.0 Pro への対応を見据えた機能追加や、開発者の利便性を向上させるサービス追加など、着実な進化を遂げています。
特に file-backed artifact service は、ローカルでの試行錯誤をよりスムーズにしてくれる地味ながら嬉しい機能です。また、BigQuery プラグインの非同期化は、本番運用を見据えたパフォーマンス改善として非常に重要です。

ぜひ皆さんも新しい ADK を試してみてください。


お知らせ/宣伝

ADK 開発者が集う日本語の Discord コミュニティがあります。ADK に関する情報交換や議論に興味がある方は、ぜひご参加ください!

https://discord.gg/BKpGRzjtqZ

また、ADK の最新のコミットログやリリースノートを分かりやすく解説する Podcast を、月・水・金に配信しています。ADK の動向を追いかけたい方は、ぜひ聴いてみてください。
自動更新ながらやっと50回を超えました。

https://www.youtube.com/playlist?list=PL0Zc2RFDZsM_MkHOzWNJpaT4EH5fQxA8n

Discussion