The Outer Loop: How Google Cloud and AlphaEvolve are Defining Agentic Governance and Self-Evolution

The fastest-moving conversation in AI developer tooling this year began with a simple inversion of roles.

As Anthropic’s Claude Code lead Boris Cherny famously observed, the era of typing one prompt after another is drawing to a close: “My job is to write loops.” Urged by architectural pioneers like Peter Steinberger and codified by frameworks defined by Google engineers like Addy Osmani, this movement has found its name: Loop Engineering.

But as the ecosystem matures in 2026—with developers evaluating the capabilities of OpenAI’s Codex, Anthropic’s Claude 4, Moonshot’s Kimi K3, and Google’s own Antigravity orchestrator—a critical question emerges for the enterprise.

How do we move from the Inner Loop of agent development (Day 0) to the Outer Loop of agent governance, operations, and autonomous optimization (Day 2)?

At Google Cloud, we see this landscape dividing into two sophisticated paradigms:

  1. Developer-Led Governance Loops via Agent Development Kit (ADK)

  2. Autonomous Self-Evolving Loops via Google DeepMind’s AlphaEvolve.


The Anatomy of an Enterprise Loop

A traditional cron job runs a fixed script. An agentic loop runs a model that reads the current state and chooses its next action.

According to established patterns, a robust, production-grade loop requires five architectural primitives and a persistent state layer:

  1. Automations: Scheduled processes for discovery and failure triage.

  2. Worktrees: Isolated workspaces (such as git worktrees) preventing parallel agents from branch corruption.

  3. Skills: Codified project knowledge (e.g., SKILL.md) that replaces vague prompt guesswork.

  4. Connectors: Audited API and database access via the Model Context Protocol (MCP).

  5. Sub-Agents: A strict “Maker vs. Checker” architectural split.

  6. State Tracking (The Memory Bank): Externalized fact storage to prevent context window bloat and “comprehension debt.”

To see how Google Cloud implements State Tracking seamlessly across environments, consider this cross-platform Memory Bank pattern used in the Google ADK:

Technical Deep Dive: The Cross-Platform hot-Cache

Instead of burning tokens re-reading a 50-page technical specification every turn, an ADK agent proactively uses a externalized JSON hot-cache for its “Brain”:

TypeScript (ADK Tool for Inner Loop):

import { FunctionTool } from '@google/adk';

import fs from 'fs-extra';

import path from 'path';

const MEMORY_FILE = path.join(process.cwd(), 'data/memory_bank.json');

export const memoryBankTool = new FunctionTool({

 name: "memory_bank",

 description: "A persistent memory store. Use to save important session facts.",

 parameters: z.object({

   action: z.enum(['save', 'retrieve', 'clear']),

   key: z.string().optional(),

   value: z.string().optional()

 }),

 async execute({ action, key, value }: any) {

   // Read/Write logic to hot-cache state on disk

   // ...

 }

} as any);


Python (Agent Runtime for Outer Loop):

import os, json

from datetime import datetime

MEMORY_FILE = os.path.join(os.getcwd(), 'data', 'memory_bank.json')

def memory_bank_tool(action: Literal['save', 'retrieve', 'clear'], key: str = None, value: str = None):

   """A persistent memory store for high-performance reasoning in the cloud."""

   # Production-grade read/write logic for Agent Runtime

   # ...

By shifting from a passive prompt model to instructing the agent to manage its own cache, we reduce latency and token burn simultaneously.


Level 1: The Outer Loop (ADK & The Agent Quality Flywheel)

When orchestrating enterprise fleets—whether your agents rely on Gemini 3.5 Flash, Claude, or Kimi K3—the challenge is Governance-as-Code.

At Cloud Next '26, we introduced the Agent Quality Flywheel. Built for the Google ADK and driving via orchestrators like Antigravity, this framework establishes an independent, five-stage evaluation and optimization pipeline: Build & Test → Ship & Monitor → Learn & Refine.

The architectural invariant of the Flywheel is simple: The optimizer never grades its own work.

While the “Maker” agent proposes fixes to code or system prompts, the Gemini Enterprise Agent Platform Evaluation Service scores the trajectory independently using adaptive AutoRaters (developed in close partnership with Google DeepMind). This ensures that agents optimize for actual user intent rather than gaming a scoring function.

Furthermore, this Outer Loop allows enterprises to track Reasoning Density (RD)—a core FinOps KPI that measures solution quality against token consumption, enabling developers to safely route tasks from high-tier models like Gemini 3.0 Pro to high-speed models like Gemini 3.5 Flash.


Level 2: The Self-Evolving Loop (AlphaEvolve by Google DeepMind)

While the ADK Flywheel governs the usage and tuning of agents, Google DeepMind’s AlphaEvolve shifts the leverage point to the creation of the code itself.

AlphaEvolve is an autonomous, self-evolving loop designed for non-convex optimization and algorithm discovery. It is the tool that successfully improved Strassen’s matrix multiplication algorithm for the first time in 56 years and optimized Google’s own data center scheduling.

Unlike a developer-driven loop, AlphaEvolve relies on an internal evolutionary database powered by two advanced logic engines:

  • MAP Elites: Retains the single best candidate program per metric, maintaining a diverse Pareto frontier.

  • Islands: Runs independent subpopulations with periodic resets to prevent the LLM ensemble from falling into premature convergence or local plateaus.

You provide the seed program and a deterministic, O(10-minute) three-tier evaluator (Validation, Verification, and Evaluation). AlphaEvolve’s server-side API then iteratively mutates, crosses-over, and tests thousands of variants until state-of-the-art efficiency is achieved.


Architectural Mapping: Manual vs. Autonomous Loops

To help architectures navigate this Day 2 landscape, we map the roles of these loops across the modern agentic stack:


Build the Line, Stay the Architect

Developers in 2026 have moved from prompt engineering to context engineering to harness engineering. Now, we are designing the production lines that govern these lathes.

Whether you are implementing the ADK Agent Quality Flywheel to secure your production agents against trajectory drift and PII leakage, or leveraging AlphaEvolve to rewrite your core mathematical libraries, Google Cloud provides the tools you need to govern and optimize your fleet of agents.

As you build these systems, remember the core heuristic of the 2026 landscape: A loop running unattended is also a loop making mistakes unattended.

Design the loop. Govern the intelligence. And build with the expectation of remaining the architect.

Get Started with Day 2 Operations:

  • Read the full Agent Development Kit Documentation.

  • Install the agent-platform-eval-flywheel to bridge your existing agents into the Google Cloud Evaluation service.

  • Contact your Google Cloud account team for an assessment on AlphaEvolve suitability for your complex algorithmic challenges.

3 Likes