You can use Proactive Mode in Gemini Cloud Assist to automatically identify cost anomalies and gain actionable insights into your cloud spending.
Before you begin
Before Proactive Mode can analyze cost data, you must set up Proactive Mode.
How proactive cost optimization works
Proactive Mode monitors your billing data in the background. When a cost anomaly is detected by Cloud Billing, the agent automatically starts an investigation to determine the root cause. This investigation can happen at most once a day per project.
The agent correlates the cost spike to changes in your infrastructure, such as:
- Significant changes in spending patterns over time.
- Specific resources responsible for a spike.
- Resources that are underutilized but represent high spending.
View investigation results
Once an investigation is complete, you can review the root-cause analysis and remediation suggestions.
To view results, go to the Cloud Hub Optimization page in the Google Cloud console:
Automate cost notifications
You can build automated workflows that react when a cost investigation is complete by using Eventarc.
To isolate cost-specific notifications from other agent activities, you must configure your destination service, such as a Cloud Run functions, to filter the delivered event payload.
- Create an Eventarc trigger with the attribute
proactive=trueand the event typegoogle.cloud.geminicloudassist.task.v1.completed. - Configure your code to inspect the
titlefield in the delivered event data. Cost investigations include the string "Cost Anomaly" or "Cost Optimization" in the title.
For a technical integration guide, see Automate Proactive Agent activities.
What's next
- Learn about agent identity.
- Learn how to set up Proactive Mode.
- Review IAM requirements for optimization.