Ep 393 tool 3:49 w/ Justy & Cody

Build Long running AI agents that pause, resume, and never lose context with ADK Google Developers Blog

Justy and Cody discuss the limitations of stateless chatbots for long-term enterprise workflows and explore Google's ADK solution for durable, event-driven AI agents that can pause and resume without losing context, using a new hire onboarding scenario as the primary case study.

Script: Qwen 3.5 397B A17b Voice: Inworld TTS 1.5 Max

Transcript

Justy I was looking at this new post from Google about long-running agents, and it hits on something we see constantly in product. Most demos are these five-minute chat loops, but real work? Real work takes weeks.

Cody Right. The moment you step outside a single API call, everything breaks.

Justy Exactly. Think about HR onboarding. It's not a quick Q&A. It spans two weeks. You're waiting for signatures, waiting for IT to ship a laptop, waiting for a manager to approve a schedule. That's mostly idle time. A standard stateless bot just forgets everything the second the container restarts or the context window gets too full of old chatter.

Cody It's the token cost explosion. If you're re-feeding a two-week history into the model every time you check in, you're burning cash on irrelevant data. Plus, the model starts hallucinating. It 'remembers' approvals that never happened because the context is polluted.

Justy Wait, so it's inventing steps?

Cody Yeah. It assumes a step is done because the prompt is messy. The fix isn't a bigger context window. It's a totally different architecture where the state is explicit and durable, decoupled from the chat history.

Justy That makes sense for enterprise, but I'm thinking about the user story here. Who is actually building this? It feels like it's for teams managing complex workflows where human sign-off is the bottleneck. The barrier isn't tech; it's trusting the agent to wait without losing its mind.

Cody Precisely. Google's new ADK approach uses three shifts. First, durable memory schemas. Instead of dumping raw JSON into a vector DB, you structure the memory. Second, event-driven dormancy. The agent doesn't poll; it sleeps until a human signature or a shipping confirmation wakes it up.

Justy So it's not actively checking every minute?

Cody Nope. It's a gate. It waits for the event. And third, multi-agent delegation. Instead of one monolithic prompt trying to do everything, you delegate IT provisioning to a specialized sub-agent. It's cleaner and way less prone to reasoning errors over long idle periods.

Justy I need coffee for this. Hold on. Anyway, that delegation piece is huge for market fit. If you can split the 'waiting for hardware' task from the 'welcome email' task, you reduce the risk of the whole thing crashing.

Cody Exactly. And the trade-off is complexity. You're managing state externally now. But for something like invoice disputes that stall for days? It's the only way. The source code is on GitHub, using the Agent Development Kit to handle the pause and resume logic without losing context.

Justy Okay, so for our listeners who want to try this—Build Next. What's the weekend version? I know the full HR flow is heavy.

Cody Start small. Don't build the whole onboarding flow. Just build a 'Document Waiter'. Use the ADK to create an agent that sends a link, pauses indefinitely until a webhook confirms the doc is signed, then sends a specific follow-up. Solo builders can mock the webhook with a simple curl command to test the resume capability.

Justy Right, just prove the sleep-wake cycle works before adding the IT provisioning sub-agent. That's a solid Friday night project.

Cody Yeah. And if you get stuck on the memory schema, check the Google Developers Blog post from May 12th. They have the exact schema examples for the New Hire Coordinator. It's way better than guessing your JSON structure.

Justy Nice. I think I'm going to try that Document Waiter for my own freelance contracts. Always chasing signatures. Thanks for the breakdown, Cody. This idle time problem has been bugging me for months, and honestly, the 'dormancy gate' idea feels like the actual fix we needed.