ADK 2.1 Graph Workflow と A2A specialist agents を使った「Dynamic Research + Multi-Agent Evaluation 型 旅行計画AIエージェント」です。ユーザーの旅行希望から候補を6案作り、候補ごとに検索リサーチし、費用・快適性・リスク・体験価値を統合評価します。ユーザーには上位3案を提示し、選ばれた案だけを詳細旅程と旅しおり画像にします。
Coordinator Agent (port 8100)
|- analyst
|- clarification RequestInput (最大2回)
|- strategist
|- research_candidate[] + google_search (fan-out / fan-in)
|- multi_agent_evaluation
|- Comfort Agent (RemoteA2aAgent, port 8101)
|- Risk Agent (RemoteA2aAgent, port 8102)
|- Experience Agent (RemoteA2aAgent, port 8103)
|- coordinator recommendation (top 3)
|- user selection / replan RequestInput
|- BuildSelectedOptionContext FunctionNode
|- planner
|- illustrator_prompt_writer
`- illustrator
research_agent の結果は会話コンテキストに依存せず、join 後に session.state["research_reports"] へ option_id keyed dict として保存します。planner には State 全体ではなく session.state["selected_option_context"] だけを渡します。
Install uv first.
make setup
cp .env.example .envRequired environment variables:
# Google AI Studio
GOOGLE_API_KEY=...Optional environment variables:
COMFORT_A2A_URL=http://localhost:8101
RISK_A2A_URL=http://localhost:8102
EXPERIENCE_A2A_URL=http://localhost:8103Start the remote evaluation specialists, coordinator, and ADK Web:
make runOr run them separately:
make run-specialists
make run-coordinator
make webADK Web listens on http://localhost:8080.
AG-UI clients can connect to the coordinator through a separate streaming endpoint:
make run-ag-uiThe AG-UI server listens on http://localhost:8200 and accepts POST /ag-ui
requests using the Agent User Interaction Protocol event stream format.
Agent cards:
http://localhost:8100/.well-known/agent-card.json
http://localhost:8101/.well-known/agent-card.json
http://localhost:8102/.well-known/agent-card.json
http://localhost:8103/.well-known/agent-card.json
Deploy the three A2A evaluation specialists first, then the coordinator with their Agent Runtime A2A card URLs injected:
export GOOGLE_CLOUD_PROJECT=create-multi-agent
export GOOGLE_CLOUD_LOCATION=us-central1
make deploy-allThe deployed Reasoning Engine display names are prefixed with Travel Planning.
To inspect or remove deployed resources created by this repo:
./scripts/cleanup_all.sh --dry-run
./scripts/cleanup_all.sh東京から静かな田舎に行きたいです。公共交通で行けて、温泉があると嬉しいです。予算は3万円以内です。
The workflow stores these intermediate artifacts in session.state:
raw_user_query: 元のユーザー入力travel_request: analyst が作ったTravelRequestclarification_rounds: RequestInput の実行回数travel_options: strategist が作ったTravelOption[]research_reports:option_idkeyedResearchReportdictcoordinator_recommendation: 上位3案の推薦順位、比較サマリー、評価軸の調停理由selected_option_id: ユーザーが選んだ候補IDselected_option_context: planner に渡す候補限定コンテキストitinerary_markdown: planner が作成した詳細な旅程illustrator_prompt: 旅しおり表紙画像を生成するための prompt
agents/coordinator/agent.py 全体の Graph Workflow wiring
agents/coordinator/intake.py ユーザー希望の構造化と clarification
agents/coordinator/candidates.py 候補生成、検索 research fan-out / fan-in
agents/coordinator/evaluation.py RemoteA2aAgent specialist 呼び出しと統合評価
agents/coordinator/recommendation.py 推薦、ユーザー選択、詳細旅程、画像生成
agents/comfort/ RemoteA2aAgent 用 comfort specialist
agents/risk/ RemoteA2aAgent 用 risk specialist
agents/experience/ RemoteA2aAgent 用 experience specialist
- ADK Graph Workflow による旅行計画フロー
- Dynamic Workflow 風の research fan-out / fan-in
- RequestInput による不足情報確認と候補選択
session.stateへの構造化中間成果物保存google_searchtool を使う候補別 research agents- RemoteA2aAgent による comfort / risk / experience 評価
- coordinator agent による費用分析と specialist 評価の統合推薦
- 条件変更時の再提案ルート
- planner の markdown 旅程生成と state 保存
- illustrator prompt writer agent
gemini-3-pro-imageを使う illustrator agent
- メール送信
- 長期 Memory 保存
- 宿泊予約、交通予約、施設営業日の確定 API 連携
- 画像生成結果をファイル化して配布用 PDF しおりに組版する処理
- 候補再提案時の高度な条件差分管理
make lint
make lockこの hands-on example にはリポジトリ内テストスイートはありません。自動チェックは make lint を使います。既存の決定論的なサポート業務テスト、data/、src/ は旅行計画エージェント化に伴い削除済みです。