
Stop rogue AI: Enforce policy & cut costs in Agent Development Kit (ADK)
Link to the code repo. → https://goo.gle/adk-financial-advisor
When an AI chatbot goes off script, it’s not just awkward. It can be a massive legal and financial risk for your company.
In this video, Miguel Gutierrez joins Martin Omander for a hands on look at how to keep bots in their own lane. Dive straight into the code and learn how to use agent callbacks in Google’s Agent Development Kit (ADK). We’ll walk through how to build custom guardrails that intercept requests, enforce company policies (like blocking unwanted financial or crypto advice), and implement a cache so you stop paying for the same tokens twice.
What Martin and Miguel cover:
* Setting up a "one-and-done" disclaimer using conversation state.
* Using a lightweight LLM "judge" to detect user intent and block risky requests.
* Hardcoding strict boundaries for specific tools.
* Hooking up a cache to cut down latency and API costs.
Chapters:
0:00 - Intro
1:33 - Demo
4:54 - Code review
8:08 - Takeaways
Watch more Serverless Expeditions → https://goo.gle/ServerlessExpeditions
? Subscribe to Google Cloud Tech → https://goo.gle/GoogleCloudTech
#ServerlessExpeditions #GoogleCloud
Speakers: Martin Omander, Miguel Gutierrez
Products Mentioned: Agent Development Kit
When an AI chatbot goes off script, it’s not just awkward. It can be a massive legal and financial risk for your company.
In this video, Miguel Gutierrez joins Martin Omander for a hands on look at how to keep bots in their own lane. Dive straight into the code and learn how to use agent callbacks in Google’s Agent Development Kit (ADK). We’ll walk through how to build custom guardrails that intercept requests, enforce company policies (like blocking unwanted financial or crypto advice), and implement a cache so you stop paying for the same tokens twice.
What Martin and Miguel cover:
* Setting up a "one-and-done" disclaimer using conversation state.
* Using a lightweight LLM "judge" to detect user intent and block risky requests.
* Hardcoding strict boundaries for specific tools.
* Hooking up a cache to cut down latency and API costs.
Chapters:
0:00 - Intro
1:33 - Demo
4:54 - Code review
8:08 - Takeaways
Watch more Serverless Expeditions → https://goo.gle/ServerlessExpeditions
? Subscribe to Google Cloud Tech → https://goo.gle/GoogleCloudTech
#ServerlessExpeditions #GoogleCloud
Speakers: Martin Omander, Miguel Gutierrez
Products Mentioned: Agent Development Kit
Google Cloud Tech
Helping you build what's next with secure infrastructure, developer tools, APIs, data analytics and machine learning....