Nota:✋ This post was originally published on my blog[wiki-cloud.co] The development of artificial intelligence solutions is evolving from traditional conversational assistants to systems capable of reasoning, using tools, querying information, executing processes, and collaborating with other agents.
In this context, Google Agent Development Kit (ADK) provides a framework for designing, developing, testing, and deploying AI-based agent applications. Its modular architecture allows you to build anything from a simple agent to multi-agent systems capable of coordinating complex business workflows.
Based on the official product guide, some research, and the experience of many developers, I present a high-level architecture of Google ADK with different components, which can be explained through the following layers:
Each layer fulfills a specific function and integrates with the others to process user requests in an organized, secure, and scalable manner.
Below I present the high-level architecture divided into layers and components, where I will explain each one of them:
User interfaces
The top layer of this high-level architecture represents the different channels through which users or applications can interact with the agents.
Google ADK doesn't require the use of a specific interface. Users and developers can interact with the agents through various options, including:
This separation allows the agent's logic to be independent of the user experience. The same agent system can be used from different channels without needing to modify its internal behavior.
For example, a support agent can handle inquiries from a web application, an internal chatbot, and an API used by other corporate applications. ADK Runtime & Runner
The ADK Runtime and Runner constitute the environment responsible for executing and coordinating the operation of the agents.
This layer acts as the operational engine of the architecture and is responsible for connecting the user interfaces with the agent system and the services they need.
Its main capabilities are:
Event Loop
The event loop is the central operating pattern that defines the interaction between the Runner and the custom code (agents, tools, callbacks, collectively referred to as “execution logic” or “logical components” in the design document). The event loop manages the sequence of actions that occur during an interaction.
Orchestration
Orchestration controls how agents participate and in what order tasks are performed.
You can determine, for example:
This capability is especially important in multi-agent architectures.
Service Management
Service management connects the Runner to the infrastructure components used by the application.
This includes services such as:
Thanks to this separation, the agent's logic can remain decoupled from the mechanism used to store information or deploy the solution.
Agent System
The functional core of the architecture is the agent system. ADK allows combining different types of agents depending on the level of autonomy, control, and specialization required by the solution.
LLM Agents
LLM Agents use language models to interpret requests, reason about the context, and decide what action to take. Google ADKuse models from the Gemini family through Vertex AI or Google AI Studio to reason and make decisions.
This type of agent can:
For example, a customer service agent can analyze a request, check the status of an order, and determine whether to respond directly or transfer the case to a specialized agent. Agent workflow
Workflows control the execution of other agents using more structured patterns. They are useful when the process requires predictable behavior and a defined execution order.
The main patterns are:
Custom Agents
Custom agents allow you to implement specialized behaviors when agents based solely on language models or predefined flows are insufficient.
A custom agent can include:
For example, an organization could create a custom agent to validate financial transactions by applying internal rules before allowing another agent to continue the process. Foundation components
The ADK architecture relies on a set of components that preserve context, coordinate actions, and enable interaction with external systems. These components are essential for the agent to maintain continuity and perform tasks beyond a simple conversation. The basic or fundamental components are as follows:
Session
A session represents a continuous interaction between a user and an agent application. The session allows for the preservation of:
The session provides the necessary context to maintain a coherent conversation across multiple exchanges.
For example, if a user provides an order number at the beginning of a conversation, the agent can reuse it in subsequent requests within the same session. State
State stores structured information that can change during execution. Unlike conversational history, state contains concrete values that agents can query or update. Some examples are:
State facilitates the construction of multi-step conversational flows and avoids relying solely on the text in the history.
Memory
Memory allows information to be stored and retrieved beyond a single session. It can be used to remember:
Memory helps deliver more personalized experiences and maintain continuity across different sessions.
It is important to distinguish between three concepts:
Events
Events are the fundamental units of information flow within the Agent Development Kit (ADK). They represent every significant occurrence during an agent's interaction lifecycle, from initial user input to final response, including all intermediate steps. Understanding events is crucial, as they are the primary means of communication between components, state management, and control flow direction. An event can correspond to:
The use of events allows you to reconstruct the path followed by the system and understand how a response was generated. It is also an important basis for traceability, debugging, and evaluation.
Tools
Tools allow agents to interact with external services and perform real-world actions. A tool can be:
When an agent needs information or needs to perform an action, they can select a tool, generate its parameters, and process the result. For example, a support agent can query a knowledge base, check the status of a service, and create a ticket on an external platform.
Artifacts
Artifacts represent a crucial mechanism for managing named and versioned binary data, associated with a specific user interaction session or persistently with a user across multiple sessions. They allow agents and tools to manage data beyond simple text strings, enabling more comprehensive interactions that include files, images, audio, and other binary formats.
Models and Knowledge
The models and knowledge layer provides the intelligence, context, and information sources used by the agents. This layer includes four main elements.
Gemini and other models
Google ADK is designed to integrate seamlessly with Gemini, although it can also use other third-party models depending on the solution's needs.
The model can handle:
An architecture can use different models depending on the task.
For example: Long-Term Memory
Long-term memory retains relevant information obtained from previous interactions. It can be used to retrieve:
Retrieval should be selective to avoid sending unnecessary information to the model. It is also important to implement data privacy, retention, and deletion policies.
Retrieval Augmented Generation (RAG)
The architecture can integrate Retrieval Augmented Generation mechanisms, known as RAG. This approach allows the agent to search for information in knowledge sources before generating a response. These sources can include:
RAG reduces reliance on general model knowledge and improves the accuracy of responses.
APIs, services and external systems
Agents can connect to internal and external systems using tools and integrations. Some examples include:
This capability allows agents not only to answer questions but also to access up-to-date information and perform actions within business processes.
Observability and governance
Observability and governance allow us to understand what happens within an agent as it performs a task. Through telemetry and structured logs, it's possible to analyze aspects such as its reasoning steps, tool calls, and the responses generated by the models. This information is especially useful during development, as it facilitates error identification, diagnosis of unexpected behavior, continuous agent improvement, and monitoring of system performance.
This layer consists of:
Deployment Options
Una aplicación desarrollada con Google ADK puede desplegarse en diferentes entornos. La elección depende del nivel de control, escalabilidad, costos, integración, seguridad y operación requerida por la organización. A continuación se mencionan las opciones de despliegue más comunes:
The Google ADK architecture provides a modular framework for building AI-based applications.
User interfaces allow access to the system from various channels. The Runtime and Runner coordinate execution. The agent system provides reasoning, orchestration, and specialized behaviors. Core components manage sessions, state, memory, events, tools, and artifacts.
The model and knowledge layer connects the agents to Gemini, other models, RAG systems, and external sources. Observability and governance enable control over performance, quality, and security. Finally, the various deployment options allow the solution to run in managed environments, serverless environments, Kubernetes, or on-premises infrastructure.
The main strength of ADK lies not only in connecting an application to a language model, but also in providing the necessary components to transform that model into an organized, extensible, observable agentic system ready to integrate with real-world business processes.
The appropriate design will depend on each use case, but should always maintain a balance between autonomy, control, security, and simplicity.
In future articles, we will delve deeper into this topic.
Other articles:
- Google ADK: An Introduction to AI Agent Development Hope will be useful.
Best Regards,
Follow me:
👉
[Wiki Cloud]| 👉[X]| 👉[Github]| 👉[Youtube]