Build Long-running AI agents that pause, resume, and never lose context with ADK

· Source: Google Developers Blog - AI · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering, Robotics & Autonomous Systems · Depth: Intermediate, long

Summary

This article, published on May 12, 2026, introduces the Agent Development Kit (ADK) for building long-running AI agents that maintain context across extended workflows. It addresses the limitations of stateless chatbots, which fail in enterprise scenarios like HR onboarding, invoice disputes, or sales prospecting due to context pollution, token cost explosion, and reasoning hallucinations during idle periods. The tutorial demonstrates building a "New Hire Onboarding Coordinator Agent" that reliably manages a multi-week process, including sending welcome packets, pausing for document signatures, delegating IT provisioning to a sub-agent, and sending a day-one schedule. Key architectural shifts include durable memory schemas, event-driven dormancy gates, and multi-agent delegation, all supported by ADK's persistent session management and state machine enforcement. The complete source code is available on GitHub.

Key takeaway

For AI Engineers building agents for enterprise workflows with significant idle time or multi-step processes, you should adopt ADK's durable state machine and event-driven architecture. This approach ensures agents maintain context, reduce token costs, and avoid hallucinations, transforming them from stateless chatbots into reliable, long-running background processes. Explore the provided GitHub repository to implement these patterns for robust, production-ready agents.

Key insights

Long-running AI agents require durable state machines, event-driven resumption, and multi-agent delegation to manage complex, multi-day workflows.

Principles

Method

Define an explicit state machine, persist sessions using `DatabaseSessionService` (SQLite/Cloud SQL), handle idle time with webhook-triggered `state_delta` updates, and delegate specialized tasks to sub-agents.

In practice

Topics

Code references

Best for: AI Engineer, Machine Learning Engineer, MLOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Google Developers Blog - AI.