Prepare and test your skills
Prepare and test your skills
Serverless Compute and Execution Environments are managed platforms that run agent code without requiring the team to provision or manage servers. Cloud Run (opens in a new tab) and Cloud Functions provide this kind of environment for generative AI agents. The agent logic lives in the hosted environment, and the environment executes API calls outward to tools such as storage, databases, and connected apps. Results flow back into the agent so it can continue its workflow and take the next action.
Cloud Run is a serverless execution environment that hosts agent logic packaged as a workload. An example is an n8n agentic workflow hosted on Cloud Run, where the agent code runs on Google Cloud and stays available to handle work. Traffic flows from the workflow running on Cloud Run outward to each connected app or service, and results flow back into the workflow. This makes Cloud Run the place where the agent lives and where its tool calls run.
Visual workflow building is a way to create AI agents by connecting apps and services into automated processes. The n8n workflow automation platform uses a visual, node-based editor with a drag-and-drop interface, where each node represents a step, an app connection, or a service call. An agent built this way can connect Google Workspace services as tools for its workflow hosted on Cloud Run. Conversation or reasoning in the agent then leads directly to actions in mail, documents, calendar, or other connected systems.
Scalable, event-driven execution means the platform provides compute when a request or event arrives and scales capacity with demand. The agent workflow on Cloud Run depends on the underlying platform for compute, so the team focuses on agent logic rather than infrastructure. When an event arrives, the hosted workflow runs, data flows from the agent to each tool through API calls, and returned data guides the next step. This pattern fits agents that combine reasoning with action because one hosted environment can coordinate many external tools in a single process.
Data persistence and storage for agent context is the system that lets an agent keep files, remember information, and maintain state across complex tasks. AlloyDB for PostgreSQL (opens in a new tab) is one of several database services that hold structured records and vector embeddings, while Cloud Storage holds unstructured objects such as files and datasets. The agent pulls raw content from storage and queries databases for memory and state. Choosing between them depends on whether the agent is storing a file or looking something up.
Cloud Storage is Google Cloud's object storage service for unstructured data such as files, images, and large datasets. In AI architectures, Cloud Storage stores large-scale training data for GPU and TPU clusters, and Cloud Storage FUSE lets AI and machine learning workloads read that data as if it were a local file system. Cloud Storage also backs static assets for services like App Engine. Choose Cloud Storage when the agent needs to keep or retrieve a blob of content, such as a document, image, or model artifact, rather than a record it will filter or join.
Database services hold the structured and vector data that agents query to remember context and maintain persistent state. AlloyDB for PostgreSQL can act as the vector store in a retrieval-augmented generation (RAG) architecture, holding embeddings that an agent searches to ground its answers. Cloud SQL plays the same RAG role in infrastructure built on Google Kubernetes Engine (GKE). Spanner supports multi-tier applications deployed in a global topology, while BigQuery and Bigtable support analytical and high-throughput workloads, and a multimodal GraphRAG architecture consolidates fragmented multimodal data into a searchable knowledge graph.
Choosing between Cloud Storage and databases depends on the shape of the data and the kind of access the agent needs. Cloud Storage keeps objects for file-based retrieval, while databases keep records and embeddings for filtered queries, joins, and similarity search. The two layers often work together in one flow: the agent pulls a raw document from Cloud Storage, sends it through a processing step, and writes the resulting embeddings or records into a database such as AlloyDB.
| Service | Data shape | Agent use |
|---|---|---|
| Cloud Storage | Unstructured objects such as files, images, and datasets | Storing training data, static assets, and file-based context |
| AlloyDB for PostgreSQL | Structured records and vector embeddings | Vector store for RAG retrieval |
| Cloud SQL | Structured records and vector embeddings | RAG infrastructure on GKE |
| Spanner | Structured records across regions | Global multi-tier application state |
| BigQuery / Bigtable | Analytical and high-throughput records | Large-scale query and lookup workloads |
Specialized AI APIs for multimodal interaction are pre-built Google Cloud services that let an agent work with speech, other languages, and structured documents instead of plain text only. Conversational AI (opens in a new tab) groups these capabilities as Language and Voice processing APIs, alongside pre-trained models such as Document AI, Vision AI, Natural Language API, and Video Intelligence API. A developer calls the API that already understands a specific format, and the agent uses the returned result. No model training is required to use them.
Voice APIs convert between spoken audio and written text so an agent can hear a user and reply out loud. Speech-to-Text transcribes spoken voice to text, and Text-to-Speech synthesizes written text into a human-sounding voice. Together they form a loop where user audio flows into Speech-to-Text, the resulting text flows to the agent for processing, and the agent's text reply flows into Text-to-Speech, which returns audio to the user. Text-to-Speech Custom Voice extends this by training a custom voice model from studio-quality recordings to create a unique brand voice.
Language APIs handle text that is in another language or that needs to be interpreted for meaning. Translation translates text between languages and supports uses such as translating documents, website content, and multilingual chatbot conversations. Natural Language analyzes text to understand it, so an agent can act on meaning rather than raw characters. Translation lets the agent serve users who speak a different language, while Natural Language lets the agent interpret what those users actually mean.
Document AI (opens in a new tab) is a pre-trained model for extracting data and analyzing content from structured business documents such as reports, invoices, receipts, financial transactions, and contracts. Its output can highlight possible errors or compliance issues, identify potential risks, or uncover anomalies that indicate fraud. Document AI belongs to a family of pre-trained traditional AI models that also includes Vision AI, Natural Language API, and Video Intelligence API. A pre-trained model is the fastest path when its built-in capabilities already match the use case.
| API | What it does | Choose it when |
|---|---|---|
| Speech-to-Text | Transcribes spoken voice to text | An agent must accept audio input |
| Text-to-Speech | Synthesizes written text to a human voice | An agent must reply with audio |
| Text-to-Speech Custom Voice | Trains a custom voice from studio-quality recordings | A unique brand voice is required |
| Translation | Translates text between languages | Content or conversations are multilingual |
| Document AI | Extracts and analyzes data from business documents | Input arrives as invoices, receipts, or contracts |
Choosing between a pre-trained API and custom training follows an ordered path that starts with pre-trained models and moves to custom work only if they fall short:
A decision tree starting with a task requirement: if a pre-trained AI model such as Document AI meets the requirements, use it with no training; otherwise, check for sufficient training data and choose between custom training for high control or generative AI for faster go-to-market.
Exam tip: A pre-trained API is the first option to check for classification or detection; custom training is only considered when the pre-trained model cannot meet the requirements and enough training data exists.
Conversational agent platforms are the agent layer that calls specialized APIs as tools. Dialogflow ES builds small to medium, simple to moderately complex virtual agents, while Dialogflow CX builds large and complex ones. Contact Center AI (CCAI) applies the same APIs to contact centers, with CCAI Insights processing conversations to identify call drivers and sentiment and Agent Assist supporting human agents with real-time help during calls and chats. In each case, the specialized API supplies one capability such as hearing, speaking, translating, or reading a document, and the agent decides when to use it.
Choose Cloud Storage when the agent needs to keep or retrieve unstructured objects such as files, images, and datasets, and choose a database such as AlloyDB for PostgreSQL when the agent needs structured records and vector embeddings for filtered queries, joins, and similarity search. The two layers often work together where the agent pulls a raw document from Cloud Storage, sends it through a processing step, and writes the resulting embeddings or records into AlloyDB for PostgreSQL.
Cloud Run is a serverless execution environment that hosts agent logic packaged as a workload and executes outward API calls to tools such as storage, databases, and connected apps, with results flowing back into the workflow to guide the next action. For example, an n8n agentic workflow hosted on Cloud Run stays available to handle work while traffic flows outward to each connected app or service and back into the workflow.
Speech-to-Text transcribes spoken voice to text and Text-to-Speech synthesizes written text into a human-sounding voice, together forming a loop where user audio flows into Speech-to-Text, the resulting text flows to the agent for processing, and the agent text reply flows into Text-to-Speech which returns audio to the user. Choose Speech-to-Text when an agent must accept audio input and Text-to-Speech when an agent must reply with audio.
Use Document AI when input arrives as structured business documents such as reports, invoices, receipts, financial transactions, and contracts because it extracts and analyzes data to highlight possible errors or compliance issues, identify potential risks, or uncover anomalies that indicate fraud. As a pre-trained model, it requires no model training if its built-in capabilities already match the use case, with custom training considered only if it cannot meet the requirements and enough training data exists.
An enterprise is developing an interactive generative AI agent to automate customer support workflows. When a user requests an order cancellation or account update, the agent must execute custom business logic and interact with external enterprise APIs in real time.
The architecture team requires an execution environment that automatically handles unpredictable request traffic, runs tool code in response to HTTP requests or events, and scales down to zero when idle to control infrastructure costs.
Which Google Cloud compute service should the team deploy to host these agent tool execution endpoints?
Dynamic Workload Scheduler
Cloud Run
Cloud Storage
Cloud Scheduler
Last updated