Refactoring Vibe-Coded Agent to RAG in 60 Minutes

Luis Sala and Jacob Badish transform Jacob's hardcoded outreach agent into a scalable RAG system using ADK, Vertex AI Vector Search, and a custom crawler—proving non-experts can build production AI agents quickly.

Jacob's Vibe-Coded Outreach Agent: Strengths and Scalability Limits

Jacob Badish, a non-technical executive, built "Project Titanium" on evenings and weekends using the Gemini SDK. The agent targets executives at customer companies, researches their pain points via Google Search grounding, verifies facts to avoid hallucinations, and generates personalized outreach emails tying challenges to Google solutions. Key innovation: a fan-out pattern in the orchestrate_all function processes multiple companies in parallel sub-agents, slashing runtime from 15 minutes with exponential backoff for reliability.

"I vibe coded this in the evenings and weekends. I was blown away at how doable it was. If I could do it, anyone can do it," Jacob shared, crediting iterative prompting with Gemini for teaching robustness like low-temperature calls for factual outputs and verification prompts.

Luis Sala praised the parallelization and grounding but flagged hardcoded 10-12 case studies as the core bottleneck: "Google has over 1,600 case studies and you want to be able to leverage those instead." This limits relevance, accuracy, and team scalability—hardcoding repeats data points and ignores dynamic matching.

Shifting to Agent Development Kit (ADK) for Future-Proofing

Luis recommended migrating from raw Gemini SDK to ADK, Google's agent-focused kit, for maintainability. They replicate v1 workflow first: research → verify → email, then layer RAG superpowers.

Using Antigravity (a coding agent), they prompt for a migration plan: "Port this over into ADK. Create a plan." The agent proposes sequential agents for each task (research, verify, generate), wrapping in a root agent. Luis emphasizes planning: "The idea of creating a plan is vital. We don't want to just start coding."

They add re-verification: "Always now add in then reverify your work. Make it go back a second time cuz it catches things that it misses," Jacob noted from experience. ADK preserves Python code, handles env vars for GCP, and enables baby-step iteration—v1 replica, then RAG.

In 40 minutes, they deploy a working ADK agent: input company/role, triggers parallel searches (e.g., "Execute a search for current CTO"), consolidates intel, vector-searches case studies, and outputs punchy emails. Jacob: "Taking it from a tool that I'm using as really a pilot into now something that's much more production ready."

RAG Pipeline: Crawling 1,600 Case Studies into Vertex AI

To dynamize case studies, they build a Playwright-based crawler for Google's site. Phase 1: Load page, click "show more" repeatedly, extract 1,600+ URLs. Phase 2: Fetch HTML per URL, use Gemini to reformat as markdown JSON, chunk, and embed into Vertex AI Vector Search 2.0.

Luis demoed: Crawler automates browser interactions, Gemini structures content for insertion. No local store like Chroma—managed Vertex AI for production scale. Query function hybrids semantic + text search: "We're going to execute a semantic search... and a text search and combine those results" for relevance.

Agent exposes vector functions, retrieving top matches post-research. UI polish: Simple form for company/domain, copy-paste output. Full code, blog, and repo linked post-session.

"My laptop just froze," Luis quipped mid-build, highlighting real-time debugging. They beat the clock despite hiccups, proving ADK/Antigravity accelerates non-experts.

Live Q&A: Trade-offs, Chunking, and Production Tips

Post-build, Jacob and Luis field chat: Vector store is Vertex AI (not local); chunking via Gemini-structured markdown from HTML. Hybrid search beats pure semantic for edge cases. Jacob advised quicker builds: "Luis did great... but he did spend 20 minutes before actually start coding... trying to get to the production building phase quicker."

Luis owned: "I probably talked too much." They discuss reliability (rate limits, Wi-Fi), UI necessity (forgotten in core build), and next: polish, blog. Jacob recovered energy: "That was so much fun... tons of questions coming in."

Trade-offs named: ADK adds structure but learning curve; Vertex scales but GCP-tied; crawling risks site changes—monitor. Antigravity shines for ADK skills, integrates Gemini CLI.

"Structured messaging is the best way to connect one system to another," Luis stressed early, underscoring agent design.

Key Takeaways

  • Start agents with raw SDKs like Gemini for prototypes, migrate to ADK for production scalability and modularity.
  • Fan-out parallel sub-agents for multi-target research; add exponential backoff and low temperature for reliability.
  • Build RAG via crawlers (Playwright) + managed vector DB (Vertex AI); hybrid semantic/text search boosts recall.
  • Prompt coding agents (Antigravity) with plans + re-verify; iterate baby steps: replicate v1, then enhance.
  • Crawl in phases: URL discovery → content extraction/reformatting with LLM → embedding.
  • Always add UI last; expose vector functions simply for agent-tool integration.
  • Non-experts: Collaborate iteratively with LLMs—they teach prompting, reliability, and code.
  • Timebox fixes: 60 minutes forces focus; talk less, code more in live builds.
  • Verify twice: Catches misses in agent outputs and code.
  • Share repos openly: Submit to clinics like agent-clinic@google.com for community refactors.

Summarized by x-ai/grok-4.1-fast via openrouter

8863 input / 2293 output tokens in 17839ms

© 2026 Edge