<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Flórez Fernández on Medium]]></title>
        <description><![CDATA[Stories by David Flórez Fernández on Medium]]></description>
        <link>https://medium.com/@florez.fernandez.david?source=rss-91cfb74fcedd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cCXs_eOQt23AiqhiDlamHw@2x.jpeg</url>
            <title>Stories by David Flórez Fernández on Medium</title>
            <link>https://medium.com/@florez.fernandez.david?source=rss-91cfb74fcedd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 04:07:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@florez.fernandez.david/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Put a LiteLLM Gateway in Front of Google Antigravity]]></title>
            <link>https://medium.com/google-cloud/how-i-put-a-litellm-gateway-in-front-of-google-antigravity-71b112bd8857?source=rss-91cfb74fcedd------2</link>
            <guid isPermaLink="false">https://medium.com/p/71b112bd8857</guid>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-antigravity]]></category>
            <dc:creator><![CDATA[David Flórez Fernández]]></dc:creator>
            <pubDate>Wed, 18 Nov 2026 01:21:48 GMT</pubDate>
            <atom:updated>2026-11-18T01:21:48.878Z</atom:updated>
            <content:encoded><![CDATA[<p>One Cloud Run service, one API key, and Gemini, Claude and Grok behind the same agy CLI. Here’s the setup, the config, and the parts that tripped me up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xrodZWVCiQ2aU5XN-8X6Ug.png" /><figcaption>LiteLLM on Cloud Run in front of the Antigravity CLI</figcaption></figure><p>Out of the box, the Antigravity CLI (agy) talks straight to Google. Each developer signs in with a Google account, and that’s it.</p><p>That’s fine for one person. It gets awkward for a team. You can’t easily decide which models people see, you can’t put a budget on anyone, and a security review will ask why every laptop is calling a model API directly.</p><p>Antigravity has an answer for this: an enterprise gateway mode. You run a gateway, agy sends every request to it with an API key, and the gateway calls the models. I built a small open-source repo that does this with LiteLLM Proxy on Cloud Run, deployed with one script:</p><p>Repo: <a href="http://github.com/DavidFlorez/agy-litellm-gateway-demo">github.com/DavidFlorez/agy-litellm-gateway-demo</a></p><p>This post walks through how it works and how to set it up. One disclaimer up front: this is a personal community project, not an official Google product.</p><h3>Why put a gateway in front of Antigravity?</h3><p>Three reasons pushed me to it:</p><ul><li>Choosing the models. The gateway decides which models exist. Developers only see the ones you approve, and you can put Gemini, Claude and other providers behind one endpoint.</li><li>No Google credentials on laptops. Developers hold a gateway API key. The gateway calls Google as its own service account, which only has roles/aiplatform.user.</li><li>One place to add controls. Aliases, retries, fallbacks, and later per-developer keys and budgets all live in the gateway instead of on each machine.</li></ul><p>One billing detail is worth knowing before you start. Google’s docs say gateway traffic is billed pay-as-you-go through Gemini Enterprise Agent Platform (formerly Vertex AI). It doesn’t use the seat-based Gemini Enterprise quotas, and you can’t use the gateway and a Google sign-in at the same time.</p><h3>The architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FCVTRm92vSozt1xT-RcKkA.png" /><figcaption>Antigravity sends GenAI requests with a bearer key to LiteLLM on Cloud Run, which routes to Gemini natively and to Model Garden partners through an adapter</figcaption></figure><p>The flow is short:</p><ol><li>agy reads two files on the developer’s machine: admin_settings.json and gateway.env.</li><li>It sends each request to the gateway as POST /v1beta/models/{model}:streamGenerateContent?alt=sse, with Authorization: Bearer &lt;gateway key&gt;.</li><li>LiteLLM checks the key against a master key that Cloud Run injects from Secret Manager.</li><li>The router resolves aliases and handles retries and fallbacks.</li><li>Gemini requests pass straight through to Vertex AI. Claude and Grok requests go through LiteLLM’s Google GenAI adapter, which translates them for the partner model on Model Garden.</li></ol><p>The key point is the wire protocol. By default agy doesn’t speak OpenAI Chat Completions. It speaks Google’s GenAI protocol (generateContent / streamGenerateContent). LiteLLM already exposes those endpoints, which is why it fits here.</p><p>These are the models in the repo’s config.yaml:</p><ul><li>Gemini on Vertex AI: gemini-3.8-flash, gemini-3.7-flash, gemini-3.1-pro-preview. These need no extra activation.</li><li>Claude on Model Garden: claude-sonnet-5, claude-opus-5, claude-opus-5–5, claude-fable-5. Each has to be enabled once per project.</li><li>Grok on Model Garden: grok-4.7, routed as vertex_ai/xai/grok-4.7.</li><li>Commented out: older Gemini 2.5 and Claude 4.x models, plus examples for the direct Anthropic API, OpenAI and AWS Bedrock.</li></ul><h3>What you need</h3><ul><li>gcloud, curl, openssl and awk, and a gcloud auth login.</li><li>A GCP project with billing on, where you’re Owner (or Editor plus Security Admin).</li><li>Optionally, Claude or Grok enabled in Model Garden. You can skip this and do it later; Gemini works without it.</li><li>A recent agy. Google’s docs list Antigravity CLI 1.2.15 or later for gateway mode.</li></ul><h3>Step 1: Deploy the gateway</h3><pre>git clone https://github.com/DavidFlorez/agy-litellm-gateway-demo<br>cd agy-litellm-gateway-demo<br>./deploy.sh - project YOUR_GCP_PROJECT_ID</pre><p>The README estimates about 3–5 minutes, and the script is safe to re-run. It does eight things:</p><ol><li>Pre-flight checks: tools installed, gcloud logged in, project access.</li><li>Enables the APIs it needs: Cloud Run, Vertex AI, Cloud Build, Artifact Registry and Secret Manager.</li><li>Creates a service account, antigravity-gateway-sa, with only roles/aiplatform.user.</li><li>Generates a random 256-bit gateway key (sk-agy-…), or reuses an existing one, in Secret Manager as antigravity-gateway-api-key.</li><li>Builds and deploys the container to Cloud Run.</li><li>Sends a tiny test request to every model in config.yaml to see which ones your project can actually serve.</li><li>Writes admin_settings.json and gateway.env, containing only the models that answered.</li><li>Runs the end-to-end test script.</li></ol><p>The container is just the upstream LiteLLM image plus two files:</p><pre>ARG LITELLM_IMAGE=ghcr.io/berriai/litellm:main-latest@sha256:a69f5f0c…<br>FROM ${LITELLM_IMAGE}<br>WORKDIR /app<br>COPY config.yaml /app/config.yaml<br>COPY callbacks.py /app/callbacks.py<br>ENV PORT=8080<br>CMD [&quot; - config&quot;, &quot;/app/config.yaml&quot;, &quot; - port&quot;, &quot;8080&quot;]</pre><p>I pin the image by digest (LiteLLM v1.105.0) on purpose. main-latest moves several times a week, and callbacks.py hooks into LiteLLM internals, so an unpinned upgrade could quietly break it.</p><h3>Step 2: Understand the LiteLLM config</h3><p>config.yaml has four parts. First, the model list. Each model_name is exactly what a developer types in agy — model:</p><pre>model_list:<br> - model_name: gemini-3.8-flash<br> litellm_params:<br> model: vertex_ai/gemini-3.8-flash<br> vertex_project: os.environ/GCP_PROJECT_ID<br> vertex_location: global<br>- model_name: claude-opus-5<br> litellm_params:<br> model: vertex_ai/claude-opus-5<br> vertex_project: os.environ/GCP_PROJECT_ID<br> vertex_location: global</pre><p>There are no keys in this file. Vertex AI calls authenticate as the Cloud Run service account, and the project ID comes from an environment variable the deploy script sets.</p><p>Second, the router: aliases and fallbacks.</p><pre>router_settings:<br> routing_strategy: simple-shuffle<br> num_retries: 2<br> timeout: 600<br> allowed_fails: 3<br> cooldown_time: 30<br>model_group_alias:<br> gemini-3.8-flash-low: gemini-3.8-flash<br> gemini-3.8-flash-medium: gemini-3.8-flash<br> gemini-3.8-flash-high: gemini-3.8-flash<br> opus-5: claude-opus-5<br> claude-opus-5-thinking: claude-opus-5<br>fallbacks:<br> - gemini-3.8-flash: [gemini-3.7-flash]<br> - gemini-3.1-pro-preview: [gemini-3.8-flash]<br> - claude-opus-5–5: [claude-opus-5, claude-sonnet-5]<br> - claude-opus-5: [claude-sonnet-5]</pre><p>The aliases matter more than they look. agy asks for names like gemini-3.8-flash-low, with the thinking tier in the name, and the gateway has to map those back to a real model. (The real file has more aliases; this is a trimmed version.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nVvBBYkrWPigP1WxOqHJHw.png" /><figcaption>Fallback chains from config.yaml</figcaption></figure><p>Third, the runtime settings, including the compatibility plugin:</p><pre>litellm_settings:<br> drop_params: true<br> modify_params: true<br> set_verbose: false<br> callbacks:<br> - callbacks.antigravity_compat</pre><p>Fourth, auth:</p><pre>general_settings:<br> master_key: os.environ/LITELLM_MASTER_KEY</pre><h3>Step 3: Why there’s a callbacks.py at all</h3><p>This was the hardest part of the project. LiteLLM translates GenAI requests for non-Gemini models, but Antigravity’s Go client serializes requests with protojson, and that produces a few things strict providers like Claude on Vertex reject. The plugin fixes five of them:</p><ul><li>Numbers sent as strings. protojson writes schema limits like “minItems”: “2”. The plugin turns them into real integers and lowercases types like “OBJECT” to “object”. It also strips Gemini-only keys such as propertyOrdering and nullable.</li><li>Multi-part system prompts. agy splits its system instruction across several parts, and upstream LiteLLM only read the first. The plugin joins them, so rules and workspace context aren’t silently dropped.</li><li>Tool call IDs. Anthropic requires a unique ID per tool call. The plugin assigns IDs like call_&lt;name&gt;_&lt;n&gt; and matches each response to its call.</li><li>Zero-argument tool calls. When Claude streams a tool call with {} arguments, the plugin flushes it when the stream finishes instead of losing it.</li><li>Thinking levels. If a Gemini 3 request with thinkingLevel falls back to a model that uses a token budget, the plugin maps HIGH/MEDIUM/LOW/MINIMAL to 16384/8192/2048/1024 tokens.</li></ul><p>If you’re building your own gateway for agy with something other than LiteLLM, this list is the useful part. I wrote it all up in more detail in PROXY_CONFIG_AGY_COMPATIBILITY.md in the repo.</p><h3>Step 4: Point Antigravity at the gateway</h3><p>The deploy script writes two files. You need both.</p><p>admin_settings.json tells agy where the gateway is, which key to send, and which models to show:</p><pre>{<br> &quot;gateway&quot;: {<br> &quot;enabled&quot;: true,<br> &quot;url&quot;: &quot;https://YOUR-GATEWAY-URL.run.app&quot;,<br> &quot;apiKey&quot;: &quot;REPLACE_WITH_YOUR_GATEWAY_API_KEY&quot;,<br> &quot;wireProtocol&quot;: &quot;genai&quot;,<br> &quot;customHeaders&quot;: { &quot;X-Cost-Center&quot;: &quot;Core-Engineering&quot; }<br> },<br> &quot;models&quot;: {<br> &quot;defaultModelId&quot;: &quot;gemini-3.8-flash&quot;,<br> &quot;list&quot;: [<br> { &quot;modelId&quot;: &quot;gemini-3.8-flash&quot; },<br> { &quot;modelId&quot;: &quot;claude-opus-5&quot; }<br> ]<br> },<br> &quot;auth&quot;: { &quot;suppressInteractiveLogin&quot;: true }<br>}</pre><p>That’s shortened. The generated file also repeats the model list under gateway.models, and adds a filter array plus a display name for each model.</p><p>gateway.env sets the same values as environment variables:</p><pre>export AGY_LLM_GATEWAY_URL=&quot;https://YOUR-GATEWAY-URL.run.app&quot;<br>export AGY_LLM_GATEWAY_API_KEY=&quot;&lt;your-gateway-api-key&gt;&quot;<br>export AGY_LLM_GATEWAY_HEADERS=&quot;X-Cost-Center: Core-Engineering&quot;<br>export AGY_LLM_GATEWAY_MODELS=&quot;gemini-3.8-flash,gemini-3.7-flash,claude-opus-5&quot;</pre><p>Install them on Linux:</p><pre>sudo install -d -m 755 /etc/antigravity<br>sudo install -m 644 admin_settings.json /etc/antigravity/admin_settings.json<br>source gateway.env</pre><p>On macOS, the settings file goes in /Library/Application Support/Antigravity/. On Windows, it goes in %ProgramData%\Antigravity\. The README has the PowerShell version.</p><p>Two details cost me time:</p><ul><li>Use install -m 644, not sudo cp. With a plain copy the file stays readable only by root. agy can’t read it and silently falls back to the normal consumer model list. There’s no error.</li><li>Source gateway.env too. AGY_LLM_GATEWAY_MODELS is how agy discovers partner models like claude-opus-5. Without it you get model X is not recognized.</li></ul><p>Per Google’s docs, admin_settings.json wins over environment variables, which win over the user settings file. Since the admin file lives in a root-owned path, developers can’t override what you set in it.</p><h3>Step 5: Verify</h3><pre>agy models<br>agy - model gemini-3.8-flash-low -p &quot;Explain binary search&quot;<br>agy - model claude-opus-5 -p &quot;Explain binary search&quot;</pre><p>agy models should list only your active gateway models. Gemini 3.x models need a thinking tier (-low, -medium, -high, or — effort); Claude takes the plain ID.</p><p>You can also test the gateway directly, without agy:</p><pre>./scripts/test_gateway.sh https://YOUR-GATEWAY-URL.run.app &quot;$AGY_LLM_GATEWAY_API_KEY&quot;</pre><p>It checks nine things: the health endpoint, that a request with no key gets a 401, that a wrong key is rejected, the model catalog, Gemini streaming, Claude Sonnet 5 and Opus 5 streaming, a Claude tool call using an Antigravity-style schema (with “minItems”: “1” as a string), and the OpenAI-compatible /v1/chat/completions endpoint. Claude checks show SKIP instead of failing when the model isn’t enabled.</p><h3>Adding and removing models</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qx9FuxfHT1t3TMzljZQY-w.png" /><figcaption>The three layers a model has to pass before agy shows it</figcaption></figure><p>A model only appears in agy models if it passes three layers, in order:</p><ol><li>Model Garden: your project is allowed to call it. Gemini always is.</li><li>config.yaml: the gateway knows about it. This file is baked into the container.</li><li>The client files: admin_settings.json and gateway.env list it.</li></ol><p>So the commands depend on where the change is:</p><pre># Enabled a model that&#39;s already in config.yaml (no rebuild; README says ~5 s)<br>./deploy.sh - project P - service S - sync-models<br># Added or removed a model in config.yaml (full rebuild; README says ~3–5 min)<br>./deploy.sh - project P - service S<br># Either way, finish on each machine<br>sudo install -m 644 admin_settings.json /etc/antigravity/admin_settings.json &amp;&amp; source gateway.env</pre><p>The model check prints one status per model. ACTIVE means it answered a test request with fallbacks turned off. INACTIVE with a 404/403 means it isn’t enabled in Model Garden. INACTIVE with a 429 means it’s enabled but your project has zero quota for it.</p><p>Turning fallbacks off during that check matters. Without it, a disabled Claude model would quietly fall back to another model, return 200, and get reported as working.</p><p>Listing models you haven’t enabled yet is fine. They stay hidden from developers, the deploy still passes, and enabling them later only needs — sync-models.</p><h3>Security, briefly</h3><ul><li>agy sends a static bearer key. That’s why the repo doesn’t use Identity-Aware Proxy, which expects a short-lived Google identity token in that same header and would reject the CLI.</li><li>The key lives in Secret Manager, and only the gateway’s service account can read it. Rotating it is one command, and the old version gets disabled:</li></ul><pre>./deploy.sh - project YOUR_GCP_PROJECT_ID - api-key &quot;sk-agy-$(openssl rand -hex 32)&quot;</pre><ul><li>If an org policy blocks public Cloud Run services, the script switches to — no-invoker-iam-check. LiteLLM still enforces the key.</li></ul><h3>Gotchas and limitations</h3><p>I want to be clear about what this repo is and isn’t:</p><ul><li>It’s public by default. The service deploys with — allow-unauthenticated, so the API key is the only lock. Google’s own gateway guide says to keep the gateway on your corporate network, not on a public endpoint. For anything beyond a demo, follow the README’s hardening section: a load balancer with a Cloud Armor allowlist, or internal ingress over VPN.</li><li>One shared key, no budgets yet. The default setup has no database. Per-developer keys, spend tracking and budgets need Postgres (for example Cloud SQL) and LiteLLM’s admin UI. The README lists the steps, but the one-command deploy doesn’t do it.</li><li>The 600-second timeout. Cloud Run and the router are both set to 600 seconds. Google’s guide recommends allowing at least 60 minutes so long streaming responses aren’t cut off. I haven’t tested whether 10 minutes is enough for long agent turns.</li><li>Attribution headers and telemetry. Google’s guide says a gateway should forward User-Agent and X-Goog-Api-Client to Google and answer agy’s background POST /v1beta:* metric calls with a 200. The repo doesn’t handle either explicitly, and I haven’t confirmed how LiteLLM treats them.</li><li>X-Cost-Center is only a label. agy sends it, but nothing in the gateway uses it yet. Google’s docs also warn that headers set from a developer’s machine shouldn’t be trusted for billing.</li><li>Cold starts. With zero minimum instances, the first request after idle is slow (the README estimates 10–20 seconds). — min-instances 1 fixes it, but costs money.</li><li>The plugin depends on LiteLLM internals. That’s why the image is pinned. After any upgrade, re-run the test script.</li><li>External providers are outside the one-command flow. The config shows how to add the Anthropic API, OpenAI or Bedrock. You have to wire their keys into Secret Manager yourself, and that traffic leaves GCP.</li><li>I didn’t benchmark it. The repo has no latency or cost measurements, so I’m not quoting any. The test script tells you it works, not how fast it is.</li></ul><h3>Wrapping up</h3><p>The setup comes down to three pieces: a LiteLLM config that lists the models and maps agy’s model names, a small plugin that smooths out protojson quirks for non-Gemini models, and two client files that point agy at the gateway. The deploy script wires them together and only shows developers the models that actually work.</p><p>If you try it, I’d like to hear what breaks. Especially if you run it with a provider I haven’t tested.</p><p>Repo: <a href="http://github.com/DavidFlorez/agy-litellm-gateway-demo">github.com/DavidFlorez/agy-litellm-gateway-demo</a></p><p>Thanks to Ichsan Rahardianto, who wrote most of the commits in the repo.</p><p>References: <a href="https://docs.cloud.google.com/gemini/enterprise/docs/ai-developer-tools/deploy-enterprise-gateway">Google Cloud: Configure an enterprise gateway for Antigravity</a> · <a href="https://docs.cloud.google.com/gemini/enterprise/docs/ai-developer-tools/connect-enterprise-gateway">Google Cloud: Connect Antigravity to an enterprise gateway</a> · <a href="https://docs.litellm.ai/docs/generateContent">LiteLLM: generateContent via the proxy </a>· <a href="https://docs.litellm.ai/docs/generateContent">LiteLLM: proxy config</a> · <a href="https://docs.litellm.ai/docs/proxy/reliability">LiteLLM: fallbacks and reliability</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71b112bd8857" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/how-i-put-a-litellm-gateway-in-front-of-google-antigravity-71b112bd8857">How I Put a LiteLLM Gateway in Front of Google Antigravity</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating to Gemini 3: Implementing Stateful Reasoning with Thought Signatures]]></title>
            <link>https://medium.com/google-cloud/migrating-to-gemini-3-implementing-stateful-reasoning-with-thought-signatures-4f11b625a8c9?source=rss-91cfb74fcedd------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f11b625a8c9</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[gemini]]></category>
            <dc:creator><![CDATA[David Flórez Fernández]]></dc:creator>
            <pubDate>Mon, 01 Dec 2025 00:49:05 GMT</pubDate>
            <atom:updated>2025-12-01T00:49:05.620Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l2rzwa3QDpWNw2EdYzqRlg.jpeg" /></figure><p>Gemini 3 introduces a mandatory architectural change for handling reasoning states: the <strong>Thought Signature</strong>. This mechanism replaces the stateless paradigm of previous versions with a serialized state model, specifically for high-reliability workflows like Function Calling.</p><p>This guide details the technical specifications of Thought Signatures, the deprecation of thinking_budget, and the required code modifications to migrate from Gemini 2.5 to Gemini 3 immediately.</p><h3>Architectural Change: The Thought Signature</h3><p>In Gemini 2.5, reasoning was implicit and stateless, the model re-evaluated context at every turn. Gemini 3 exposes the internal reasoning state via a <strong>Thought Signature</strong>.</p><p>A Thought Signature is an encrypted, opaque token string returned in the API response. It encapsulates the model’s hidden states and intermediate computation results.</p><p>When performing multi-turn operations (specifically Function Calling), the client <strong>must</strong> pass this signature back in the subsequent request. This ensures the model resumes execution from the exact state where it halted, rather than re-computing context from the raw message history. Omission results in an invalid_argument error or non-deterministic behavior.</p><h3>Comparison: Gemini 2.5 vs. Gemini 3</h3><p>The following table summarizes the fundamental shifts in state management and API contracts.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb4c08bb401d75d645db6ab2237a3126/href">https://medium.com/media/eb4c08bb401d75d645db6ab2237a3126/href</a></iframe><h3>Visualizing the State Flow: Function Calls vs. Text Generation</h3><p>The lifecycle of a Thought Signature depends on the response type. Signatures are critical during intermediate steps (Function Calls) but are typically resolved and discarded once the model generates final text output.</p><p>The following table demonstrates the request/response cycle for a multi-step operation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce25d5fef13b24e04b885c29595aafbf/href">https://medium.com/media/ce25d5fef13b24e04b885c29595aafbf/href</a></iframe><p><strong>Technical constraints observed in this flow:</strong></p><ol><li><strong>State Persistence:</strong> Signature_A must be preserved in the history object sent in Step 2.</li><li><strong>State Update:</strong> The model returns Signature_B in Step 2. This represents the cumulative state (User Prompt + Result 1).</li><li><strong>State Resolution:</strong> In Step 3, the model resolves the reasoning into final text. While the API might not <em>strictly</em> validate the signature for the <em>next</em> turn (since the task is “done”), it is recommended to persist this final signature Signature_C.</li></ol><h3>API Migration Guide</h3><p>Two breaking changes require immediate code refactoring: configuration parameters and response parsing.</p><h4>1. Configuration: Deprecating thinking_budget</h4><p>Gemini 3 removes the integer-based thinking_budget in favor of a categorical enum thinking_level.</p><p><strong>Gemini 2.5 (Legacy)</strong></p><pre># DEPRECATED<br>config = genai.GenerationConfig(<br>    thinking_budget=2048 <br>)</pre><p><strong>Gemini 3:</strong></p><pre># VALID<br>config = genai.GenerationConfig(<br>    # &#39;HIGH&#39; enables extended reasoning (Standard for Pro)<br>    # &#39;LOW&#39; enables low-latency routing<br>    thinking_level=&quot;HIGH&quot; <br>)</pre><h4>2. Python Implementation: Capturing the Signature</h4><p>The client application is responsible for persisting the thought_signature from the API response into the chat history. Standard text parsers often discard metadata, this will break Gemini 3 function loops.</p><pre>import google.generativeai as genai<br>from google.api_core.exceptions import InvalidArgument<br><br>config = genai.GenerationConfig(thinking_level=&quot;HIGH&quot;)<br>model = genai.GenerativeModel(&#39;gemini-3-pro-preview&#39;, generation_config=config)<br>chat_history = []<br>def run_turn_with_signature(user_message):<br>    chat_history.append({&quot;role&quot;: &quot;user&quot;, &quot;parts&quot;: [user_message]})<br>    try:<br>        response = model.generate_content(chat_history)<br>        model_parts = []<br>        <br>        for part in response.candidates[0].content.parts:<br>            part_data = type(part).to_dict(part) <br>            <br>            # --- CRITICAL IMPLEMENTATION ---<br>            # Check for thought_signature existence in the response part.<br>            # This field must be persisted to the history object.<br>            if hasattr(part, &#39;thought_signature&#39;) and part.thought_signature:<br>                part_data[&#39;thought_signature&#39;] = part.thought_signature<br>            # -------------------------------<br>            <br>            model_parts.append(part_data)<br>        chat_history.append({&quot;role&quot;: &quot;model&quot;, &quot;parts&quot;: model_parts})<br>        return response.text<br>    except InvalidArgument as e:<br>        print(f&quot;API Error: State validation failed. {e}&quot;)</pre><h3>Troubleshooting: Common Exceptions</h3><p>Correctly identifying signature-related errors is key to debugging.</p><p><strong>1. </strong><strong>400 Invalid Argument: Missing required reasoning state</strong></p><ul><li><strong>Context:</strong> Occurs during Function Response submission.</li><li><strong>Root Cause:</strong> The thought_signature associated with the function_call was excluded from the history array when sending the function_response.</li><li><strong>Resolution:</strong> Ensure the history object passed to generate_content contains the exact signature string received in the previous turn.</li></ul><p><strong>2. </strong><strong>400 Invalid Argument: Field &#39;thinking_budget&#39; is not supported</strong></p><ul><li><strong>Context:</strong> Model initialization.</li><li><strong>Root Cause:</strong> Legacy configuration parameters.</li><li><strong>Resolution:</strong> Replace thinking_budget (int) with thinking_level (enum).</li></ul><p><strong>3. State Invalidation / Hallucination</strong></p><ul><li><strong>Context:</strong> The model re-issues a function call or ignores the provided result.</li><li><strong>Root Cause:</strong> Modification or truncation of the signature string.</li><li><strong>Resolution:</strong> Treat the thought_signature as an immutable binary blob. Do not attempt to compress, sanitize, or log the content of this string in a way that alters it before sending it back to the API.</li></ul><h3>Summary</h3><p>The transition to Gemini 3 moves the API from a stateless request/response model to a stateful execution model for complex tasks. While this increases the complexity of client-side history management, it provides cryptographic assurance of the model’s execution path. Developers must update their persistence layers to treat thought_signature as a mandatory field for all function-calling workflows.</p><h3>Appendix: Gemini 3 Migration Checklist</h3><p>Use this checklist to ensure your codebase is compliant before switching model versions.</p><h3>Phase 1: Code Audit &amp; Configuration</h3><ul><li><strong>Scan for Legacy Parameters:</strong> grep/search codebase for thinking_budget.</li><li><strong>Remove Token Limits:</strong> Delete all integer assignments to thinking_budget.</li><li><strong>Implement Thinking Levels:</strong> Update GenerationConfig to use thinking_level enum.</li><li>Set thinking_level=&quot;HIGH&quot; for complex agents/reasoning.</li><li>Set thinking_level=&quot;LOW&quot; for router/classifier agents.</li><li><strong>Update Model Version:</strong> Change string references from gemini-2.5-* (or older) to gemini-3-pro-preview.</li></ul><h3>Phase 2: State Management (Critical)</h3><ul><li><strong>Update Response Parser:</strong> Modify the function handling response logic to check for thought_signature (or thoughtSignature in JSON) in candidates[0].content.parts[].</li><li><strong>Update History Object:</strong> Ensure the history/context builder explicitly copies the thought_signature from the <em>Model Response</em> into the <em>Next Request</em>.</li><li><strong>Verify Function Loops:</strong> Check that the structure [Model(FC + Sig)] -&gt; [User(FunctionResponse)] contains the signature in the Model part.</li></ul><h3>Phase 3: Persistence &amp; Storage</h3><ul><li><strong>Database Schema Update:</strong> If storing chat history in SQL/NoSQL:</li></ul><p>Add a column/field for thought_signature (Text/Blob). <strong>Warning:</strong> Ensure no character limit truncation (signatures can vary in length).</p><h3>Phase 4: Validation &amp; Testing</h3><ul><li><strong>Unit Test:</strong> Create a mock test case with a hardcoded thought_signature to verify the history builder accepts it.</li><li><strong>Integration Test:</strong> Run a multi-step Function Call (min. 3 turns).</li><li>Verify turn 1 produces a signature.</li><li>Verify turn 2 accepts the signature without 400 Invalid Argument.</li><li><strong>Regression Test:</strong> Verify that standard text-only chat (non-function) still works and correctly terminates the signature chain.</li></ul><h3>References:</h3><ul><li><strong>Gemini 3 Developer Overview</strong></li><li><a href="https://ai.google.dev/gemini-api/docs/gemini-3">https://ai.google.dev/gemini-api/docs/gemini-3</a></li><li><strong>Thought Signatures &amp; State Management</strong></li><li><a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures">https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thought-signatures</a></li><li><strong>Function Calling with Gemini 3</strong></li><li><a href="https://ai.google.dev/gemini-api/docs/function-calling">https://ai.google.dev/gemini-api/docs/function-calling</a></li><li><strong>Model Card: Gemini 3 Pro (Preview)</strong></li><li><a href="https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-pro">https://docs.cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/3-pro</a></li><li><strong>Gemini API Release Notes (November 2025)</strong></li><li><a href="https://ai.google.dev/gemini-api/docs/changelog">https://ai.google.dev/gemini-api/docs/changelog</a></li></ul><h3>Relevant Blog Announcements</h3><ul><li><strong>Building AI Agents with Google Gemini 3</strong></li><li><a href="https://developers.googleblog.com/building-ai-agents-with-google-gemini-3-and-open-source-frameworks/">https://developers.googleblog.com/building-ai-agents-with-google-gemini-3-and-open-source-frameworks/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f11b625a8c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/migrating-to-gemini-3-implementing-stateful-reasoning-with-thought-signatures-4f11b625a8c9">Migrating to Gemini 3: Implementing Stateful Reasoning with Thought Signatures</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Google Cloud (Agent) Platform]]></title>
            <link>https://medium.com/google-cloud/the-google-cloud-agent-platform-0a3c99ea7a7c?source=rss-91cfb74fcedd------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a3c99ea7a7c</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agent-development-kit]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[vertex-ai]]></category>
            <category><![CDATA[google-agentspace]]></category>
            <dc:creator><![CDATA[David Flórez Fernández]]></dc:creator>
            <pubDate>Fri, 19 Sep 2025 05:09:12 GMT</pubDate>
            <atom:updated>2025-09-19T05:09:12.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LIIeBWXFu_9f45auU1DuXA.png" /></figure><p>Software development is experiencing a significant shift from conventional applications to smart, independent systems. Leading this change are AI agents, which represent an advancement beyond large language models (LLMs). This section will cover the core principles of agentic AI and present Google Cloud Platform’s (GCP) comprehensive architecture, built to accommodate this emerging software category.</p><h3>From Language Models to Autonomous Agents</h3><p>The evolution of AI agents, from rudimentary large language model (LLM) interactions to sophisticated autonomous systems, has unfolded through distinct historical phases.</p><p><strong>Phase 1: Direct LLM Interaction (Early Days)</strong> initially marked the landscape. These early models, despite their power, often struggled with a lack of domani specific knowledge, leading to the generation of outdated information or factual inaccuracies.</p><p><strong>Phase 2: Retrieval Augmented Generation (RAG) (Emergence)</strong> followed, significantly improving factual accuracy. This innovation allowed models to access and retrieve information from internal knowledge sources, such as vector databases or search indices, effectively grounding their responses in reliable data for specific domains.</p><p><strong>Phase 3: Autonomous AI Agents (Current Era)</strong> represents the most advanced stage. These systems are engineered to “perceive” their environment and execute autonomous actions to achieve predefined objectives. Modern AI agents distinguish themselves as the next generation of software, characterized by four core differentiating features:</p><ol><li><strong>Autonomous Action:</strong> Agents can execute complex, multi-step tasks and workflows with minimal human intervention.</li><li><strong>Reasoning and Planning:</strong> They leverage advanced AI models to make informed decisions, create plans and adapt to dynamic environments.</li><li><strong>Continuous Learning:</strong> Agents possess the capacity to learn from experience, improving their performance and efficiency over time.</li><li><strong>Multi-agent Collaboration:</strong> Multiple agents can work in concert to achieve shared goals, enabling the resolution of problems of a higher order of complexity.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wpeSXHypMhEY_-8H7sKqxQ.png" /><figcaption>Figure 1: Features of an AI Agent</figcaption></figure><p>The development of advanced AI agents relies on a consistent architectural pattern, comprising four key components:</p><ul><li><strong>Models:</strong> At the heart of the system, one or more generative AI models, such as Google’s Gemini, function as the agent’s reasoning engine. These models are responsible for interpreting user objectives, breaking them into manageable steps, formulating a strategic plan and producing the final outputs.</li><li><strong>Orchestration:</strong> This component serves as the agent’s central intelligence, managing its memory (both short-term and long-term), maintaining task status, executing the defined plan and strategically deciding when to activate specific tools.</li><li><strong>Tools:</strong> Acting as the agent’s effectors, tools enable interaction with the external environment. These can be functions, APIs, or database queries, allowing the agent to retrieve information (e.g., check inventory), perform actions (e.g., book a flight), or execute transactions.</li><li><strong>Runtime:</strong> This represents the operational environment where the AI agent system is deployed and invoked, providing the necessary computational resources and infrastructure for its functioning.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FuAWOvLFb9KOz2YbjRCYJw.png" /><figcaption>Figure 2: Components of an AI Agent</figcaption></figure><h3>The GCP Agentic Stack: The agent cloud</h3><p>The GCP Agentic Stack offers a comprehensive, vertically integrated platform designed to support the complete lifecycle of sophisticated AI agents, from initial development to full integration. This cohesive architecture ensures that each layer builds upon the one below it, spanning foundational models to user-facing applications.</p><p>The stack is structured into distinct layers:</p><ul><li><strong>Foundation (LLM &amp; RAG):</strong> This foundational layer leverages Google’s cutting-edge Gemini models, optimized for agentic reasoning and tool utilization. It also incorporates Vertex AI Search for creating robust enterprise-grade Retrieval Augmented Generation (RAG) solutions using corporate data.</li><li><strong>Enablement (Tools &amp; Connectors):</strong> This layer provides the essential ecosystem of tools for agents, including data sources like BigQuery and AlloyDB, pre-built connectors to SaaS applications and critically, Apigee for comprehensive API management.</li><li><strong>Development (Orchestrators):</strong> Agents are built and configured in this layer, with a primary emphasis on the Agent Development Kit (ADK) for professional, code-first development.</li><li><strong>Operations (Runtime):</strong> Post-development, agents are deployed and managed within the Agent Engine, a fully managed runtime environment offering scalability, observability and security.</li><li><strong>Experience (Ecosystem):</strong> The uppermost layer facilitates user interaction with agents through interfaces like Agentspace for employee productivity and the Agent Garden, a resource for developers to explore sample agents and tools.</li></ul><p>The explicit inclusion of Apigee in the foundational “Tools” layer of this official architecture underscores a crucial principle: agent tools are not just functional code but governed, enterprise-grade assets. The effectiveness of an agent directly depends on the power and accessibility of its tools. However, in a corporate setting, “accessibility” means navigating carefully controlled gateways governed by security, compliance, reliability and observability requirements. Allowing an agent to directly call an internal microservice endpoint would circumvent established IT governance. By integrating Apigee, mandates that any interaction between an agent’s orchestrator and an enterprise service <em>must</em> pass through a governance plane. This proactive design addresses enterprise architects’ primary concerns, assuring them that adopting GCP’s agent platform extends, rather than abandons, their existing API management and security protocols to this new class of AI-driven consumers.</p><h3>The Agent Development Lifecycle on Vertex AI</h3><p>Google Cloud Platform offers a comprehensive approach to developing AI agents, catering to diverse technical skill levels and use case complexities. This strategy empowers organizations to democratize AI development when suitable, while maintaining strict oversight for critical applications. The entire lifecycle is supported by various development methods, a professional framework for intricate systems and a managed runtime environment for reliable production deployments.</p><h3>Approaches to Agent Development: No-Code, Low-Code and High-Code Options</h3><p>GCP provides three distinct agent creation methods. This strategic, tiered approach offers a balance between rapid development and the flexibility of customization and control, ensuring organizations can select the optimal tool for their specific needs and developer profiles.</p><ul><li><strong>No-Code (Agentspace):</strong> Agentspace offers a straightforward, no-code interface for business users and citizen developers to create agents. These agents are designed to boost internal employee productivity by enabling the development of search and assistant applications. Key features include the ability to connect to enterprise data stores and utilize pre-built actions for popular systems like Gmail, Jira, or Outlook. Agentspace emphasizes safety and ease of use, fostering quick development within a controlled and secure environment.</li></ul><p><a href="https://cloud.google.com/agentspace/docs">What is Google Agentspace? | Google Cloud</a></p><ul><li><strong>Low-Code (Agent Builder / Dialogflow CX):</strong> This pathway is designed for developers creating advanced conversational agents, particularly for customer experience. Its visual, flow-based interface enables the orchestration of both deterministic workflows and generative AI responses. This approach provides enhanced flexibility compared to no-code methods, allowing agents to integrate with diverse data stores and custom tools through OpenAPI specifications and existing integration connectors.</li></ul><p><a href="https://cloud.google.com/products/agent-builder?e=48754805&amp;hl=en">Vertex AI Agent Builder</a></p><ul><li><strong>High-Code (Agent Development Kit):</strong> The Agent Development Kit (ADK) offers a code-first framework in Python and Java, empowering professional developers and machine learning engineers to construct highly customized and intricate multi-agent systems. This approach grants unparalleled control and adaptability, facilitating the integration of custom logic and the implementation of sophisticated architectures alongside generative AI reasoning.</li></ul><ul><li><a href="https://github.com/google/adk-samples">GitHub - google/adk-samples: A collection of sample agents built with Agent Development Kit (ADK)</a></li><li><a href="https://cloud.google.com/vertex-ai/generative-ai/docs/agent-development-kit/quickstart">Quickstart: Build an agent with the Agent Development Kit | Generative AI on Vertex AI | Google Cloud</a></li></ul><p>The following table provides a comparative analysis of these three development pathways, offering a framework for strategic decision-making.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d61b52b75d4ee425a6f01b42ef6e0953/href">https://medium.com/media/d61b52b75d4ee425a6f01b42ef6e0953/href</a></iframe><h3>Professional-Grade Development with the Agent Development Kit (ADK)</h3><p>For organizations building sophisticated, production-grade agentic systems, the Agent Development Kit (ADK) is Google’s strategic framework. It provides a higher level of abstraction than alternatives like LangGraph, focusing on the agent as the primary unit of composition rather than low-level graph nodes, which simplifies development and maintenance.</p><p>ADK is built upon a set of core abstractions that provide a robust structure for agent development:</p><ul><li><strong>Agent, Session and Runner:</strong> These are the foundational building blocks. The Agent defines the behavior, the Session maintains the state of a single interaction (including chat history and a data scratchpad) and the Runner is the state machine that drives the execution forward.</li><li><strong>State and Events:</strong> The Session’s state is a simple, serializable key-value store. Crucially, state is not modified directly but is updated via an event-driven model. All interactions: user messages, tool calls, agent responses are captured as Events, ensuring a complete and auditable log of the agent’s execution.</li><li><strong>Memory:</strong> Beyond the short-term state of a single session, ADK provides a MemoryService abstraction. This enables agents to connect to a searchable, long-term knowledge store, allowing them to recall information and context from previous interactions.</li></ul><p>Leveraging these concepts, ADK supports a wide range of advanced architectures essential for enterprise use cases:</p><ul><li><strong>Multi-Agent Architectures:</strong> ADK facilitates the creation of systems composed of multiple specialized agents. These can be organized hierarchically, with a supervisor agent delegating tasks, or horizontally, with agents collaborating as peers. This modular approach allows for greater efficiency and specialization compared to a single monolithic agent.</li><li><strong>Workflow Agents:</strong> For structured processes, ADK provides pre-built workflow agents like SequentialAgent, ParallelAgent and LoopAgent, which allow developers to orchestrate sub-agents in predictable patterns.</li><li><strong>Hybrid Logic:</strong> A key differentiator of ADK is its ability to seamlessly interleave deterministic logic (e.g., standard Python functions) with generative AI reasoning. This allows developers to use the LLM for tasks requiring flexibility, like understanding user intent, while using reliable, auditable code for critical operations like financial calculations or compliance checks.</li><li><strong>Human-in-the-Loop (HITL):</strong> ADK has built-in support for HITL workflows, a non-negotiable requirement for many enterprise processes. This allows an agent to pause its execution and escalate a decision or a piece of data to a human for approval before proceeding.</li></ul><h3>Deployment and Operations: The Role of Agent Engine</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DK8JZcBz-6Q7HQcLjObIMA.png" /><figcaption>Figure 3: Vertex Agent Engine Architecture</figcaption></figure><p>Building an agent is only half the battle; deploying, managing and scaling it in production presents a distinct set of challenges. Agent Engine is GCP’s answer to this operational need, serving as a fully managed, scalable and secure runtime for agents built with ADK or other supported frameworks like LangGraph and CrewAI. Agent Engine provides a suite of tools for robust operations and continuous improvement:</p><ul><li><strong>Observability and Debugging:</strong> Through the GCP console, developers have access to a comprehensive agent dashboard for monitoring key metrics like queries per second (QPS) and CPU utilization. A dedicated Sessions UI allows for the review of all user interactions and a detailed trace view enables step-by-step debugging of an agent’s internal reasoning and tool usage.</li><li><strong>Continuous Quality Improvement:</strong> Agent Engine incorporates mechanisms to enhance agent performance over time. Furthermore, integrated <strong>Evaluation Tools</strong> provide a framework for agentic unit testing and comprehensive system evaluations, allowing teams to measure and benchmark agent quality against predefined criteria.</li></ul><ul><li><a href="https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/overview">Vertex AI Agent Engine overview | Generative AI on Vertex AI | Google Cloud</a></li><li><a href="https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/quickstart">Quickstart: Develop and deploy agents on Vertex AI Agent Engine | Generative AI on Vertex AI | Google Cloud</a></li></ul><p>A standout feature of Agent Engine is the <strong>Memory Bank</strong>, which directly addresses the common problem of “forgetful” agents that treat every interaction as a new one. It provides a sophisticated, two-tiered memory system:</p><ol><li><strong>Agent Engine Sessions:</strong> Act as a short-term memory, storing the conversation history and state within a single, ongoing interaction.</li><li><strong>Agent Engine Memory Bank:</strong> Serves as a long-term memory, storing, transforming and retrieving key information <em>across</em> multiple sessions. It uses an architecture of retrievers and storage (backed by Spanner) to create a persistent knowledge base for each user. This enables truly personalized and stateful experiences, where an agent can remember past preferences, previous issues and user context without the prohibitive cost and performance degradation of feeding the entire interaction history into the LLM’s context window.</li></ol><p>The combination of ADK’s hybrid logic and Agent Engine’s Memory Bank creates a powerful paradigm for building “compound agents” capable of handling long-running, complex enterprise processes. This architecture directly overcomes the limitations of both purely generative systems and purely deterministic ones. A purely generative agent, driven solely by an LLM, can be unpredictable and unreliable for mission-critical steps that demand 100% accuracy. Conversely, a traditional deterministic workflow is reliable but too rigid to handle ambiguity. ADK allows a developer to construct an agent that uses the LLM for the “fuzzy” front-end of a task (e.g., understanding a user’s unstructured request) but then calls a deterministic, auditable Python function for the “hard” middle part (e.g., executing a financial transaction). However, many enterprise processes, like an insurance claim investigation, are not completed in a single session. This is where the Memory Bank becomes indispensable. The agent can execute a critical step, persist the result and its context to the Memory Bank and then seamlessly resume the process days later with full awareness of the previous interaction. The true power of the platform emerges from this synergy, enabling sophisticated agents that can start a process generatively, execute a step deterministically, pause for human approval, persist state for a week and then resume, all within a single, coherent operational framework.</p><h3>Bridging the Gap: Integrating Agents with the Enterprise</h3><p>The successful deployment of AI agents within a large organization depends less on the elegance of the AI model and more on the robustness of its integration with the existing enterprise IT landscape. This section addresses the critical challenge of connecting agents to corporate systems safely and effectively, mitigating the risks of ungoverned proliferation while unlocking the value trapped in siloed data.</p><h3>The Enterprise Challenge: Overcoming Agent, Model and Integration Sprawl</h3><p>As organizations rush to adopt agentic AI, they often encounter a series of cascading challenges that stem from a lack of centralized governance and a fragmented technology landscape. These can be categorized into three forms of “sprawl”:</p><ul><li><strong>Agent Sprawl:</strong> The uncontrolled, bottom-up creation of agents across different business units. This leads to redundant development efforts, inconsistent user experiences and, most dangerously, unbounded and unaudited data access as numerous agents connect to sensitive systems.</li><li><strong>LLM Sprawl:</strong> Ungoverned access to a multitude of foundational models, both internal and external. This results in spiraling, unpredictable costs, a lack of security oversight and inconsistent application of safety policies.</li><li><strong>Integration (MCP) Sprawl:</strong> The proliferation of ad-hoc, point-to-point integrations between agents and enterprise systems. These often use unsecured protocols and bypass established API gateways, creating a fragile and vulnerable “shadow IT” infrastructure that is difficult to monitor and maintain.</li></ul><p>Underpinning these issues is the fundamental reality that enterprise information is not monolithic. It is fragmented across dozens or even hundreds of disconnected data islands: ERP systems like SAP, CRMs like Salesforce and countless legacy databases making it exceedingly difficult for agents to access the information and automate the processes they need to be effective.</p><h3>Application Integration: The Enterprise Connectivity Fabric</h3><p>Google Cloud’s Application Integration is the purpose-built solution for bridging this connectivity gap. It serves as an enterprise-grade integration platform-as-a-service (iPaaS) that connects agents to the complex web of backend systems of record. Its key capabilities include:</p><ul><li><strong>Visual Designer and Connectors:</strong> A low-code, drag-and-drop interface combined with over 100 pre-built connectors for popular SaaS and Google Cloud services dramatically accelerates the development of complex integration flows.</li><li><strong>Orchestration Engine:</strong> Application Integration is designed to handle sophisticated, long-running and asynchronous workflows. It can orchestrate data transformations, parallel processing and complex logic across multiple backend systems.</li></ul><p>This enables a powerful and secure pattern for agent tooling: an integration specialist can create a deterministic, reliable workflow in Application Integration, for example, a flow that “Creates a Jira Ticket and Updates Salesforce with Complaint Details” and then export that entire complex workflow as a single, simple “tool.” This tool can then be made available to agents built in Agentspace or ADK, providing them with a pre-vetted, robust capability for performing enterprise actions without exposing them to the underlying complexity.</p><p><a href="https://cloud.google.com/application-integration?e=48754805&amp;hl=en">Application Integration</a></p><h3>Apigee as the Unified Governance Plane</h3><p>While Application Integration provides the connectivity, Apigee API Management provides the essential layer of centralized governance and security. Apigee acts as a unified control plane for all agent-related interactions, effectively solving the sprawl challenges by functioning as three distinct but interconnected gateways.</p><p><a href="https://cloud.google.com/blog/products/api-management/using-apigee-api-management-for-ai?e=48754805">Using Apigee API management for AI | Google Cloud Blog</a></p><ul><li><strong>Function 1: The Agent Gateway (Securing Access <em>to</em> Agents):</strong> In this role, Apigee sits in front of the agents themselves (which are running on backends like Cloud Run or GKE). It acts as the secure front door for any user or application wanting to invoke an agent. It enforces enterprise-grade policies such as authentication and authorization, provides threat protection through Advanced API Security, applies rate limiting to prevent abuse and gathers detailed analytics on agent usage.</li><li><strong>Function 2: The Model Gateway (Governing Agent Access <em>to</em> LLMs):</strong> Apigee can be configured as a centralized proxy for all outbound calls that agents make to LLMs. This provides a single point of control for managing a multi-model environment. Key capabilities in this role include enforcing token limits and chargeback models for cost control (FinOps); applying <strong>Model Armor</strong> for unified safety scanning to mitigate risks like prompt injection and sensitive data leakage; and using <strong>Semantic Caching</strong> to reduce costs and latency by reusing responses for semantically similar prompts.</li><li><strong>Function 3: The Tool (MCP) Gateway (Securing Agent Access <em>to</em> Tools):</strong> Here, Apigee governs the interaction between an agent and its tools, which are exposed as APIs. Whether connecting to a Jira server, a custom database, or a workflow from Application Integration, Apigee enforces security (OAuth, JWT, API Keys), rate limits tool usage and can sanitize inputs before they are passed to backend systems.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VhXs-j-seHDrv4eOnsfzKQ.png" /><figcaption>Figure 4: AI Agent Interfaces through Apigee</figcaption></figure><p>This architecture creates a clear and powerful separation of duties, which is essential for scaling AI development within a large enterprise. In a naive implementation, an agent developer would need to be a “unicorn” expert, possessing deep knowledge of both AI orchestration and the nuances of enterprise integration, handling SAP authentication, managing retry logic for an API and parsing complex legacy data formats. Using Apigee, however, establishes distinct roles. The Integration Specialist uses Application Integration to build a robust workflow that tames the backend complexity, handing off a single, clean API endpoint. The API Governor then uses Apigee to wrap this endpoint with standard security, rate limiting and logging policies, publishing it as a governed “Tool.” Finally, the Agent Developer can discover and consume this pre-built, secure and reliable Tool with just a few lines of code in ADK, without needing any knowledge of the intricate systems behind it. This division of labor acts as a massive force multiplier, de-risking agent projects and allowing AI teams to iterate on business logic much faster by leveraging the expertise of their existing integration and API management teams.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/677438da3ba1d147ac740f97b3124f17/href">https://medium.com/media/677438da3ba1d147ac740f97b3124f17/href</a></iframe><h3>Fostering an Open and Interoperable Agent Ecosystem</h3><p>A core component of Google Cloud’s strategy for agentic AI is its commitment to open standards and interoperability. Rather than creating a proprietary, walled-garden ecosystem, GCP is actively supporting, creating and integrating open protocols. This positions the platform not just as a place to build agents, but as a central hub where agents from any framework can be deployed, managed and collaborate securely.</p><h3>Standardizing Tool Connectivity with MCP (Model Context Protocol)</h3><p>The Model Context Protocol (MCP) is an open standard, initially developed by Anthropic and now supported by Google, designed to standardize how AI applications connect with external tools, data sources and systems. It can be thought of as a “USB for Agents,” providing a universal adapter that allows any MCP-compliant agent (the client) to connect to any MCP-compliant tool (the server) without needing custom integration code. GCP’s support for this standard is primarily manifested in the Agent Development Kit (ADK), which includes an MCP toolset that allows agents built with ADK to seamlessly connect to the thousands of existing MCP tool servers in the growing ecosystem.</p><p><a href="https://modelcontextprotocol.io/docs/getting-started/intro">What is the Model Context Protocol (MCP)? - Model Context Protocol</a></p><h3>Enabling Collaboration with A2A (Agent-to-Agent Protocol)</h3><p>While MCP is well-suited for structured agent-to-tool interactions, it is insufficient for the more dynamic, long-running and multimodal nature of true agent-to-agent collaboration. To address this, Google is championing the Agent-to-Agent (A2A) protocol, an open standard designed specifically for this purpose. Described as the “HTTP for Agents,” A2A provides a framework for complex inter-agent communication built on existing, popular standards like HTTP, Server-Sent Events (SSE) and JSON-RPC.</p><p><a href="https://a2a-protocol.org/latest/">A2A Protocol</a></p><p>Key design principles of A2A include:</p><ul><li><strong>Agent Discovery:</strong> Agents publish an “Agent Card,” a machine-readable manifest that describes their capabilities, data formats and authentication requirements, allowing other agents to discover and understand how to interact with them.</li><li><strong>Security by Default:</strong> The protocol defines mechanisms for authentication and authorization, ensuring secure collaboration.</li><li><strong>Support for Long-Running Tasks:</strong> A2A is designed to manage communication and track the state of tasks that may take significant time to complete.</li><li><strong>Modality Agnostic:</strong> It facilitates interactions that go beyond simple text, supporting files, images, audio streams and structured data.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e9a9c15443af55c0567656f67a03098/href">https://medium.com/media/4e9a9c15443af55c0567656f67a03098/href</a></iframe><p>By championing A2A as the standard for collaboration and MCP as the standard for tool interaction, Google is providing the very fabric of that interoperability. This allows Agent Engine to become the central “operating system” where these disparate agents can be deployed, managed, secured and observed under a single pane of glass.</p><h3>Some Recommendations</h3><p>Google Cloud Platform has assembled a comprehensive and deeply integrated suite of services that position it as a leading platform for developing, deploying and governing enterprise-grade AI agents. Its unique strength lies not in any single component, but in the symbiotic architecture that connects its powerful AI development tools with its robust enterprise connectivity and governance layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6x_FQUeLnZbu9mPEHIM1GA.png" /><figcaption>Figure 5: 10,000 feet component view</figcaption></figure><h3>An End2End Architecture</h3><p>The central value proposition of GCP’s agent platform is the seamless integration between Vertex AI (the “build” environment) and the combination of Apigee and Application Integration (the “govern and connect” environment). This cohesive approach directly addresses and solves the critical enterprise challenges of agent, model and integration sprawl. While tools like the Agent Development Kit provide developers with unparalleled power and flexibility to create sophisticated agentic logic, Apigee and Application Integration provide the guardrails that make it safe to deploy that power within a corporate IT landscape. The result is a platform where the whole is greater than the sum of its parts, one that is simultaneously enabling for AI developers and reassuring for enterprise architects and security officers.</p><h3>Framework for Implementation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnxi5cA9Xa6VbvZuHUVn5g.png" /><figcaption>Figure 6: Recommendation for Enterprise Agentic onboarding</figcaption></figure><p>For technical leaders and strategists planning to adopt agentic AI on Google Cloud, the following framework and recommendations can serve as a guide for a successful, scalable and secure implementation.</p><ul><li><strong>Implement a Federated Development Model:</strong> Not all agents are created equal and not all developers have the same skill set. Organizations should adopt a tiered approach to agent development. Empower business units and citizen developers with the no-code and low-code tools (Agentspace, Agent Builder) for rapid innovation on departmental or productivity-focused use cases. Simultaneously, establish a centralized platform or AI center of excellence team to build mission-critical, complex, or externally-facing agents using the high-code Agent Development Kit. This federated model maximizes velocity while ensuring that the most critical applications receive the necessary architectural rigor.</li><li><strong>Establish a Governance-First Tooling Strategy:</strong> Mandate that any agent “tool” intended to interact with an enterprise system of record must be created and exposed through the approved enterprise integration stack. The standard pattern should be: 1) Build the backend connectivity and business logic as a workflow within Application Integration. 2) Expose that workflow as a secure, managed API through Apigee, applying all standard corporate policies for security, rate limiting and logging. 3) Publish this governed API as an official “Tool” for agent developers to consume. This “governed toolchain” approach is the single most effective way to prevent integration sprawl and ensure that all agent actions are secure, monitored and compliant.</li><li><strong>Pursue a Phased Adoption Strategy:</strong> Begin the agentic AI journey with a crawl-walk-run approach. The ideal starting point is with internal, employee-facing agents that automate tasks and improve productivity, leveraging platforms like Agentspace. This provides a lower-risk environment to prove the value of the technology, build internal expertise and, most importantly, refine the governance processes and the “governed toolchain” model. Once these foundational capabilities are mature, the organization can then confidently progress to building more complex, customer-facing agentic applications with a proven framework for success.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a3c99ea7a7c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/the-google-cloud-agent-platform-0a3c99ea7a7c">The Google Cloud (Agent) Platform</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to develop data products and not die trying]]></title>
            <link>https://medium.com/data-science/how-to-develop-data-products-and-not-die-trying-762c8878d05c?source=rss-91cfb74fcedd------2</link>
            <guid isPermaLink="false">https://medium.com/p/762c8878d05c</guid>
            <category><![CDATA[data-driven]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bussiness]]></category>
            <dc:creator><![CDATA[David Flórez Fernández]]></dc:creator>
            <pubDate>Fri, 25 Jan 2019 08:01:00 GMT</pubDate>
            <atom:updated>2019-01-25T08:01:00.779Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Authors: </em><br><a href="https://medium.com/u/91cfb74fcedd"><em>David Flórez Fernández</em></a><em>, Data and AI Solution Architect @ Microsoft <br></em><a href="https://medium.com/u/c2f9a2467f89"><em>Pablo Peris</em></a><em>, Digital Architect @ Microsoft</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*4gKXVC5e6ICqpCNW5wRTQw.jpeg" /></figure><h3>Companies struggle to thrive with Analytics projects</h3><p>In the present days of data accumulation there is a global craving for the innovative and business use of AI at all levels. Maybe it’s time to stop and reflect on that burning desire of using AI everywhere and consider “<a href="https://en.wikipedia.org/wiki/Law_of_the_instrument">the Law of the Instrument</a>” for a moment: “if all you have is a hammer, everything looks like a nail”.</p><p><strong><em>TL; DR: Head over to the last 10 questions to assess how good you are at building data products.</em></strong></p><p>There are many reports alerting about the problems that companies are suffering while implementing or adopting AI in their business. Gartner stated that 60% of analytics and BI projects failed, and later recognized that the reality is actually worse. According to Gartner analyst Nick Heudecker, Gartner was “too conservative” with its 60% estimate [<a href="https://www.techrepublic.com/article/85-of-big-data-projects-fail-but-your-developers-can-help-yours-succeed/">*</a>]. The real failure rate is closer to 85 percent.”. So if you are facing any kind of difficulties think that you are not alone, and if you are not, think that you might be missing a reality check. Based on our experience with clients in different sectors and countries, the most frequent situations that companies are struggling with could be summarized as the following; does it sound familiar?</p><p>1. <strong>Unexperienced with budget:</strong> Big investment and lots of interest but no experience to develop advanced data and AI projects, meaning that a lot of time will be wasted before achieving any kind of results.</p><p>2. <strong>Unsupported</strong>: Companies without support from the business. Many good ideas are queued due to lack of implication from the right stakeholders.</p><p>3. <strong>Clear objective but inefficient team to develop:</strong> The teams work hard but achieve nothing or results are disappointing to the company.</p><p>4. <strong>Ambitious</strong>: Companies with budget and sometimes unlimited resources but not worried about technology limitations. This situation could lead to frustration when trying to apply the solutions to mass-scale problems.</p><p>5. <strong>Lacking data:</strong> the data is incomplete or totally siloed. These kinds of companies need to invest first in building and preparing their data systems to be able to go into advanced analytics. We can also include here the issues with data quality. Not a minor issue.</p><p>6. <strong>Theoretical</strong>: Companies with a good analytics team but without knowledge about agile methodologies or Data Science and difficulties to scale-up or lay models into production.</p><p>7. <strong>Naive</strong>: Companies that believe ML is magic. Good luck!</p><h3>How can we avoid the main pitfalls?</h3><p>The aim of this article is to be used as seed for discussion and present a different approach to perform and understand Advanced Analytics at its correct location in the enterprise architecture.</p><p>Think about it, many times the way these projects are done is basically using a vendor with an objective that rarely is aligned to the company’s priorities. To what degree can we outsource the development of data product? It’s not rare that the vendor tries to develop the most accurate or best fit model without focusing in the underlying and final purpose of the work which is, of course, to be useful. Have they figured out what is the relationship between accuracy and ROI? Is it relevant? It’s not uncommon to end up in a situation where a very a good model is deployed but no one is able to turn that into either money, new revenue, or cost savings. So, have we deployed a very good model that is just useless? Or on the contrary, have we deployed a very bad model that is not much better than random for specific datasets? Who is looking after the models once they are deployed? Too many questions…</p><p>To summarize a bit, these are the basic parts where companies must focus their efforts: usage and applicability. Anything that a company is planning to build using Data and AI must follow the philosophy of developing a product. Companies must be obsessed with their developing process as much as they are when creating a new product for their customer. Make it profitable or abandon it.</p><p>Additionally, a company involved in a PoC for the sake of it, just focusing in technology component is many times an incomplete effort that could also lead to failure, not only because the model or the data is not good, but because the business orientation is lost. That’s why Instead of working in isolated pieces, what we propose in this article is to work in an agile way developing full releases of a product with limited functionality but with committed involvement of all stakeholders. <strong>Nothing new in the world of software but apparently not yet embedded in the minds of those creating data driven solutions or products</strong>.</p><h3>What do you need in order to build a Data Product?</h3><p>Hopefully at this stage it is clear what experience has taught us: a clear definition of teams, methodologies and responsibilities should not be underestimated. That’s the reason why we propose a Ring-Fencing strategy for Data Product development. In our next article we shall go deeper into detail regarding this. For example, how each Workstream must work isolated and how all teams can collaborate without creating confusion. Meanwhile, this is our proposal for teams, areas of focus, and who should be their members:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Uue3n1BMDblffpOiO7uI2A.png" /><figcaption>Main team members and focus areas</figcaption></figure><p>At the same time, much can be discussed about what methodology is better, but we recommend not wasting too much time in choosing the perfect one. The delivery methodologies applied could be whatever your company dictates: Agile, Team Data Science Process, Design Architecture Sessions, Design Thinking, UX design, just to mention some examples. The important bit is to choose a methodology that aligns with your team’s skills and focuses on the final business outcome.</p><p>To illustrate the complexity of the relationships between the different teams, see the image below where we describe the main milestones and dependencies to achieve a complete PoC or functional release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THQ-gfoe-ts_3O7FsO1zjg.png" /><figcaption>Workstrems involved in Data Product development</figcaption></figure><h3>Conclusion</h3><p>We have just scratched the surface of the reasons which could block or slow your data projects, we have acknowledged that many companies are struggling to make their data projects profitable or simply useful, and we have proposed a way of organizing the different workstreams. What is next?</p><p>Why not start reflecting on the five topics mentioned before and how your company tackles them:</p><p>1. Methodology</p><p>2. Data</p><p>3. Team</p><p>4. Technology</p><p>5. Business orientation</p><p>And ask your team the following questions:</p><p>1. Is your team capable of showing tangible results in a short period of time?</p><p>2. Are those results directly linked to the business problem your team was originally trying to solve?</p><p>3. Are the business people that are directly linked to the problem able to suggest parameter configurations?</p><p>4. Is technology influencing your decision somehow? For example, “my team feels comfortable using SAS, we don’t have big data, so we don’t need any other technologies than that.“</p><p>5. Is your team aware of the relationship between accuracy in your models and monetary impact? For example, does a 1% accuracy in your models mean anything to your business objective?</p><p>6. Can you recreate your experiments against with the exact same dataset that you tried 3 months ago and compare results?</p><p>7. Is your team using any source control tool? Any testing tools? Any tool at all apart from notebooks? Is anyone doing code reviews for the code your team writes?</p><p>8. Can you explain your algorithm’s results in case something goes wrong in the real world? For example, in the case of false positive giving a credit, can you explain why to the risk department?</p><p>9. Do you have processes to put models intro production? Can you perform a load-test? Performance test? Deploy without stopping the service?</p><p>10. Do you have an ethics advisory role identified in your company? Is the legal department aware of your data products?</p><p>Please, if you are interested in the content of this article take a couple of minutes to answer this form and let us know how you see yourself in developing data products. It is absolutely anonymous and confidential.</p><p><a href="https://forms.office.com/Pages/ResponsePage.aspx?id=DQSIkWdsW0yxEjajBLZtrQAAAAAAAAAAAAO__c2ubAtUMTdHNE5aMExFUU82M1M0Rk1LUFQ3RlVCTi4u">Link to the form</a></p><h3>References:</h3><p><a href="https://www.techrepublic.com/article/85-of-big-data-projects-fail-but-your-developers-can-help-yours-succeed/">https://www.techrepublic.com/article/85-of-big-data-projects-fail-but-your-developers-can-help-yours-succeed/</a></p><p><a href="https://cdn.oreillystatic.com/en/assets/1/event/278/Agile%20for%20data%20science%20teams%20Presentation.pdf">https://cdn.oreillystatic.com/en/assets/1/event/278/Agile%20for%20data%20science%20teams%20Presentation.pdf</a></p><p><a href="https://hbr.org/2018/10/how-to-build-great-data-products">https://hbr.org/2018/10/how-to-build-great-data-products</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=762c8878d05c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-to-develop-data-products-and-not-die-trying-762c8878d05c">How to develop data products and not die trying</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>