Can we fix this AI agent in 60 minutes? (Live builder Q&A)
By Google Cloud Tech
Key Concepts
- AI Agent: A software system that uses LLMs to perform autonomous tasks, research, and decision-making.
- ADK (Agent Development Kit): A specialized SDK designed for building, orchestrating, and maintaining agentic workflows.
- Fan-out Pattern: A parallel processing technique where a single task is split into multiple sub-tasks (sub-agents) to improve performance.
- Vector Database: A database optimized for storing and retrieving high-dimensional vector embeddings, used here for semantic search of case studies.
- Grounding: The process of connecting an LLM to real-world data (e.g., Google Search) to reduce hallucinations and improve factual accuracy.
- Observability: The ability to monitor and trace agent behavior, often via OpenTelemetry, to debug non-deterministic outputs.
- Exponential Backoff: A strategy for handling API rate limits or network failures by increasing wait times between retries.
1. Project Overview: "Titanium"
Jacob Battish developed an agent named "Titanium" to assist with executive outreach. The agent researches customer pain points and maps them to relevant Google case studies to generate personalized emails.
- Initial State: Hard-coded with 10–12 case studies; used sequential processing (15-minute runtime).
- Goal: Scale the agent to handle 1,600+ case studies dynamically and improve robustness for production deployment.
2. Refactoring Methodology (The 60-Minute Build)
The team refactored the agent using the ADK framework to move from a rudimentary script to a production-ready architecture.
- Step 1: Planning: Used a coding agent to generate a development plan, emphasizing the need for "re-verification" steps to catch errors.
- Step 2: Crawler Implementation: Built a headless browser crawler using Playwright to extract URLs and content from 1,600+ case studies.
- Step 3: Data Ingestion: Extracted HTML, converted it to Markdown, and stored it in a Google Vector Search database.
- Step 4: Orchestration: Replaced nested
if-elselogic with a Sequential Agent structure in ADK, which executes steps (Research -> Case Study Selection -> Email Drafting) in a clean, maintainable pipeline.
3. Technical Architecture & Frameworks
- Search Strategy: Implemented a Hybrid Search (combining semantic and text-based search) to ensure high relevance.
- Deterministic Control: Set the LLM
temperatureto 0 for the fact-checking agent to minimize randomness. - Concurrency: Used a "fan-out" pattern to research multiple companies simultaneously, appending results to a shared list to avoid race conditions.
- Observability: Utilized ADK’s built-in web interface for variable inspection and recommended OpenTelemetry for production-grade tracing.
4. Key Arguments & Best Practices
- On Reliability: Luis emphasized that LLM calls are inherently unreliable. Developers must build in "defensive" coding practices like exponential backoff and timeout limits.
- On Data Quality: If an agent faces conflicting information, the solution is to either clean the underlying data or use prompt engineering to instruct the agent on how to handle exceptions (e.g., "disregard conflicting info").
- On Framework Choice: While native SDKs (like the Gemini SDK) are sufficient for prototypes, specialized agent frameworks (ADK) are recommended for production because they allow for cleaner schema management and modular, extensible workflows.
5. Notable Quotes
- "If I can do it, anyone can do it." — Jacob Battish, on the accessibility of building AI agents.
- "We don't want to just start coding without having at least an idea of what the agent is going to do for us." — Luis, on the importance of planning before implementation.
- "There's no single right way to do this." — Luis, regarding the flexibility of agentic architecture.
6. Synthesis/Conclusion
The transition from a prototype to a production-ready agent requires moving away from hard-coded data and rigid control flow toward dynamic retrieval (Vector DBs) and modular orchestration (ADK). By implementing a sequential agent pattern, the team successfully scaled the "Titanium" agent to handle large datasets while maintaining the speed and reliability required for professional use. The session highlighted that successful agent development is an iterative process of experimentation, debugging, and continuous refinement of both prompts and underlying infrastructure.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "Can we fix this AI agent in 60 minutes? (Live builder Q&A)". What would you like to know?