Agent Engine
Agent Engine on Google Cloud is the managed Vertex AI/Agent Platform runtime for deploying, running, streaming, tracing, evaluating, and cleaning up AI agents built with frameworks such as ADK, LangChain, LangGraph, CrewAI, AG2, A2A, and MCP. The notebooks also use Agent Engine as the container for managed Sessions and Memory Bank resources that preserve conversation state and long-term user memories. · Official docs
Synthesized across 49 notebooks. See the source pages under Notebooks below for line-level grounding.
Agent Engine is the deployment and operations layer for agents: you build and test an agent locally, wrap or package it for the supported framework, deploy it with explicit dependencies and staging artifacts, then query it through SDK, HTTP, streaming, or framework-specific interfaces.
Most examples pair Agent Engine with managed state services. Vertex AI Session Service stores durable conversation history, while Memory Bank extracts meaningful long-term facts scoped by user_id or other scopes; agents retrieve those facts with Memory Bank services, semantic search, or preload tools.
The advanced notebooks extend the same pattern to custom containers, bidirectional Live API audio, code execution sandboxes, Cloud API Registry, MCP tools, A2A multi-agent systems, tracing, and Gen AI Evaluation. Across all variants, local testing, explicit configuration, IAM/API setup, runtime packaging, observability, and cleanup are recurring concerns.
Canonical workflow
- Enable the required Google Cloud APIs, configure PROJECT_ID, LOCATION, authentication, IAM roles, and any staging bucket or external credentials.
- Build the agent locally with the chosen framework, test individual tools first, then test the complete local agent or runner before deployment.
- Add state and memory deliberately: use managed sessions for durable chat history, Memory Bank scopes such as user_id for long-term memory, and retrieval or preload tools when the agent needs prior context.
- Package the deployment with explicit requirements, source packages, root_agent.py or entrypoint objects, build options, Dockerfile, Terraform artifacts, or ModuleAgent configuration as required by the framework.
- Deploy to Agent Engine, Agent Runtime, Express Mode, Cloud Run, GKE, or Terraform-managed infrastructure, using staging buckets and reproducible configuration.
- Create sessions or tasks for remote interactions, then query with SDK, REST, streaming, WebSocket, A2A, or direct HTTP clients as appropriate.
- Observe and validate behavior with traces, logs, task polling, session events, memory retrieval, sandbox outputs, and Gen AI Evaluation datasets or metrics.
- Delete deployed agents, sandboxes, staging buckets, experiments, Cloud Run/GKE/Cloud SQL resources, and Memory Bank resources when finished to avoid ongoing charges.
Best practices
See Agent Engine - Best Practices for the full distilled guide.
- Test tools directly before wiring them into an agent, and test the full agent locally before deploying to Agent Engine.
- Keep deployable agent objects serializable: keep init lightweight and pickle-able, move heavy initialization to set_up, and use lazy initialization when executors or tools have non-pickleable state.
- Wrap ADK agents with AdkApp for Agent Engine deployment and provide session_service, memory_service, and memory tools on the Runner or Agent when using managed state.
- Use stable scopes such as user_id for Memory Bank so memories are isolated per user, client, or domain entity.
- Generate memories from complete sessions or recent events, then retrieve them with scope-based lookup for small profiles or semantic search/top_k for targeted recall.
- Use custom Memory Bank topics only after establishing a default baseline; keep topics focused, provide detailed descriptions with exclusions, and use realistic few-shot examples.
Key models & APIs
- Vertex AI Agent Engine / Agent Runtime, Agent Platform API, Vertex AI API, Vertex AI SDK: google-cloud-aiplatform with agent_engines, adk, and langchain extras, Google ADK: Agent, Runner, AdkApp, VertexAiSessionService, VertexAiMemoryBankService, PreloadMemoryTool, Vertex AI Session Service, Vertex AI Memory Bank, Agent Engine Sandbox and AgentEngineSandboxCodeExecutor, Gemini models including gemini-2.5-flash, gemini-2.0-flash, gemini-2.0-flash-live-preview-04-09, gemini-live-2.5-flash-native-audio, gemini-3.5-flash, gemini-3.1-pro-preview, and gemini-3.1-flash-lite, Embedding models including text-embedding-005 and gemini-embedding-001, Claude models on Vertex AI including claude-sonnet-4@20250514 and vertex_ai/claude-sonnet-4-5@20250929, Llama model on Vertex AI Model Garden/MaaS: vertex_ai/meta/llama-3.3-70b-instruct-maas, A2A SDK and Agent Cards / AgentSkill, MCP, Cloud API Registry, and MCP Toolbox for Databases, Gen AI Evaluation / EvalTask / AgentInfo, Cloud Trace, OpenInference, and Phoenix tracing, Cloud Storage staging buckets, Artifact Registry, Cloud Build, Cloud Run, GKE, Cloud SQL, Secret Manager, BigQuery, Vertex AI Search, and Managed Agents REST APIs
Notebooks (49)
Agents & ADK (21)
- Get started with Vertex AI Memory Bank — Builds a Vertex AI Memory Bank hotel concierge that stores and retrieves guest preferences across sessions.
- Customizing Memory Topics — Customizes Vertex AI Memory Bank topics for a financial advisor assistant and compares default vs custom extraction.
- Governance with Vertex AI Memory Bank — Builds a governed Vertex AI Memory Bank with TTL, topics, revision history, rollback, and cleanup.
- Get started with Memory Bank on ADK — Build ADK agents that generate, retrieve, preload, and customize Agent Engine Memory Bank memories.
- Building a Multimodal Trip Planner with ADK on Vertex AI Agent Engine Memory Bank — Builds and deploys a multimodal ADK trip planner using Vertex AI Agent Engine Memory Bank.
- Get started with A2A on Agent Engine — Builds, deploys, and queries an A2A Q&A agent on Vertex AI Agent Engine.
- Getting Started with Bidirectional Streaming v2 on Agent Runtime — Builds and deploys Agent Runtime bidirectional streaming agents, including a Live API audio agent.
- Claude with ADK on Vertex AI Agent Engine — Builds and deploys a Claude-powered ADK Reddit agent on Vertex AI Agent Engine with memory and tracing.
- Deploy your containerized agent on Agent Runtime (prev. Agent Engine) — Deploys a BYOC ADK weather agent to Agent Runtime and queries it through the Vertex AI API.
- Deploy your first agent to Vertex AI Agent Engine — Deploys ADK agents to Vertex AI Agent Engine with Express Mode, agent object, and inline source workflows.
- Get started with Agent Engine Terraform Deployment — Deploy Vertex AI Agent Engine agents with Terraform, cloudpickle packaging, and ADK tools.
- Get started with Cloud API Registry on Vertex AI Agent Engine — Builds and deploys an ADK BigQuery data analyst agent using Cloud API Registry on Vertex AI Agent Engine.
- Get started with Code Execution on Vertex AI Agent Engine — Runs LLM-generated Python securely with Vertex AI Agent Engine Sandbox and ADK agents.
- Getting Started with Live API on Agent Engine — Deploys bidirectional streaming agents on Vertex AI Agent Engine using Gemini Live API audio and ADK tools.
- MCP on Vertex AI Agent Engine with custom installation scripts — Deploys a Reddit MCP tool agent to Vertex AI Agent Engine with custom install scripts.
- Building multi-agent systems with Vertex AI and Claude — Builds a Vertex AI Agent Engine multi-agent market analysis system with Gemini, Claude, ADK, A2A, and MCP.
- Building Multi-Agent Systems with Vertex AI and Llama model — Builds a traced Vertex AI multi-agent trading analyst with Gemini, Llama, ADK, A2A, and MCP tools.
- Get started with Sessions and Memory Bank for ADK agents in Cloud Run — Builds an ADK weather agent with Vertex AI Sessions, Memory Bank, and Cloud Run deployment.
- Get started with Sessions and Memory Bank for ADK agents in Google Kubernetes Engine — Builds an ADK weather agent with Vertex AI Sessions, Memory Bank, and GKE deployment.
- Intro to Managed Agents API on Agent Platform (cURL) — Shows how to manage and interact with Managed Agents on Agent Platform using REST and cURL.
- Managed Agents API - Analyzing the 2026 World Cup — Deploys a Managed Agents API World Cup analyst agent with GCS skills and multi-turn interactions.
Gemini (23)
- Vertex AI Agent Engine in Express Mode — Build, test, deploy, and query a Gemini ADK currency agent on Vertex AI Agent Engine Express Mode.
- Evaluate a CrewAI agent on Vertex AI Agent Engine (Customized template) — Evaluates a CrewAI Gemini agent on Vertex AI Agent Engine with tool, trajectory, and response metrics.
- Evaluating a LangChain Agent on Vertex AI Agent Engine (Prebuilt template) — Deploys and evaluates a LangChain Gemini agent on Vertex AI Agent Engine using Gen AI Evaluation.
- Evaluate a LangGraph agent on Vertex AI Agent Engine (Customized template) — Builds a Gemini LangGraph agent on Agent Engine and evaluates tools, trajectories, and responses.
- Intro to Building and Deploying an Agent with Agent Engine in Vertex AI — Builds, tests, deploys, streams, customizes, and deletes a LangChain Gemini agent on Vertex AI Agent Engine.
- Persisting LangChain History with Vertex AI Session Service — Persists LangChain chat and tool history in Vertex AI Agent Engine Session Service.
- Building and Deploying a Human-in-the-Loop LangGraph Application with Agent Engine on Vertex AI — Builds, tests, deploys, and resumes a human-in-the-loop LangGraph agent on Vertex AI Agent Engine.
- Get started with Vertex AI Memory Bank - ADK — Builds an ADK agent with Vertex AI Memory Bank for long-term user memory across sessions.
- Get started with Vertex AI Memory Bank - CrewAI — Integrates Vertex AI Memory Bank with CrewAI agents for persistent long-term conversational memory.
- Get started with Vertex AI Memory Bank - LangGraph — Builds a LangGraph chatbot with Vertex AI Memory Bank for long-term personalized memory.
- Debugging and Optimizing Agents: A Guide to Tracing in Agent Engine — Builds, deploys, and traces a Gemini LangChain agent on Vertex AI Agent Engine.
- AG2 (formerly Autogen) Multi-Agents Example on Vertex AI Agent Engine — Builds and deploys an AG2 multi-agent research app to Vertex AI Agent Engine.
- Building and Deploying a Google Maps API Agent with Agent Engine — Builds, tests, deploys, and queries a Gemini Google Maps agent on Vertex AI Agent Engine.
- Building and Deploying a LangGraph Agent with Agent Engine in Vertex AI — Builds, tests, deploys, and deletes a Gemini LangGraph agent on Vertex AI Agent Engine.
- Building a Multi-Agent RAG Application with LangGraph and Agent Engine — Builds and deploys a LangGraph multi-agent RAG app on Vertex AI Agent Engine with Cloud SQL vector stores.
- Deploying an Agent with Agent Engine and MCP Toolbox for Databases — Deploys a Gemini hotel-booking agent on Agent Engine using Cloud SQL, Cloud Run Toolbox, and LangGraph.
- Building a Conversational Search Agent with Agent Engine and RAG on Vertex AI Search — Builds and deploys a Gemini movie-search RAG agent with LangChain, Agent Engine, and Vertex AI Search.
- Create & Deploy Agent and Run Gen AI Agent Evaluation — Creates, deploys, runs, and evaluates an ecommerce ADK agent on Vertex AI Agent Engine.
- Gen AI Eval - Multi-turn Agent Eval, User Simulation, Metric Registration, Auto-Loss Analysis — Evaluates ADK travel agents with Vertex Gen AI Eval multi-turn simulation, custom metrics, and loss analysis.
- Building a photo recognition agent: Agent Engine setup — Sets up and deploys a Gemini LangChain agent on Agent Engine with Wikipedia and Vertex AI Search tools.
- 🛡️ Agentic GraphRAG: Cybersecurity Threat Intelligence — Builds and deploys an ADK GraphRAG threat-intel agent using Neo4j and Vertex AI Agent Engine.
- GraphRAG on Google Cloud With Spanner and Vertex AI Agent Engine — Builds a GraphRAG Q&A agent with Spanner Graph, Gemini, ADK, and Vertex AI Agent Engine.
- 🌿 Eco-Nomad Swarm: 100% Real-Data Sustainable Travel Orchestration — Builds a Vertex AI ADK travel swarm using Neo4j GraphRAG and live APIs for sustainable trip briefs.
Open Models (1)
- Building an ADK agent using QWEN 3 on Vertex AI — Builds and deploys an ADK weather agent using Qwen3 on Vertex AI and Agent Engine.
Vertex AI Search (4)
- Gemini Enterprise custom agent with prompt management — Builds a Gemini Enterprise ADK SQL agent using Vertex AI Prompt Management and schema file context.
- Gemini Enterprise custom agent with Vertex AI session — Builds a Gemini Enterprise travel agent using ADK sub-agents and persistent Vertex AI sessions.
- MCP Server with Gemini Enterprise — Builds an MCP HR leave tool on Cloud Run, connects it to an ADK Gemini agent, and registers it with Gemini Enterprise.
- Open Source Models (Gemma) as a agent with Gemini Enterprise — Deploys Gemma on Cloud Run, wraps it with ADK, deploys to Agent Engine, and registers it in Gemini Enterprise.
Related concepts
- Agents & ADK · Function Calling & Tools · RAG & Grounding · Applied Use Cases · MLOps & Deployment · Evaluation · Vertex AI Search · Gemini Capabilities
Part of the Generative AI Google Brain · Agent Engine - Best Practices