You are a cloud infrastructure engineer at NimbusScale, a fast-growing SaaS startup whose monthly GCP bill just crossed $30,000. The CFO wants a 20% cost reduction within the quarter, but your team manages 15 different cloud services and nobody has time to audit each one manually. You need a smarter way to analyze spending patterns, surface optimization opportunities, and track which services have been reviewed.
In this lab, you will build a stateful cloud cost advisor agent using the Google Agent Development Kit (ADK). You will create tool functions that query service costs, pull 6-month spending trends, and generate optimization recommendations. Using ToolContext, you will implement session state so the agent remembers which services have been reviewed across conversation turns. You will also configure output_key to automatically store agent responses in session state, giving you hands-on experience with ADK's core state management patterns.