eCommerceNews Asia - Technology news for digital commerce decision-makers
Asia
Google outlines runtime schema checks for AI agents

Google outlines runtime schema checks for AI agents

Fri, 3rd Jul 2026 (Today)
Sean Mitchell
SEAN MITCHELL Publisher

Google has outlined a design pattern for building AI agents that fetch and validate data schemas at runtime instead of loading them into prompts from the start. The approach is aimed at developers using Google's Agent Development Kit and Gemini 3 Flash.

The method centres on what Google calls Context-Aware Polymorphic Schema Validation. An agent first identifies a user's intent, then retrieves only the relevant schema from a central registry and validates each field through separate programmatic checks before passing data to downstream systems.

The proposal addresses a problem emerging as companies try to move generative AI from basic chat interfaces to more autonomous workflows involving multiple agents, varied data formats and changing application interfaces. In those environments, developers often preload every possible schema, tool definition and validation rule into a system prompt so the model can handle many tasks from a single starting point.

That model breaks down as complexity rises, Google argued, because prompts grow larger, response times increase and the model can confuse one schema with another. Maintaining prompts and validation logic separately also creates extra work when business rules change.

How it works

Under the design, schemas sit outside the prompt and the main application code in a metadata registry, such as Cloud Storage. Each schema descriptor contains field definitions, mapping rules that translate user inputs into system parameters, and references to validation hooks that apply specific checks such as regular expressions or range limits.

The agent begins with a short discovery prompt rather than a large instruction set. It uses that initial exchange to determine the user's intent, such as the type of document or transaction being requested.

Once the intent is identified, the agent calls a tool to load the relevant descriptor from the registry. That descriptor then becomes the active context for the task.

After the schema is loaded, the system moves into an assembly and validation loop. The agent asks the user for the required fields one by one, sends each raw response to a validator running separately on Cloud Run, and commits that field to the master JSON payload only if validation succeeds.

If a check fails, the validator returns an error code and the agent asks the user to correct the input. The payload is released to downstream enterprise APIs or handed to another agent only when it fully matches the schema requirements.

Component roles

In Google's description, the Agent Development Kit manages the multi-agent workflow, state transitions and tool-calling steps. Gemini 3 Flash serves as the reasoning model during the repeated discovery and validation cycle.

Cloud Storage holds the JSON schema descriptors, while Cloud Run functions carry out validation checks tied to the metadata in those descriptors. That separation means structural rules can be changed by updating registry files rather than redeploying application code.

Google presented an example schema descriptor for a travel expense workflow. In that example, fields such as amount and receipt ID are defined with descriptions and linked validation hooks, allowing the system to check whether the amount falls within bounds or whether an identifier matches a required pattern.

Operational focus

Google framed the design as a way to reduce token use by keeping large volumes of irrelevant schema data out of the context window. It also said the approach could reduce the risk of what it called attention diffusion, where a model mixes fields or validation rules from one inactive schema into another active request.

Another claimed advantage is operational flexibility. If a company needs to support a new product type, update a data field or change a compliance rule, it can update the registry directly and use the revised schema on the next agent turn.

The design also aims to impose stricter controls on handoffs between agents. Multi-agent systems can fail quietly when one agent passes malformed or incomplete state to another, and Google said runtime validation at each stage provides a deterministic check before state moves onward.

The broader message is that AI agent design may need to separate reasoning from structural data requirements as deployments scale. Rather than asking a model to carry every possible business rule in memory from the start, Google is arguing for systems that discover context first and fetch validation logic only when needed.

By binding prompt instructions to programmatic validation rules through a central registry, Google said, "Outbound context payloads are systematically checked and corrected before hitting expensive enterprise applications."