<?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 #TheGenAIGirl — code, community, and GenAI. on Medium]]></title>
        <description><![CDATA[Stories by #TheGenAIGirl — code, community, and GenAI. on Medium]]></description>
        <link>https://medium.com/@thegenaigirl?source=rss-204d878a3c46------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jCQppY-bQauD6beHHTudrw.jpeg</url>
            <title>Stories by #TheGenAIGirl — code, community, and GenAI. on Medium</title>
            <link>https://medium.com/@thegenaigirl?source=rss-204d878a3c46------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 02:34:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thegenaigirl/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[Stop Burning LLM Tokens Just to Run an if Statement]]></title>
            <link>https://medium.com/google-cloud/stop-burning-llm-tokens-just-to-run-an-if-statement-25a3479eda5a?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/25a3479eda5a</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 19:38:00 GMT</pubDate>
            <atom:updated>2026-11-13T01:06:11.410Z</atom:updated>
            <content:encoded><![CDATA[<h4>Meet the Gemini Decisions API: How to evaluate text, images, audio, and video in one pass — at zero output tokens</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WQwOi4fqQjnJuQ0re5V1mg.jpeg" /></figure><p>Every day, thousands of backend services wake up a frontier generative model — an architecture trained on trillions of tokens to write code, synthesize research, and debug distributed systems — just to force it to whisper &quot;true&quot; or {&quot;department&quot;: &quot;billing&quot;} so an if statement on the next line can decide which queue to call.</p><p>Using a text generator as a boolean gate or router works in a weekend prototype. At scale, three cracks show up fast:</p><ul><li><strong>You pay the decoding tax.</strong> Generating even a tiny JSON wrapper incurs autoregressive output latency and output token billing.</li><li><strong>You get brittle strings instead of probabilities.</strong> When an LLM outputs &quot;billing&quot;, did it pick &quot;billing&quot; with 99% certainty, or did &quot;billing&quot; barely edge out &quot;shipping&quot; at 51% to 49%? Without calibrated probabilities, your code has no idea when to escalate to a human.</li><li><strong>Mega-prompts turn into spaghetti.</strong> Stuffing 15 routing and policy rules into one prompt causes instructions to bleed into each other. Fix one edge case, and three others quietly regress.</li></ul><p>The <strong>Gemini Decisions API</strong>, powered by <strong>Gemini Decision 1</strong> (gemini-decision-1), is purpose-built for this exact layer of your stack. Instead of generating text for humans to read, it evaluates closed-ended, typed questions against your multimodal data in a single forward pass and returns <strong>calibrated probabilities and confidence scores</strong>.</p><p>Best of all? <strong>It generates zero text tokens (</strong>total_output_tokens: 0<strong>).</strong></p><h4>How the Decisions API Thinks</h4><p>Instead of an open-ended chat completion, every call to client.decisions.create takes two things: a shared input (text, JSON strings, images, audio, video, or PDFs) and a map of 1 to 1,000 independent questions.</p><p>Every question uses one of three closed-ended primitives:</p><ul><li>noul<strong> (Yes / No):</strong> Checks whether a statement, condition, or policy rule holds. Returns noul (the calibrated probability of &quot;yes&quot;, bounded from 0.01 to 0.99) and confidence.</li><li>choice<strong> (Pick One Option):</strong> Scores 2 to 255 fixed options. Returns the winning choice key, a full probabilities map summing to 1, and confidence.</li><li>score<strong> (Ordered Rubric):</strong> Rates your input across ordered rubric descriptions (0-indexed). Returns score (the probability-weighted expected index, like 1.84), per-level probabilities, a legend, and confidence.</li></ul><blockquote>“Generative models produce text for people to read. Gemini Decision 1 produces calibrated probabilities for your code to branch on.”</blockquote><p>Three architectural guarantees change how you design backend logic:</p><ol><li><strong>Parallel, isolated scoring:</strong> Every question runs against the shared input in <strong>one forward pass</strong>. Questions cannot see or bias each other, shared input tokens are counted only once regardless of how many questions you ask, and latency stays nearly flat whether you evaluate 1 check or 50.</li><li><strong>Value + Confidence:</strong> The answer value (choice, score, or noul) tells your code <em>what</em> action fits. confidence (max(noul, 1 - noul) for binary checks, or the top outcome’s probability) tells your code <em>whether</em> to run it automatically or escalate.</li><li><strong>Atomic checks composed in code:</strong> Ask narrow, single-purpose questions and combine the answers with ordinary if statements and weights in code.</li></ol><h3>Quickstart: Your First Zero-Token Decision</h3><p>Install version 3.2+ of the Google GenAI SDK:</p><p>Bash</p><pre>pip install -U &quot;google-genai&gt;=3.2.0&quot;</pre><p>Suppose you run e-commerce returns and need to separate genuine product defects from buyer’s-remorse returns (like preferring another color). Adding explicit criteria defines sharp boundaries when a short question could be ambiguous:</p><p>Here is the <a href="https://github.com/laxmi-genai/gemini_notebooks/blob/main/decision_api.ipynb">entire code in colab </a>and the snippets are below!</p><p>Python</p><pre>from google import genai</pre><pre>client = genai.Client(http_options={&quot;api_version&quot;: &quot;v1beta&quot;})</pre><pre>result = client.decisions.create(<br>    model=&quot;gemini-decision-1&quot;,<br>    input=&quot;Customer returned the sweater because they preferred green over blue.&quot;,<br>    questions={<br>        &quot;is_defect&quot;: {<br>            &quot;type&quot;: &quot;noul&quot;,<br>            &quot;instructions&quot;: &quot;Is the customer reporting a product defect?&quot;,<br>            &quot;criteria&quot;: {<br>                &quot;true_description&quot;: &quot;The product itself is broken, damaged, or faulty.&quot;,<br>                &quot;false_description&quot;: &quot;Preference, sizing, shipping, or pricing complaint.&quot;,<br>            },<br>        },<br>    },<br>)</pre><pre>answer = result.answers[&quot;is_defect&quot;]</pre><pre><br>print(&quot;=== Decision Analysis Results ===&quot;)<br>print(f&quot;\nQuestion: is_defect&quot;)<br>print(f&quot;- Probability (NOUL): {answer.noul:.4f}&quot;)<br>print(f&quot;- Confidence Score: {answer.confidence:.4f}&quot;)<br><br>print(&quot;\n=== Usage Details ===&quot;)<br>print(f&quot;- Input Tokens: {result.usage.total_input_tokens}&quot;)<br>print(f&quot;- Output Tokens: {result.usage.total_output_tokens}&quot;)</pre><p>The API responds with calibrated probabilities and 0 output tokens:</p><p>JSON</p><pre>=== Decision Analysis Results ===<br><br>Question: is_defect<br>- Probability (NOUL): 0.0115<br>- Confidence Score: 0.9885<br><br>=== Usage Details ===<br>- Input Tokens: 142<br>- Output Tokens: 0</pre><p><em>(Watch your bounds: </em>noul<em> probabilities always fall between </em>0.01<em> and </em>0.99<em>. Set thresholds inside that window, since </em>answer.noul &gt; 0.99<em> will never match!)</em></p><h3>Going Full Multimodal: Image + Audio + Video in One Pass</h3><p>Real-world user submissions rarely arrive as clean, single-sentence text. A warranty claim or trust-and-safety report often lands with a JSON ticket, a smartphone photo, a voice memo, and a 10-second video clip.</p><p>Because the Decisions API accepts multimodal content blocks (text, image, audio, video, and document PDFs), you don&#39;t need separate vision, speech-to-text, and video pipelines just to route a ticket. You can evaluate <strong>all four modalities together in one forward pass</strong>.</p><blockquote>Note: You can tune token budgets per block with resolution (&quot;low&quot;, &quot;medium&quot;, &quot;high&quot;, or &quot;ultra_high&quot; on images; up to &quot;high&quot; on video) and mix single-modality checks with <strong>cross-modal consistency rubrics.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Nr_UM5kyMhjJjmvrY0Icg.jpeg" /><figcaption>Input image (cracked_water_tank.jpg) evaluated alongside audio and video&quot;</figcaption></figure><p>Python</p><pre>import base64<br>import json<br>from google import genai</pre><pre>client = genai.Client(http_options={&quot;api_version&quot;: &quot;v1beta&quot;})</pre><pre>claim_metadata = {<br>    &quot;claim_id&quot;: &quot;CLM-9042&quot;,<br>    &quot;item&quot;: &quot;espresso_machine&quot;,<br>    &quot;warranty_active&quot;: True,<br>}</pre><pre>with open(&quot;cracked_water_tank.jpg&quot;, &quot;rb&quot;) as f:<br>    photo_b64 = base64.b64encode(f.read()).decode(&quot;utf-8&quot;)</pre><pre>voice_note_url = &quot;https://storage.googleapis.com/generativeai-downloads/data/Apollo-11_Day-01-Highlights-10s.mp3&quot;<br>demo_video_url = &quot;https://storage.googleapis.com/generativeai-downloads/videos/ForBiggerBlazes.mp4&quot;</pre><pre>result = client.decisions.create(<br>    model=&quot;gemini-decision-1&quot;,<br>    input=[<br>        # Adjacent text blocks concatenate with no separator—always add `\n`!<br>        {&quot;type&quot;: &quot;text&quot;, &quot;text&quot;: json.dumps(claim_metadata) + &quot;\n&quot;},<br>        {<br>            &quot;type&quot;: &quot;image&quot;,<br>            &quot;data&quot;: photo_b64,<br>            &quot;mime_type&quot;: &quot;image/jpeg&quot;,<br>            &quot;resolution&quot;: &quot;medium&quot;,<br>        },<br>        {<br>            &quot;type&quot;: &quot;audio&quot;,<br>            &quot;uri&quot;: voice_note_url,<br>            &quot;mime_type&quot;: &quot;audio/mp3&quot;,  # Audio &amp; PDF blocks omit `resolution`<br>        },<br>        {<br>            &quot;type&quot;: &quot;video&quot;,<br>            &quot;uri&quot;: demo_video_url,<br>            &quot;mime_type&quot;: &quot;video/mp4&quot;,<br>            &quot;resolution&quot;: &quot;low&quot;,<br>        },<br>    ],<br>    questions={<br>        &quot;photo_shows_damage&quot;: {<br>            &quot;type&quot;: &quot;noul&quot;,<br>            &quot;instructions&quot;: &quot;Does the image show physical cracks or hardware damage to the machine? Ignore cardboard packaging.&quot;,<br>        },<br>        &quot;audio_describes_leak&quot;: {<br>            &quot;type&quot;: &quot;noul&quot;,<br>            &quot;instructions&quot;: &quot;In the audio clip, does the speaker describe water leaking or hardware failure?&quot;,<br>        },<br>        &quot;video_shows_hazard&quot;: {<br>            &quot;type&quot;: &quot;noul&quot;,<br>            &quot;instructions&quot;: &quot;Does the video clip show smoke, sparks, fire, or flames?&quot;,<br>        },<br>        &quot;evidence_consistent&quot;: {<br>            &quot;type&quot;: &quot;score&quot;,<br>            &quot;instructions&quot;: &quot;How consistent are the image, audio, and video with the `item` in the claim JSON?&quot;,<br>            &quot;criteria&quot;: [<br>                &quot;Contradictory or unrelated media (wrong product or mismatched clips)&quot;,<br>                &quot;Partially aligned (some media shows the product, other media is unclear)&quot;,<br>                &quot;Fully consistent (photo, audio, and video clearly support the same claim)&quot;,<br>            ],<br>        },<br>        &quot;triage_queue&quot;: {<br>            &quot;type&quot;: &quot;choice&quot;,<br>            &quot;instructions&quot;: &quot;Which team should handle this warranty claim given all submitted media?&quot;,<br>            &quot;criteria&quot;: {<br>                &quot;safety_escalation&quot;: &quot;Any sign of fire, flames, smoke, or electrical hazard.&quot;,<br>                &quot;instant_replacement&quot;: &quot;Clear physical defect with consistent evidence and active warranty.&quot;,<br>                &quot;fraud_or_mismatch&quot;: &quot;Submitted media does not match the claimed item.&quot;,<br>                &quot;other&quot;: &quot;Unclear media requiring manual specialist review.&quot;,<br>            },<br>        },<br>    },<br>)</pre><pre>a = result.answers<br><br># Order of operations matters: verify media consistency BEFORE firing safety recalls!<br>if a[&quot;evidence_consistent&quot;].score &lt; 1.0:<br>    decision = &quot;fraud_or_mismatch&quot;<br>elif a[&quot;video_shows_hazard&quot;].noul &gt; 0.50:<br>    decision = &quot;safety_escalation&quot;<br>elif a[&quot;evidence_consistent&quot;].score &gt;= 1.7 and a[&quot;triage_queue&quot;].confidence &gt;= 0.80:<br>    decision = a[&quot;triage_queue&quot;].choice<br>else:<br>    decision = &quot;manual_review&quot;<br><br>top_idx = max(a[&quot;evidence_consistent&quot;].probabilities, key=a[&quot;evidence_consistent&quot;].probabilities.get)<br>print(f&quot;Route: {decision} | Consistency: {a[&#39;evidence_consistent&#39;].legend[top_idx]}&quot;)</pre><p>Wait — look closely at what happens when you run this exact snippet:</p><pre>Route: fraud_or_mismatch | Consistency: Contradictory or unrelated media <br>(wrong product or mismatched clips)</pre><p>Why did it flag a mismatch? Look at the public test URLs we passed alongside our cracked espresso tank photo:</p><ul><li><strong>Audio (</strong><strong>Apollo-11_Day-01-Highlights-10s.mp3):</strong> NASA mission control discussing a moon launch.</li><li><strong>Video (</strong><strong>ForBiggerBlazes.mp4):</strong> A promo clip featuring roaring fire and flames.</li></ul><p>In a single forward pass — with <strong>zero output tokens</strong> — gemini-decision-1 caught two critical signals simultaneously:</p><ol><li>video_shows_hazard spiked above 0.90 because ForBiggerBlazes.mp4 literally shows flames.</li><li>evidence_consistent scored near 0.0 (&quot;Contradictory or unrelated media&quot;) because an Apollo 11 audio clip and a stock fire video have nothing to do with an espresso machine.</li></ol><blockquote><em>If we had checked </em><em>if a[&quot;video_shows_hazard&quot;].noul &gt; 0.50: </em>first<em>, anyone uploading a random stock video of a campfire could have triggered an urgent product-safety escalation!</em></blockquote><blockquote><em>Checking </em><em>evidence_consistent.score &lt; 1.0 first ensures you only page your safety team when the hazard actually involves your product—while routing stitched-together or bogus media straight to </em><em>fraud_or_mismatch.</em></blockquote><p><em>(Want to test the “happy path” too? Swap </em><em>voice_note_url and </em><em>demo_video_url with a matching voice memo and a quick video pan of the cracked water tank—</em><em>evidence_consistent jumps straight to </em><em>&quot;Fully consistent&quot; and </em><em>decision resolves cleanly to </em><em>instant_replacement.)</em></p><h4><strong>Decisions API vs. Structured Outputs: Which One When?</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Gp48r_r97pRVb_plKNVDQ.png" /></figure><h4>6 Field Notes Before You Ship</h4><ul><li><strong>The model never sees your question keys.</strong> Keys like &quot;is_defect&quot; only map answers back to your dictionary—write the full question inside instructions.</li><li><strong>Beware alphabetical sorting on </strong>choice<strong> keys.</strong> The API sorts option keys alphabetically in UTF-8 byte order before evaluation. Avoid positional catch-alls like &quot;none_of_the_above&quot;, which sort <em>ahead</em> of &quot;shipping&quot; and &quot;technical&quot;. Use &quot;other&quot; with an explicit description, or pair choice with a noul scope check.</li><li><strong>Keep </strong>score<strong> rubrics linear.</strong> Because score averages array indices (0, 1, 2, ...), exponential scales ($1, $10, $100, $1,000) skew expected values.</li><li><strong>Prefer positive phrasing.</strong> Ask &quot;Is the tier Gold?&quot; and compute 1 - answer.noul in code rather than asking &quot;Is the tier NOT Gold?&quot;.</li><li><strong>Pre-compute math and dates in code.</strong> Calculate age_days &lt;= 30 or amount &lt; 500 in Python/JS first and pass clean booleans or buckets in input.</li><li><strong>Send exact MIME types.</strong> Generic application/octet-stream payloads return HTTP 400. Match the real file format (image/jpeg, audio/mp3, video/mp4, application/pdf), and upload large or reused media via the Files API (file.uri).</li></ul><h4>Try It Yourself</h4><ul><li>You can start building today by grabbing an API key in <a href="https://aistudio.google.com/api-keys">Google AI Studio</a>, trying our <a href="https://aistudio.google.com/apps/bundled/doorstep-parcels-qa?fullscreenApplet=true">Doorstep Parcels</a>, <a href="https://aistudio.google.com/apps/bundled/speed-sketch?fullscreenApplet=true">Speed Sketch</a>, and <a href="https://aistudio.google.com/apps/bundled/find-the-zoo-keeper?fullscreenApplet=true">Find the Zoo Keeper</a> demo apps, and following the Python, JavaScript, and REST guides in the <a href="https://aistudio.google.com/docs/decisions-api">Decisions API documentation</a>.</li><li>Ecosystem integrations are rolling out across <a href="https://openrouter.ai/google/gemini-decision-1">OpenRouter</a>, <a href="https://docs.langchain.com/oss/python/integrations/providers/google">LangChain</a>, <a href="https://ai-sdk.dev/providers/ai-sdk-providers/google">Vercel</a>, <a href="https://docs.litellm.ai/docs/providers/gemini">LiteLLM</a>, <a href="https://pydantic.dev/docs/ai/models/google/">Pydantic AI</a>, <a href="https://docs.pipecat.ai/api-reference/server/classifiers/google">Pipecat</a>, <a href="https://docs.livekit.io/agents/integrations/google/">LiveKit</a>, and <a href="https://opencode.ai/">OpenCode</a> alongside the google-genai SDKs, with support <a href="https://forms.gle/NFt1W6pL1gCY9FGM8">coming soon</a> to Gemini in Google Cloud.</li><li>Build your own!</li></ul><h4>What’s Next?</h4><p><strong>Coming in Part 2:</strong> Follow along for the next post, where we wire gemini-decision-1 into <strong>Google ADK 2.0</strong> to build zero-token multi-agent graph routers and pre-execution tool guardrails.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25a3479eda5a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/stop-burning-llm-tokens-just-to-run-an-if-statement-25a3479eda5a">Stop Burning LLM Tokens Just to Run an if Statement</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[Two Common Ways to Connect Google ADK to Ollama — And the Difference Matters]]></title>
            <link>https://medium.com/@thegenaigirl/two-common-ways-to-connect-google-adk-to-ollama-and-the-difference-matters-a225d18ca88b?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/a225d18ca88b</guid>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Tue, 25 Aug 2026 04:41:05 GMT</pubDate>
            <atom:updated>2026-08-25T04:41:05.084Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PBo11hgxgOjdzm_3HYOUQw.png" /></figure><p>I recently connected a Google ADK agent to a local model running with Ollama.</p><p>The setup itself was easy.</p><p>The part that confused me was this:</p><pre>model = LiteLlm(model=&quot;openai/mistral-small3.1&quot;)</pre><p>Why am I using openai/ when the model is running <strong>locally in Ollama</strong>?</p><p>That led to a useful conceptual learning: <strong>there are two common ways to connect ADK → LiteLLM → Ollama.</strong></p><h4>Option 1: Use the Native Ollama Protocol</h4><p>LiteLLM has a native Ollama integration:</p><pre>model = LiteLlm(<br>    model=&quot;ollama_chat/mistral-small3.1&quot;<br>)</pre><p>Configure the Ollama endpoint:</p><pre>export OLLAMA_API_BASE=http://localhost:11434</pre><p>The request path is:</p><pre>ADK Agent<br>    ↓<br>LiteLLM<br>    ↓<br>Ollama provider<br>    ↓<br>localhost:11434<br>    ↓<br>Local model</pre><p>For chat and agent workloads, ollama_chat/... is the important variant to know about because it uses Ollama&#39;s chat API.</p><h4>Option 2: Use Ollama’s OpenAI-Compatible API</h4><p>This is the approach I used:</p><pre>model = LiteLlm(<br>    model=&quot;openai/mistral-small3.1&quot;<br>)</pre><p>Then:</p><pre>export OPENAI_API_BASE=http://localhost:11434/v1<br>export OPENAI_API_KEY=anything</pre><p>The architecture becomes:</p><pre>ADK Agent<br>    ↓<br>LiteLLM<br>    ↓<br>OpenAI-compatible API<br>    ↓<br>localhost:11434/v1<br>    ↓<br>Ollama<br>    ↓<br>Local model</pre><p><strong>Nothing is being sent to OpenAI.</strong></p><p>That’s the important part.</p><p>openai/... tells LiteLLM to use its OpenAI-compatible provider path.</p><p>OPENAI_API_BASE tells that provider where to send the request.</p><p>So:</p><pre>openai/mistral-small3.1<br>          +<br>OPENAI_API_BASE=http://localhost:11434/v1<br>          ↓<br>Use the OpenAI-compatible API,<br>but send the request to my local Ollama.</pre><h4>Why /v1?</h4><p>Ollama exposes both its native API and OpenAI-compatible endpoints.</p><p>Native Ollama chat API:</p><pre>http://localhost:11434/api/chat</pre><p>OpenAI-compatible chat completions API:</p><pre>http://localhost:11434/v1/chat/completions</pre><p>Because we’re using the OpenAI-compatible path, the base URL is:</p><pre>http://localhost:11434/v1</pre><p>And then there’s this:</p><pre>export OPENAI_API_KEY=anything</pre><p>Your local Ollama server doesn’t need a real OpenAI credential. A dummy value can be used to satisfy the client configuration when an API key is expected.</p><h4>The Bigger Lesson: API Interface ≠ Runtime ≠ Model</h4><p>The most useful thing I learned from this setup wasn’t actually about Ollama.</p><p>It was learning to separate three things that are easy to conflate:</p><ul><li><strong>API interface</strong> — how the client communicates with the endpoint.<br>In this case, an OpenAI-compatible API.</li><li><strong>Runtime</strong> — the software actually serving the model.<br>Here, that’s Ollama running on my machine.</li><li><strong>Model</strong> — the model performing the inference.<br>Here, that’s Mistral Small 3.1.</li></ul><p>So:</p><pre>model=&quot;openai/mistral-small3.1&quot;<br>              +<br>OPENAI_API_BASE=http://localhost:11434/v1<br>              ↓<br>API interface → OpenAI-compatible<br>Endpoint      → localhost:11434/v1<br>Runtime       → Ollama<br>Model         → Mistral Small 3.1</pre><p>The openai/ prefix does <strong>not</strong> mean:</p><pre>Send this request to OpenAI.</pre><p>It tells LiteLLM to use its OpenAI-compatible provider path.</p><p>The configured base URL determines where the request actually goes.</p><p>That’s why <strong>OpenAI-compatible does not mean OpenAI-hosted</strong>.</p><p>This distinction matters beyond Ollama.</p><blockquote><strong>OpenAI-compatible APIs are increasingly used as a compatibility layer across local runtimes and inference platforms, allowing the API interface, serving runtime, and underlying model to be chosen independently.</strong></blockquote><p>So when you see:</p><pre>openai/...</pre><p>don’t automatically think:</p><pre>Request → OpenAI</pre><p>Instead, ask:</p><pre>What API interface am I using?<br>              +<br>What endpoint am I calling?<br>              +<br>What runtime is serving it?<br>              +<br>What model is behind it?</pre><p>In my setup:</p><pre>API interface → OpenAI-compatible<br>Endpoint      → localhost:11434/v1<br>Runtime       → Ollama<br>Model         → Mistral Small 3.1</pre><p>That mental model makes architectures like ADK → LiteLLM → Ollama much easier to reason about.</p><h3>What Finally Worked</h3><p>My final configuration was:</p><pre>export OPENAI_API_BASE=http://localhost:11434/v1<br>export OPENAI_API_KEY=anything</pre><p>Then:</p><pre>uv run adk web</pre><p>And my agent used:</p><pre>model = LiteLlm(<br>    model=&quot;openai/mistral-small3.1&quot;<br>)</pre><p>The result:</p><pre>ADK Web<br>   ↓<br>ADK Agent<br>   ↓<br>LiteLLM<br>   ↓<br>OpenAI-compatible API<br>   ↓<br>localhost:11434/v1<br>   ↓<br>Ollama<br>   ↓<br>Mistral Small 3.1</pre><p>ADK Web running locally. Ollama serving the model locally. Inference staying on my machine.</p><p>And the key takeaway from the experiment:</p><blockquote><strong>The API interface, the runtime serving the request, and the model doing the inference are separate architectural choices.</strong></blockquote><p>Once that clicked, the whole setup made much more sense.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a225d18ca88b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond generateContent: Why Gemini’s Interactions API Changes the Application Architecture]]></title>
            <link>https://medium.com/google-cloud/beyond-generatecontent-why-geminis-interactions-api-changes-the-application-architecture-86fe19b4e34c?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/86fe19b4e34c</guid>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Wed, 19 Aug 2026 18:01:29 GMT</pubDate>
            <atom:updated>2026-08-20T01:01:38.805Z</atom:updated>
            <content:encoded><![CDATA[<p><em>From stateless model calls to stateful interactions — and where ADK fits.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OCj9IYELLmk1wLi1JbZxWA.png" /></figure><p>For years, the fundamental model API pattern has been straightforward:</p><pre>Input<br>  ↓<br>Model<br>  ↓<br>Output</pre><p>But AI applications no longer just generate content.</p><p>They maintain conversations. They call tools. They execute multi-step tasks. And increasingly, they invoke agents.</p><p>At that point, <strong>“generate content” starts describing only part of what the application is doing.</strong></p><p>That’s why I find Google’s <strong>Interactions API</strong> interesting.</p><p>As of June 2026, the Interactions API is Generally Available, and Google recommends it for <strong>all</strong> new Gemini API projects. generateContent, now considered the legacy API, remains fully supported.</p><p>This isn’t just a new method:</p><pre>- client.models.generate_content(...)<br>+ client.interactions.create(...)</pre><p>It introduces a different application primitive:</p><blockquote><strong><em>An Interaction represents a complete turn in a conversation or task.</em></strong></blockquote><p>Let’s look at what that changes — and where <strong>ADK</strong> fits.</p><h4>From Model Request to Interaction</h4><p>A basic Interaction is deliberately simple:</p><pre>from google import genai<br><br>client = genai.Client()<br><br>interaction = client.interactions.create(<br>    model=&quot;gemini-3.7-flash&quot;,<br>    input=&quot;Explain optimistic locking in a few sentences.&quot;<br>)<br><br>print(interaction.output_text)</pre><p>For this use case, it doesn’t feel dramatically different from generateContent.</p><p>The difference becomes clearer as the task gets more complex.</p><p>An Interaction can represent a sequence of execution steps:</p><pre>Interaction<br>    │<br>    ├── user input<br>    ├── model execution<br>    ├── tool call<br>    ├── tool result<br>    └── final output</pre><p>So instead of thinking only about:</p><pre>Prompt → Model → Response</pre><p>we can start thinking about:</p><pre>Task → Interaction → Execution → Result</pre><p>That distinction becomes especially useful for stateful and agentic applications.</p><h4>Conversation State Can Move Server-Side</h4><p>This is probably the first feature most developers will notice.</p><p>With a stateless generateContent integration, conversation history ultimately needs to be supplied again on subsequent requests—even if an SDK or framework handles that bookkeeping for you.</p><p>Interactions introduces:</p><pre>previous_interaction_id</pre><p>For example:</p><pre>first = client.interactions.create(<br>    model=&quot;gemini-3.7-flash&quot;,<br>    input=&quot;Review this Python function for concurrency problems.&quot;<br>)<br><br>second = client.interactions.create(<br>    model=&quot;gemini-3.7-flash&quot;,<br>    input=&quot;Now propose a safer implementation.&quot;,<br>    previous_interaction_id=first.id,<br>)</pre><p>Instead of rebuilding the conversation payload, you can continue from the previous Interaction:</p><pre>Interaction A<br>      │<br>      ▼<br>Interaction B<br>      │<br>      ▼<br>Interaction C</pre><p>The server retrieves the prior conversation history.</p><p>Google also notes that this stateful approach can improve implicit context-cache utilization, potentially reducing latency and token costs.</p><p>But there’s an important detail.</p><p><strong>Conversation State ≠ Request Configuration</strong></p><p>previous_interaction_id does <strong>not</strong> automatically carry forward everything from the previous request.</p><p>Google specifically documents these as interaction-scoped:</p><pre>Conversation history       ✓<br>tools                      ✗<br>system_instruction         ✗<br>generation_config          ✗</pre><p>If your next Interaction needs those settings, send them again.</p><blockquote><strong><em>The API can preserve conversational continuity without silently preserving application configuration.</em></strong></blockquote><p>There is also an operational implication: server-side state comes with data-retention considerations.</p><ul><li>For the Gemini Developer API, stored Interactions have documented retention periods that vary by tier and can be configured for paid projects in Google AI Studio.</li><li>Google Cloud has separate data-governance and retention policies, and retention can vary by product and feature — so Vertex AI and Gemini Enterprise Agent Platform users should follow the applicable Google Cloud documentation rather than assuming the Gemini Developer API retention periods apply.</li></ul><p>If you use store=False, that Interaction cannot later be continued using previous_interaction_id.</p><p><strong>Official docs:</strong><br><a href="https://ai.google.dev/gemini-api/docs/interactions-overview">Interactions API — Server-side state and storage</a></p><h4>An Interaction Can Represent Execution, Not Just Output</h4><p>Another important change is that Interactions exposes typed execution steps:</p><pre>interaction.steps</pre><p>Depending on the task, those steps can include things such as function calls, function results, and model output.</p><p>That changes the debugging question from:</p><blockquote><em>Why did I get this response?</em></blockquote><p>toward:</p><blockquote><em>What execution steps produced this response?</em></blockquote><p>For agentic applications, that is a much more useful abstraction.</p><p>One important boundary: <strong>this is not an exposed chain-of-thought trace.</strong></p><p>Think of it as a <strong>typed execution timeline</strong>, not access to the model’s private reasoning.</p><p>That execution model becomes particularly useful when tools enter the picture.</p><h4>Function Calling Fits Naturally Into the Interaction</h4><p>Suppose we give Gemini a weather function:</p><pre>get_weather = {<br>    &quot;type&quot;: &quot;function&quot;,<br>    &quot;name&quot;: &quot;get_weather&quot;,<br>    &quot;description&quot;: &quot;Get the current weather for a location.&quot;,<br>    &quot;parameters&quot;: {<br>        &quot;type&quot;: &quot;object&quot;,<br>        &quot;properties&quot;: {<br>            &quot;location&quot;: {<br>                &quot;type&quot;: &quot;string&quot;<br>            }<br>        },<br>        &quot;required&quot;: [&quot;location&quot;]<br>    }<br>}</pre><p>We can expose it in an Interaction:</p><pre>interaction = client.interactions.create(<br>    model=&quot;gemini-3.7-flash&quot;,<br>    input=&quot;What&#39;s the weather in Seattle?&quot;,<br>    tools=[get_weather],<br>)<br><br>function_call = next(<br>    step for step in interaction.steps<br>    if step.type == &quot;function_call&quot;<br>)<br><br># Execute get_weather() in your application.<br>result = {&quot;temperature&quot;: &quot;58°F&quot;, &quot;conditions&quot;: &quot;Cloudy&quot;}<br><br>final = client.interactions.create(<br>    model=&quot;gemini-3.7-flash&quot;,<br>    previous_interaction_id=interaction.id,<br>    input=[{<br>        &quot;type&quot;: &quot;function_result&quot;,<br>        &quot;name&quot;: function_call.name,<br>        &quot;call_id&quot;: function_call.id,<br>        &quot;result&quot;: result,<br>    }],<br>    tools=[get_weather],<br>)<br><br>print(final.output_text)</pre><p>The model can return a function_call step.</p><p>Your application executes the function and sends the result back in a subsequent Interaction.</p><p>Conceptually:</p><pre>User<br>  ↓<br>Interaction<br>  ↓<br>function_call<br>  ↓<br>Your application<br>  ↓<br>function_result<br>  ↓<br>Interaction<br>  ↓<br>Final response</pre><p>This distinction matters:</p><blockquote><strong><em>The model chooses the function. Your application still executes client-side functions.</em></strong></blockquote><p>Interactions provides the protocol around that execution loop; it doesn’t move arbitrary application code into Google’s runtime.</p><p>Gemini 3 models can also combine supported built-in tools, such as Google Search, with custom functions in the same interaction.</p><p>At the time of writing, however, <strong>built-in + custom tool combinations are Preview and supported for Gemini 3 models</strong>, so treat that capability accordingly.</p><h3>Should I Replace generateContent?</h3><p>Not necessarily.</p><p>Google recommends Interactions for new projects, but generateContent remains fully supported.</p><p>Google currently lists several generateContent capabilities that aren&#39;t yet available through Interactions:</p><ul><li>Batch API</li><li>Explicit caching</li><li>Automatic function calling in Python</li><li>Custom safety settings</li><li>Video metadata</li></ul><p>So I wouldn’t frame the choice as:</p><pre>generateContent = old and bad<br>Interactions    = new and good</pre><p>I’d frame it as:</p><blockquote><strong><em>What abstraction does my application need?</em></strong></blockquote><p>If your application is fundamentally:</p><pre>Input → Model → Output</pre><p>an existing generateContent implementation may be perfectly reasonable.</p><p>If it increasingly looks like:</p><pre>Conversation<br>     +<br>Tools<br>     +<br>Execution steps<br>     +<br>Background work<br>     +<br>Agents</pre><p>Interactions becomes much more interesting.</p><h4>Where Does ADK Fit?</h4><p>This is the part I think is easiest to misunderstand.</p><p>If you already use Google’s <strong>Agent Development Kit</strong>, you might reasonably ask:</p><blockquote><em>ADK already gives me agents, tools, sessions, state, workflows, callbacks, and orchestration. Why do I need Interactions?</em></blockquote><p>Because they operate at different abstraction layers.</p><pre>INTERACTIONS API<br>──────────────────────────<br>Model / agent interaction API<br><br>• Invoke models<br>• Invoke supported agents<br>• Continue interactions<br>• Inspect execution steps<br>• Use supported tools<br>• Run background work</pre><pre>ADK<br>──────────────────────────<br>Agent development framework/runtime</pre><pre>• Define agents<br>• Define tools<br>• Sessions and state<br>• Workflow agents<br>• Callbacks<br>• Multi-agent composition<br>• Agent application logic</pre><p>A useful way to think about it is:</p><p><strong>Interactions:</strong> <em>How does my application interact with a Gemini model or supported agent?</em></p><p><strong><em>ADK:</em></strong><em> How do I define and orchestrate the agent application itself?</em></p><p>That also explains an important distinction.</p><p>previous_interaction_id is NOT an ADK Session</p><p>They can look similar because both involve continuity.</p><p>But they represent different things.</p><pre>Interactions API<br><br>Interaction A<br>     ↓<br>Interaction B<br>     ↓<br>Interaction C<br><br>Continue API conversation history</pre><p>An ADK Session exists within a broader agent runtime:</p><pre>ADK<br><br>User<br>  ↓<br>Session<br>  ├── events<br>  ├── state<br>  └── agent execution</pre><p>So if you’re calling Gemini directly, previous_interaction_id may be enough for conversational continuity.</p><p>If you’re building an agent application with sessions, state, workflows, callbacks, and multiple agents, ADK gives you the broader framework.</p><p>The decision isn’t:</p><blockquote><strong><em>Interactions or ADK?</em></strong></blockquote><p>The better question is:</p><blockquote><strong><em>At what layer am I working?</em></strong></blockquote><h4>The Architecture I Keep in My Head</h4><p>I don’t think of generateContent, Interactions, ADK, and Managed Agents as four competing products—or as one mandatory linear stack.</p><p>I think of them as abstractions with different responsibilities:</p><pre>generateContent<br>      │<br>      └── Stateless model API<br><br>Interactions<br>      │<br>      └── Model / agent interaction API<br>          • server-side conversation state<br>          • typed execution steps<br>          • tools<br>          • background execution<br>ADK<br>      │<br>      └── Agent development framework<br>          • agents<br>          • tools<br>          • sessions / state<br>          • workflows<br>          • orchestration<br><br>Managed Agents <br>      │<br>      └── Hosted agent execution</pre><p>And there’s an important architectural boundary here:</p><p><strong>Don’t assume that every Managed Agent is an ADK agent, or that ADK internally uses Interactions for every model invocation.</strong></p><p>Those aren’t the same thing.</p><p>What Interactions gives us is a more general application-facing abstraction capable of representing increasingly agentic work.</p><p>And I think that’s the real shift.</p><p>We started with:</p><pre>Generate this.</pre><p>We’re increasingly asking:</p><pre>Execute this task.</pre><p>The API abstraction is evolving with the application architecture.</p><p>And that leads to the next question:</p><blockquote><strong><em>What happens when we don’t want to operate the agent runtime ourselves?</em></strong></blockquote><p>That’s where <strong>Managed Agents</strong> enters the story — and where I’ll pick up in the next article!</p><h4>Documentation</h4><p><strong>Gemini API / Google AI Studio</strong></p><ul><li><a href="https://ai.google.dev/gemini-api/docs/interactions-overview">Interactions API overview</a></li><li><a href="https://ai.google.dev/api/interactions-api">Interactions API reference</a></li><li><a href="https://ai.google.dev/api">Gemini API reference</a></li><li><a href="https://ai.google.dev/gemini-api/docs/function-calling">Function calling with the Gemini API</a></li><li><a href="https://ai.google.dev/gemini-api/docs/tool-combination">Combining built-in tools and function calling</a></li><li><a href="https://ai.google.dev/gemini-api/docs/thinking">Gemini thinking</a></li></ul><p><strong>Google Cloud</strong></p><ul><li><a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest">Gemini Enterprise Agent Platform — Interactions API / REST reference</a></li><li><a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/zero-data-retention">Gemini Enterprise Agent Platform — Zero data retention</a></li><li><a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/runtime">Agent Runtime overview</a></li><li><a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/runtime/quickstart-adk">Develop and deploy ADK agents on Agent Runtime</a></li></ul><p><strong>Agent Development Kit (ADK)</strong></p><ul><li><a href="https://adk.dev/">Agent Development Kit documentation</a></li><li><a href="https://adk.dev/sessions/">ADK Sessions documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86fe19b4e34c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/beyond-generatecontent-why-geminis-interactions-api-changes-the-application-architecture-86fe19b4e34c">Beyond generateContent: Why Gemini’s Interactions API Changes the Application Architecture</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.7 Flash: What Breaks, What Changed, and How to Fix Your Code]]></title>
            <link>https://medium.com/google-cloud/migrating-to-gemini-3-7-flash-what-breaks-what-changed-and-how-to-fix-your-code-8f18385f0833?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f18385f0833</guid>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[gemini-flash]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Sun, 16 Aug 2026 14:23:50 GMT</pubDate>
            <atom:updated>2026-08-19T20:54:05.649Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Thinking levels, sampling controls, conversation state, function responses, thought signatures, and the migration issues most likely to break an existing Gemini application.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zORt-Zobqw0jvouZradfyg.jpeg" /></figure><p>Google released <strong>Gemini 3.7 Flash (</strong><strong>gemini-3.7-flash) as Generally Available on August 13 2026</strong>.</p><p>But upgrading an existing application isn’t necessarily as simple as:</p><pre>- model=&quot;gemini-3.6-flash&quot;<br>+ model=&quot;gemini-3.7-flash&quot;</pre><p>Gemini 3.7 Flash continues the API changes introduced across the Gemini 3.x generation: reasoning is increasingly controlled through <strong>thinking levels</strong>, several explicit sampling overrides should be removed during migration, multi-turn applications can use <strong>server-side interaction state</strong>, and agentic applications need to pay closer attention to <strong>function-call state and thought signatures</strong>.</p><p>If you’re upgrading an existing Gemini application, these are the changes I would audit first.</p><blockquote><strong><em>The migration mindset:</em></strong><em> Don’t treat Gemini 3.7 Flash as a model-ID replacement. Audit three layers: </em><strong><em>generation configuration, conversation state, and agent/tool protocol state.</em></strong></blockquote><h3>The 30-Second Migration Checklist</h3><p>Start here if you already have a Gemini application.</p><pre>- model=&quot;gemini-3.6-flash&quot;<br>+ model=&quot;gemini-3.7-flash&quot;<br><br>- temperature=0.2<br>- top_p=0.95<br>- top_k=40<br>- candidate_count=1<br><br>- thinking_budget=4096<br>+ thinking_level=&quot;medium&quot;</pre><p>Then audit your conversation and tool loop:</p><pre>✓ Remove prefilled model turns<br><br>✓ Prefer previous_interaction_id for stateful<br>  multi-turn applications using the Interactions API<br><br>✓ Preserve thought signatures when manually<br>  managing Gemini 3.x conversation history<br><br>✓ If using generateContent, verify FunctionResponse<br>  call_id and name<br><br>✓ If you see Malformed_Function_Call, inspect<br>  structured pre-tool text and inline instruction<br><br>✓ Upgrade google-genai before migration</pre><p>These requirements come directly from Google’s Gemini 3.7 Flash migration checklist.</p><h4>1. First, Know Which Gemini API Surface You’re Using</h4><p>Before changing your code, establish which API surface your application actually uses.</p><p>This matters because some migration requirements differ between them.</p><p><strong>Gemini API / Google AI Studio</strong></p><p>Google AI Studio provides the fastest path for experimenting with Gemini and obtaining an API key for the Gemini Developer API.</p><p>With the Google Gen AI SDK:</p><pre>from google import genai<br>client = genai.Client()</pre><p>For new Gemini API applications, Google now recommends the <strong>Interactions API</strong>.</p><p>Google describes Interactions as the preferred API for building with Gemini models and agents. As of June 2026, it is GA and recommended for new projects.</p><p>The existing generateContent API remains supported, but Google now describes it as the <strong>legacy API for new development</strong>.</p><p><strong>Gemini on Google Cloud</strong></p><p>Gemini 3.7 Flash is also available through Google’s Cloud AI platform, with Google Cloud authentication, IAM, quotas, billing, governance, and enterprise deployment capabilities.</p><p>Google’s current Gemini 3.7 Flash model documentation is available under the <strong>Gemini Enterprise Agent Platform </strong>documentation.</p><p>The important rule for the rest of this article is:</p><blockquote><strong><em>Don’t assume a requirement documented for </em></strong><strong><em>generateContent, the Interactions API, or a particular Google Cloud API surface automatically applies identically to all the others.</em></strong></blockquote><p>I’ll call out those boundaries explicitly.</p><h4>2. Upgrade the SDK and Model ID</h4><p>First, upgrade the Google Gen AI SDK:</p><pre>pip install --upgrade google-genai</pre><p>Then change your model identifier:</p><pre>MODEL_ID = &quot;gemini-3.7-flash&quot;</pre><p>Gemini 3.7 Flash supports a <strong>1,048,576-token input context window</strong> and up to <strong>65,536 output tokens</strong>.</p><p>The model supports multimodal input — including text, images, video, audio, and PDFs — along with function calling, structured outputs, code execution, and grounding capabilities.</p><p>Because feature availability can vary by API/platform, use the relevant model card as your source of truth when deploying.</p><h4>3. Move from thinking_budget to thinking_level</h4><p>If your existing application controls reasoning with a numeric thinking budget, this is one of the first configurations to revisit.</p><p>Older configuration:</p><pre>config={<br>    &quot;thinking_budget&quot;: 4096<br>}</pre><p>For Gemini 3.7 Flash, migrate to:</p><pre>config={<br>    &quot;thinking_level&quot;: &quot;medium&quot;<br>}</pre><p>Google’s Gemini 3.7 migration checklist explicitly instructs developers to replace thinking_budget with thinking_level.</p><p>Gemini 3.7 Flash supports:</p><pre>low<br>medium<br>high</pre><p>with <strong>medium as the default</strong>.</p><p>A practical starting point is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*L8yVTZ2VOzPaqzZiGltFPg.png" /></figure><p>Thinking level is a <strong>reasoning-effort control</strong>, not a replacement name for sampling temperature.</p><p>Higher isn’t automatically better: increasing reasoning effort can affect latency and token consumption, so benchmark thinking levels against your workload rather than defaulting every request to high.</p><h4>4. Migration Gotcha: minimal Isn&#39;t Supported</h4><p>Don’t assume thinking levels supported by another Gemini model carry over unchanged.</p><p>Gemini 3.7 Flash supports:</p><pre>low<br>medium<br>high</pre><p>It does <strong>not</strong> support:</p><pre>minimal</pre><p>So this should not survive your migration:</p><pre>config={<br>    &quot;thinking_level&quot;: &quot;minimal&quot;<br>}</pre><p>For latency-sensitive workloads, evaluate:</p><pre>config={<br>    &quot;thinking_level&quot;: &quot;low&quot;<br>}</pre><p>instead.</p><p>This is exactly the kind of configuration that can be easy to miss when a migration appears to be only a model-ID change.</p><h4>5. Stop Explicitly Overriding Deprecated Sampling Controls</h4><p>This section needs an important distinction.</p><p>Google’s Gemini 3.7 migration guidance tells developers to remove explicit overrides for:</p><pre>temperature<br>top_p<br>top_k</pre><p>and rely on the model’s supported/default behavior.</p><p>So if your older configuration looks like:</p><pre>config={<br>    &quot;temperature&quot;: 0.2,<br>    &quot;top_p&quot;: 0.95,<br>    &quot;top_k&quot;: 40,<br>    &quot;thinking_budget&quot;: 4096<br>}</pre><p>the migrated configuration becomes much simpler:</p><pre>config={<br>    &quot;thinking_level&quot;: &quot;medium&quot;<br>}</pre><h4>Are temperature, top_p, and top_k completely gone?</h4><p>This is where wording matters.</p><p>Google Cloud still documents model defaults for sampling configuration. The migration guidance, however, tells developers to <strong>remove explicit overrides</strong>.</p><p>So I would not describe these parameters as universally nonexistent.</p><p>The safer migration rule is:</p><blockquote>For Gemini 3.7 Flash migration, remove explicit temperature, top_p, and top_k settings. Google recommends allowing Gemini 3.x models to manage sampling automatically. candidate_count is a separate case: it is unsupported in Gemini 3.x.</blockquote><p>There’s a separate case:</p><pre>candidate_count</pre><p>Google’s 3.7 migration checklist explicitly identifies candidate_count as <strong>unsupported in Gemini 3.x</strong>.</p><p>That distinction is worth preserving:</p><pre>temperature<br>top_p                 → remove explicit overrides<br>top_k</pre><pre>candidate_count       → unsupported in Gemini 3.x</pre><p>Also avoid interpreting the removal of explicit sampling controls as meaning Gemini 3.7 is “deterministic.”</p><h4>6. For New Gemini API Applications, Understand the Interactions API</h4><p>The model migration is also a good time to examine how you’re managing conversations.</p><p>For new Gemini API applications, Google recommends the <strong>Interactions API</strong>.</p><p>A basic interaction looks conceptually like:</p><pre>from google import genai <br><br>client = genai.Client()<br><br>interaction = client.interactions.create(<br>    model=&quot;gemini-3.7-flash&quot;,<br>    input=&quot;Analyze this stack trace and propose a safe patch plan.&quot;,<br>    generation_config={<br>        &quot;thinking_level&quot;: &quot;medium&quot;<br>    }<br>)<br>print(interaction.output_text)</pre><p>The important architectural difference appears when you have a multi-turn conversation.</p><p>Instead of repeatedly rebuilding the entire conversation history, the Interactions API supports server-side state through:</p><pre>previous_interaction_id</pre><p>For example:</p><pre>first = client.interactions.create(<br>    model=&quot;gemini-3.7-flash&quot;,<br>    input=&quot;Review this Python function for concurrency issues.&quot;<br>)<br><br>second = client.interactions.create(<br>    model=&quot;gemini-3.7-flash&quot;,<br>    input=&quot;Now rewrite it using a safer locking strategy.&quot;,<br>    previous_interaction_id=first.id,<br>)</pre><p>Google’s Gemini 3.7 migration checklist specifically recommends standardizing multi-turn conversations around server-side previous_interaction_id.</p><h4>7. previous_interaction_id preserves History—not Configuration</h4><p>This is a subtle but important distinction.</p><p>When you use:</p><pre>previous_interaction_id=first.id</pre><p>the previous interaction provides conversation context.</p><p>But interaction-scoped configuration does <strong>not necessarily carry forward</strong>.</p><p>That includes settings such as:</p><ul><li>system instructions</li><li>tools</li><li>generation configuration</li></ul><p>If your next interaction requires those settings, specify them again.</p><p>Think of it this way:</p><pre>previous_interaction_id<br>        │<br>        ├── conversation context ✓<br>        │<br>        └── request configuration ✗</pre><p>This is an easy source of confusing behavior when migrating a manually managed chat implementation to server-side state.</p><h4>8. Server-Side State Also Has a Storage Implication</h4><p>There is another production consideration developers shouldn’t overlook.</p><p>Interactions are stored by default when:</p><pre>store=true</pre><p>Google currently documents stored-interaction retention of:</p><ul><li><strong>55 days on the paid tier</strong></li><li><strong>1 day on the free tier</strong></li></ul><p>You can use:</p><pre>store=false</pre><p>when you don’t want the interaction stored.</p><p>But there’s a tradeoff:</p><blockquote><em>An interaction created with </em><em>store=false cannot subsequently be referenced through </em><em>previous_interaction_id.</em></blockquote><p>So conversation architecture and data-retention policy are connected decisions.</p><p>For a prototype, that may be easy to ignore.</p><p>For a production agent handling enterprise data, it shouldn’t be.</p><h3>9. Remove Prefilled Model Turns</h3><p>Google’s Gemini 3.7 migration checklist explicitly says to:</p><blockquote><strong><em>Remove prefilled model turns.</em></strong></blockquote><p>A prefilled model turn is a pattern where the application inserts the beginning of the model’s answer and expects Gemini to continue it.</p><p>Conceptually:</p><pre>user:<br>Return the incident classification as JSON.</pre><pre>model:<br>{<br>  &quot;severity&quot;:</pre><p>That pattern shouldn’t be carried into a Gemini 3.7 migration.</p><p>If your goal is to constrain output shape, use supported <strong>structured output</strong> mechanisms instead of manufacturing a partial model response.</p><h4>10. Agent Builders: Don’t Lose Thought Signatures</h4><p>If you’re building agents or multi-step function-calling workflows, this is one of the most important Gemini 3.x concepts to understand.</p><p>Gemini uses thought signatures as encrypted representations of internal reasoning state that can be required to preserve context across multi-step and function-calling interactions</p><p>These signatures are protocol metadata — not chain-of-thought text for your application to inspect.</p><p>The problem typically appears when an application manually reconstructs model history.</p><p>Imagine Gemini returns something conceptually like:</p><pre>model response<br>├── function call<br>└── thought signature</pre><p>Your application extracts the function call:</p><pre>function call</pre><p>but discards the associated signature before constructing the next request.</p><p>You’ve potentially thrown away state Gemini expects to see again.</p><p>Google Cloud’s migration documentation notes that for newer Gemini 3 models, if a required thought signature is missing, the model can return an error rather than merely warning about it.</p><h4>Practical rule</h4><p>If you’re using generateContent and manually maintaining history:</p><blockquote><strong><em>Preserve the model response parts and required thought signatures exactly as documented.</em></strong></blockquote><p>If you’re using server-side state through the Interactions API, you substantially reduce the amount of conversation/protocol state your application has to reconstruct manually.</p><h4>11. generateContent Users: Audit Your Function Responses</h4><p>This requirement is specifically important if your application remains on the generateContent API.</p><p>Google’s Gemini 3.7 migration checklist says:</p><blockquote><strong><em>Only if using </em></strong><strong><em>generateContent: ensure all </em></strong><strong><em>FunctionResponse objects include </em></strong><strong><em>call_id and </em></strong><strong><em>name.</em></strong></blockquote><p><strong>A note on API surfaces:</strong> The exact correlation field differs across Gemini API surfaces. The Gemini 3.7 migration checklist for generateContent refers to call_id and name, while Google Cloud documentation describes matching the FunctionResponse to the corresponding function-call id and name. Follow the contract documented for the API surface you are using rather than treating call_id and id as interchangeable.</p><p>Conceptually, every tool result needs to be correlated with the function call that produced it:</p><pre>FunctionCall<br>     │<br>     │ correlation ID + function name<br>     ▼<br>Your tool executes<br>     │<br>     ▼<br>FunctionResponse<br>     │<br>     └── match the original call</pre><p>Don’t treat function responses as anonymous blobs of JSON.</p><p>They are part of the agent execution protocol.</p><h4>12. A Function-Response Mismatch May Fail Quietly</h4><p>Here’s one of the migration behaviors I’d specifically test for.</p><p>Google Cloud’s migration documentation says function responses should:</p><ul><li>include the corresponding call ID</li><li>use the matching function name</li><li>provide exactly one response per function call</li></ul><p>But the documentation also warns that the API may <strong>not currently return a direct validation error</strong> for every mismatch.</p><p>Instead, an incorrect mapping can result in an empty model response with:</p><pre>finish_reason: STOP</pre><p>That can be frustrating to debug because:</p><pre>Tool executed successfully<br>        ↓<br>No obvious API error<br>        ↓<br>Model returns empty output<br>        ↓<br>&quot;Why did my agent just stop?&quot;</pre><p>So if an agent unexpectedly terminates after tool execution, don’t inspect only the tool implementation.</p><p>Inspect the mapping between:</p><pre>FunctionCall → FunctionResponse</pre><p>as well.</p><h4>13. Seeing Malformed_Function_Call? Inspect Pre-Tool Text</h4><p>There’s another subtler failure mode.</p><p>Some agent prompts ask the model to produce structured status text immediately before invoking a tool.</p><p>For example:</p><pre>&lt;status&gt;<br>Searching production logs...<br>&lt;/status&gt;</pre><p>followed immediately by a function call.</p><p>Google documents cases where structured pre-tool text can contribute to:</p><pre>Malformed_Function_Call</pre><p>Google’s Gemini 3.7 migration checklist specifically tells developers to review the documented workarounds when encountering this failure mode and also calls out separating inline instructions with:</p><pre>\n\n</pre><p>One possible workaround is to model progress reporting itself as a function:</p><pre>update_tool = {<br>    &quot;name&quot;: &quot;update&quot;,<br>    &quot;description&quot;: &quot;Report progress during a multi-step task.&quot;,<br>    &quot;parameters&quot;: {<br>        &quot;type&quot;: &quot;OBJECT&quot;,<br>        &quot;properties&quot;: {<br>            &quot;previous_step&quot;: {&quot;type&quot;: &quot;STRING&quot;},<br>            &quot;plan&quot;: {&quot;type&quot;: &quot;STRING&quot;},<br>            &quot;next_step&quot;: {&quot;type&quot;: &quot;STRING&quot;}<br>        },<br>        &quot;required&quot;: [<br>            &quot;previous_step&quot;,<br>            &quot;plan&quot;,<br>            &quot;next_step&quot;<br>        ]<br>    }<br>}</pre><p>Then the model can produce structured progress through a tool call rather than generating custom XML or JSON immediately before another tool invocation.</p><p>But this distinction matters:</p><blockquote><strong><em>update() is a workaround/pattern—not a required Gemini 3.7 function.</em></strong></blockquote><p>Don’t add it to every agent simply because you’re upgrading.</p><h4>14. Multimodal Application? Run a Separate Migration Evaluation</h4><p>If your application processes images, video, audio, or PDFs, don’t stop after verifying that text prompts still work.</p><p>Google’s broader Gemini migration guidance documents changes across Gemini 3.x related to areas such as:</p><ul><li>media tokenization and resolution</li><li>PDF handling</li><li>usage metadata</li><li>scanned PDF behavior</li><li>multimodal function responses</li><li>some image-processing capabilities</li></ul><p>Those changes aren’t all unique to Gemini 3.7 Flash, so I wouldn’t classify them as “3.7 breaking changes.”</p><p>But they matter when the application you’re migrating is multimodal.</p><p>My rule would be:</p><blockquote><strong><em>Treat multimodal regression testing as a separate migration track.</em></strong></blockquote><p>If your production workload processes 100-page PDFs, don’t validate the migration with a two-line text prompt.</p><p>Test the PDFs.</p><p>If your agent reasons over video, benchmark video.</p><p>Migration testing should represent the actual workload.</p><h4>15. Pricing: Watch Output and Thinking, Not Just Input</h4><p>Gemini 3.7 Flash launched with introductory pricing.</p><p>Through <strong>December 31, 2026</strong>, Google’s published standard pricing is:</p><pre>Input:   $0.75 / 1M tokens<br>Output:  $3.75 / 1M tokens</pre><p>Beginning <strong>January 1, 2027</strong>:</p><pre>Input:   $1.50 / 1M tokens<br>Output:  $7.50 / 1M tokens</pre><p>Google states that the introductory pricing applies across Google AI Studio and Gemini Enterprise Agent Platform during the promotional period.</p><p>Google Cloud also provides different pricing modes, including Priority and Flex/Batch options, so check the pricing model corresponding to your deployment.</p><p>For agent developers, the important point isn’t simply the input price.</p><p>Your cost equation increasingly looks more like:</p><pre><br>cost<br> =<br>input tokens<br>+ output tokens (including thinking tokens)<br>+ additional calls/tool-loop iterations<br>+ any separately priced tools/grounding</pre><p>So don’t choose:</p><pre>thinking_level=&quot;high&quot;</pre><p>globally because it sounds better.</p><p>Benchmark quality, latency, and token consumption against your actual workload.</p><h4>Before → After: What the Migration Really Looks Like</h4><p>Suppose your older application has accumulated configuration like this:</p><pre>config = {<br>    &quot;temperature&quot;: 0.2,<br>    &quot;top_p&quot;: 0.95,<br>    &quot;top_k&quot;: 40,<br>    &quot;candidate_count&quot;: 1,<br>    &quot;thinking_budget&quot;: 4096,<br>}</pre><p>and manually maintains:</p><pre>user → model → user → model → tool → model</pre><p>history.</p><p>It’s tempting to think the migration is:</p><pre>- gemini-3.6-flash<br>+ gemini-3.7-flash</pre><p>It’s better to think about it in <strong>three layers</strong>.</p><h4>Layer 1 — Generation Configuration</h4><pre>- temperature=0.2<br>- top_p=0.95<br>- top_k=40<br>- candidate_count=1<br>- thinking_budget=4096</pre><pre>+ thinking_level=&quot;medium&quot;</pre><h4>Layer 2 — Conversation State</h4><p>For an appropriate Interactions API application:</p><pre>- manually reconstruct every previous turn</pre><pre>+ previous_interaction_id=previous.id</pre><h4>Layer 3 — Agent Protocol State</h4><pre>- treat tool calls/results as ordinary JSON</pre><pre>+ preserve function-call correlation<br>+ preserve required reasoning metadata</pre><p>That’s the real migration.</p><h4>Production Migration Checklist</h4><p>Before promoting Gemini 3.7 Flash into production:</p><h4>Model</h4><ul><li>Upgrade google-genai.</li><li>Change the model ID to gemini-3.7-flash.</li><li>Verify required capabilities against the model card for your API/platform.</li></ul><h3>Reasoning and generation</h3><ul><li>Replace thinking_budget with thinking_level.</li><li>Verify you aren’t using minimal.</li><li>Remove explicit temperature overrides according to the migration guidance.</li><li>Remove explicit top_p.</li><li>Remove explicit top_k.</li><li>Remove candidate_count.</li></ul><h3>Conversation state</h3><ul><li>Remove prefilled model turns.</li><li>For new Gemini API applications, evaluate the Interactions API.</li><li>Consider previous_interaction_id for stateful conversations.</li><li>Understand store=true and retention before using server-side state with production data.</li><li>Re-specify request-scoped configuration where required.</li></ul><h3>Agents and tools</h3><ul><li>Identify whether you’re using Interactions or generateContent.</li><li>For generateContent, verify FunctionResponse call_id and name.</li><li>Verify one response maps to the correct function call.</li><li>Preserve required thought signatures when manually maintaining history.</li><li>Investigate function-response mapping if the model unexpectedly ends with an empty response.</li><li>Investigate structured pre-tool text if you’re seeing Malformed_Function_Call.</li></ul><h3>Evaluation</h3><ul><li>Regression-test real production prompts.</li><li>Regression-test complete tool loops — not only the first model call.</li><li>Test low, medium, and high against quality and latency targets.</li><li>Measure token consumption.</li><li>Run separate multimodal evaluations if you use images, PDFs, audio, or video.</li><li>Recalculate cost using the pricing mode you’ll actually deploy.</li></ul><h4>The Bigger Change Isn’t the Model ID</h4><p>The most interesting part of this migration isn’t:</p><pre>model=&quot;gemini-3.7-flash&quot;</pre><p>It’s what the surrounding API changes tell us about how Gemini applications are evolving.</p><p>The old mental model for an LLM application was roughly:</p><pre>Prompt<br>  ↓<br>Model<br>  ↓<br>Text</pre><p>An increasingly useful mental model for agentic systems is:</p><pre>Interaction<br>     ↓<br>Reasoning state<br>     ↓<br>Tool call<br>     ↓<br>Tool result<br>     ↓<br>Continued reasoning<br>     ↓<br>Next action<br>     ↓<br>Final response</pre><p>Once you see the system this way, some seemingly strange migration requirements make more sense.</p><p>thinking_level isn&#39;t just another generation knob.</p><p>previous_interaction_id isn&#39;t just a convenience method.</p><p>Thought signatures aren’t random metadata.</p><p>Function-call IDs aren’t bookkeeping you can casually discard.</p><p>They’re pieces of an execution protocol for models that increasingly operate across multiple reasoning and tool-use steps.</p><p>So if your application suddenly starts failing after:</p><pre>- gemini-3.6-flash<br>+ gemini-3.7-flash</pre><p>don’t only debug the prompt.</p><p><strong>Debug the protocol around the prompt.</strong></p><p>That may be the most useful Gemini 3.7 migration lesson of all.</p><h4>Official Documentation</h4><p><strong>Gemini 3.7 Flash</strong></p><ul><li><a href="https://ai.google.dev/gemini-api/docs/latest-model">Google AI — Gemini 3.7 Flash</a></li><li><a href="https://ai.google.dev/gemini-api/docs/models/gemini-3.7-flash">Google AI — Gemini 3.7 Flash model card</a></li><li><a href="https://ai.google.dev/gemini-api/docs/changelog">Google AI — Gemini API release notes</a></li><li><a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/3-7-flash">Google Cloud — Gemini 3.7 Flash</a></li><li><a href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/migrate">Google Cloud — Gemini migration guide</a></li></ul><p><strong>Interactions and State</strong></p><ul><li><a href="https://ai.google.dev/gemini-api/docs/interactions-overview">Google AI — Interactions API</a></li><li><a href="https://ai.google.dev/gemini-api/docs/thought-signatures">Google AI — Thought signatures</a></li><li><a href="https://ai.google.dev/gemini-api/docs/generate-content/thought-signatures">Google AI — Thought signatures with generateContent</a></li></ul><p><strong>Tools and Structured Output</strong></p><ul><li><a href="https://ai.google.dev/gemini-api/docs/function-calling">Google AI — Function calling</a></li><li><a href="https://ai.google.dev/gemini-api/docs/structured-output">Google AI — Structured output</a></li></ul><p><strong>Platforms and Pricing</strong></p><ul><li><a href="https://aistudio.google.com/">Google AI Studio</a></li><li><a href="https://ai.google.dev/gemini-api/docs">Gemini API documentation</a></li><li><a href="https://ai.google.dev/gemini-api/docs/pricing">Gemini API pricing</a></li><li><a href="https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing">Google Cloud — Generative AI pricing</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f18385f0833" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/migrating-to-gemini-3-7-flash-what-breaks-what-changed-and-how-to-fix-your-code-8f18385f0833">Migrating to Gemini 3.7 Flash: What Breaks, What Changed, and How to Fix Your Code</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[Skills vs. Tools: Do You Want Your AI to “Know” or to “Do”?]]></title>
            <link>https://medium.com/google-cloud/skills-vs-tools-do-you-want-your-ai-to-know-or-to-do-3f96d665aba5?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f96d665aba5</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[google-adk]]></category>
            <category><![CDATA[agent-skills]]></category>
            <category><![CDATA[google-gemini]]></category>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 13:32:26 GMT</pubDate>
            <atom:updated>2026-03-31T02:30:39.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOx-95IaiLl98RKleqIeDw.png" /><figcaption>Image Courtesy: Nano Banana</figcaption></figure><p>In my <a href="https://medium.com/google-cloud/elevating-agent-intelligence-with-google-adk-skills-638e46d1c474">last post</a>, I talked about how Skills help solve the “Overloaded Agent” problem by modularizing knowledge.</p><p>But something felt a bit confusing to me:</p><p>To give an agent a Skill… you actually add it to the tools list.</p><p>To make this concrete, here’s a simple example.<br>Notice how the Skill is added to the agent</p><pre>import pathlib<br><br>from google.adk import Agent<br>from google.adk.skills import load_skill_from_dir<br>from google.adk.tools import skill_toolset<br><br>weather_skill = load_skill_from_dir(<br>    pathlib.Path(__file__).parent / &quot;skills&quot; / &quot;weather_skill&quot;<br>)<br><br>my_skill_toolset = skill_toolset.SkillToolset(<br>    skills=[weather_skill]<br>)<br><br>root_agent = Agent(<br>    model=&quot;gemini-2.5-flash&quot;,<br>    name=&quot;skill_user_agent&quot;,<br>    description=&quot;An agent that can use specialized skills.&quot;,<br>    instruction=(<br>        &quot;You are a helpful assistant that can leverage skills to perform tasks.&quot;<br>    ),<br>    tools=[<br>        my_skill_toolset,<br>    ],<br>)</pre><p>So what’s really going on here?</p><p>If <em>Skills are exposed as tools</em>, what’s the actual difference?</p><h4>The core idea that clicked for me</h4><p>This is the simplest way I’ve started thinking about it:</p><pre>Tools are the Hands  <br>Skills are the Brain</pre><ul><li><strong>Tools</strong> let the agent act</li><li><strong>Skills</strong> help the agent think</li></ul><p>And most importantly:</p><blockquote><em>Most agents don’t fail because they lack tools.<br>They fail because they don’t know how to use them effectively.</em></blockquote><h4>Skills: The “Expertise” Layer</h4><p>A Skill is a capability module.</p><p>It doesn’t just perform a task — it provides the instructions, structure, and context needed to perform that task well.</p><ul><li><strong>Primary job:</strong> Contextual reasoning and guidance</li><li><strong>Examples:</strong></li><li>a Financial Audit Skill</li><li>a Brand Voice Skill</li><li>a Debugging Skill</li></ul><p>The key difference:</p><p>Skills don’t sit in the agent’s context all the time.</p><p>They are <strong>loaded only when needed</strong>.</p><p>This is what makes them powerful.</p><h4>Why this distinction matters</h4><p>Without this separation, agents tend to:</p><ul><li>accumulate too many tools</li><li>lose focus</li><li>struggle with decision-making</li></ul><p>With Skills:</p><ul><li>reasoning becomes structured</li><li>context stays lean</li><li>capabilities become reusable</li></ul><p>It’s the difference between:</p><ul><li>having access to everything</li><li>vs knowing what to use, when</li></ul><h4>When to use which</h4><p>My rule of thumb:</p><ul><li>Use a <strong>Tool</strong> when the agent needs to <em>act</em></li><li>Use a <strong>Skill</strong> when the agent needs to <em>think</em></li></ul><p>The most powerful agents combine both.</p><p>A Skill provides the <strong>how</strong><br>A Tool provides the <strong>do</strong></p><h4>A Question from the Community: Skills vs. Handoffs</h4><p>Someone asked a great question on my last post: <em>“When should we prefer using ADK Skills within one agent, versus a setup where a manager agent hands off tasks to specialized sub-agents?”</em></p><p>This question actually gets to the heart of how we design agents.: the difference between <strong>managing context</strong> and <strong>managing complexity.</strong> In the Google ADK, Skills and sub-agents solve two different scaling problems.</p><blockquote>One scales <strong>context inside an agent</strong>.<br>The other scales <strong>coordination across agents</strong>.</blockquote><h4>The Short Answer: One Brain vs. Many Specialists</h4><ul><li><strong>Skills are for “One Agent, Many Procedures.”</strong> Use them when you want a single assistant to stay in character but need to keep its “head” clear of massive manuals until they are actually needed.</li><li><strong>Sub-agents are for “Many Agents, Structured Coordination.”</strong> Use them when the task is multi-step, requires different models (cheap router vs. heavy reasoner), or needs strict security boundaries.</li></ul><h4>When to choose Skills (Internal Expertise)</h4><p>Skills are essentially <strong>“just-in-time” knowledge</strong>. They are perfect for a generalist assistant that needs to go deep on a specific topic only when asked.</p><ul><li><strong>Consistency:</strong> You want the same persona, the same “vibe,” and a single continuous conversation thread.</li><li><strong>Context Efficiency:</strong> Instead of stuffing 20 different 50-page SOPs into the prompt (Context Bloat), you use <strong>Incremental Loading</strong>. The agent sees the index and only pulls in the deep resources when triggered.</li><li><strong>The “Inlining” Caveat:</strong> If a capability is used 100% of the time, <strong>don’t make it a Skill.</strong> Skills add a small overhead (a round-trip to load the data). In that case, it’s faster to put those instructions directly in the main system prompt.</li></ul><h4>When to choose Sub-Agents (Architectural Handoffs)</h4><p>Sub-agents are about <strong>Specialization and Guardrails</strong>. In the ADK, you can use a “Manager Agent” to route tasks to these specialists.</p><ul><li><strong>Capability Partitioning (Security):</strong> If you have a tool that can delete database records, you might not want your general “Chat Agent” to even see it. You put that tool inside an “Admin Sub-Agent” so it’s isolated.</li><li><strong>Workflow Structure:</strong> For multi-step pipelines (Fetch -&gt; Analyze -&gt; Chart), a <strong>Workflow Agent</strong> can coordinate these steps more reliably than a single agent trying to juggle it all.</li><li><strong>Model Optimization:</strong> Use a smaller, faster model for the “Manager” to save costs on routing, and only trigger a high-reasoning model for the specialized sub-task.</li></ul><h4>Clearing the Tabs</h4><p>I’m still working on finding that perfect balance in my daily schedule — trying to make sure I’m not just “acting” (like a Tool) but also taking the time to “learn” (like a Skill).</p><p>Sometimes it feels like I have too many tabs open in my own life, but breaking things down into these modular posts is helping me clear the clutter. Getting back into a consistent rhythm isn’t always easy, but sharing these moments makes the process feel worth it.</p><p>I didn’t set out to write a technical manual today. I just wanted to share the distinction that made things click for me. I’m excited to keep this momentum going.</p><p><strong>In the next post, I’ll be moving from theory to practice and building a Skill end-to-end. See you there!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f96d665aba5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/skills-vs-tools-do-you-want-your-ai-to-know-or-to-do-3f96d665aba5">Skills vs. Tools: Do You Want Your AI to “Know” or to “Do”?</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[Elevating Agent Intelligence with Google ADK “Skills”]]></title>
            <link>https://medium.com/google-cloud/elevating-agent-intelligence-with-google-adk-skills-638e46d1c474?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/638e46d1c474</guid>
            <category><![CDATA[llm-agent]]></category>
            <category><![CDATA[google-adk]]></category>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[agent-skills]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 01:43:01 GMT</pubDate>
            <atom:updated>2026-03-30T03:16:19.337Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*503QMRtdGGDy-6b8theG8A.png" /><figcaption>Image Courtesy: Nano banana2</figcaption></figure><h4>Trying to understand why agents feel… overloaded</h4><p>I’ve been trying to understand why some agents feel “smart”… and others just feel overloaded.</p><p>One pattern I keep running into is something I’d call <strong>context bloat</strong>.</p><p>When you pack everything into an agent’s system prompt — API schemas, detailed instructions, complex workflows — you quickly hit a wall:</p><ul><li>Higher costs (those tokens add up fast)</li><li>Slower performance</li><li>Confused outputs</li></ul><p>It’s like solving a problem with too many tabs open in your head.<br>The more you add, the harder it becomes to think clearly.</p><h4><strong>An idea that changed how I see this</strong></h4><p>One idea that stood out to me recently was <strong>Skills</strong> in Google’s Agent Development Kit.</p><p>On the surface, it looks simple — almost like a way to organize files.</p><p>But it actually points to a deeper shift in how we design agents.</p><h4>What are ADK Skills?</h4><p>At its core, a <strong>Skill</strong> is a self-contained unit of functionality.</p><p>The simplest way I think about it:</p><blockquote>A <strong><em>Skill</em></strong> is something your agent <em>knows how to do</em> — but doesn’t always carry around.</blockquote><p>Think of it like a plugin or a capability module.</p><p>Instead of teaching your agent everything upfront — weather APIs, financial logic, debugging — you give it the ability to <strong>load the right capability when needed</strong>.</p><h4>The moment it clicked for me</h4><p>This was the key insight:</p><blockquote><em>You don’t make agents smarter by giving them more context.<br>You make them smarter by giving them the </em>right context at the right time.</blockquote><p><strong><em>That’s what Skills enable.</em></strong></p><h4>Why Skills matter: reducing context bloat</h4><p>The core idea behind Skills is <strong>incremental loading</strong>.</p><p>Instead of stuffing everything into one massive system prompt, you break capabilities into modules.</p><p>So instead of one heavy agent trying to juggle:</p><ul><li>Weather systems</li><li>Financial audits</li><li>Debugging logic</li></ul><p>You get a lean agent that pivots based on the need:</p><pre>Agent → loads Weather Skill  <br>Agent → loads Audit Skill  <br>Agent → loads Debug Skill</pre><p>The agent only “reads” what it needs for the task at hand. That means: <strong>smaller context, faster execution, and more focused reasoning.</strong></p><h4>The Anatomy of a Skill</h4><p>To make this work, ADK structures Skills in a simple three-level hierarchy.</p><p>It’s essentially a clean directory structure that keeps the agent’s “brain” organized:</p><ul><li><strong>L1: Metadata (</strong><strong>SKILL.md)</strong><br>Defines what the skill is for, so the agent knows when to use it</li><li><strong>L2: Instructions</strong><br>The step-by-step logic that tells the agent how to perform the task</li><li><strong>L3: Resources</strong><br>Supporting material like:</li><li>/references → detailed guides or workflows</li><li>/assets → API schemas, templates, data</li></ul><p>By organizing it this way, the agent only “reads” deeper resources when needed.</p><h4>Why this feels like a bigger shift</h4><p>At first, this might feel like a small architectural improvement.</p><p>But it actually changes how you build agents.</p><ul><li><strong>Without Skills:</strong> Everything gets bundled together, prompts become massive, and systems become harder to maintain.</li><li><strong>With Skills:</strong> Capabilities are modular, behavior is composable, and systems scale more naturally.</li></ul><h4>My takeaway</h4><p>This idea really stuck with me:</p><blockquote>We’re not just saving on token costs — we’re changing how agents think and operate.</blockquote><blockquote>We’re moving from agents that try to <em>know</em> everything to agents that know how to <em>use</em> the right capability at the right time.</blockquote><h4><strong><em>Clearing the Tabs</em></strong></h4><p>I’ve been trying to get myself back into a schedule the last few days. It’s funny — while I’m building agents that don’t feel “overloaded,” I’m trying to do the same for my own routine.</p><p>I didn’t set out to write something particularly deep today. I just wanted to sit down, understand this one idea, and share it before the day got away from me. Honestly, just getting this down on “paper” feels like a win.</p><p>In my next post, I’ll dig into the actual code and build a simple Skill end-to-end. Until then, keep your prompts lean.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=638e46d1c474" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/elevating-agent-intelligence-with-google-adk-skills-638e46d1c474">Elevating Agent Intelligence with Google ADK “Skills”</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[Beyond Just Looking: Gemini 3 Now Has Agentic Vision]]></title>
            <link>https://medium.com/google-cloud/beyond-just-looking-gemini-3-now-has-agentic-vision-b20c7c6809ce?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/b20c7c6809ce</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[multimodal]]></category>
            <category><![CDATA[gemini-3-flash]]></category>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 22:24:07 GMT</pubDate>
            <atom:updated>2026-01-29T03:07:16.317Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine showing an AI a photo of a messy workshop and asking:</p><blockquote>“How many hex bolts are in that bin?”</blockquote><p>Traditionally, a multimodal LLM would make a <em>best guess</em> based on a single pass over the image — sometimes correct, sometimes confidently wrong.</p><p>But what if the AI could pause, reason about the task, <strong>write a Python script to zoom into the bin</strong>, apply a counting algorithm, draw bounding boxes around each bolt — and then verify its own work?</p><p>That’s no longer science fiction.</p><p>With <strong>Agentic Vision</strong> in <strong>Gemini 3 Flash</strong>, image understanding shifts from passive observation to <strong>active investigation</strong>, grounding answers in visual evidence rather than plausibility.</p><h4>Agentic Vision: From Seeing to Investigating</h4><p>Agentic Vision represents a fundamental change in how multimodal models reason about images. Instead of describing what they see, models can now <strong>interact with images as environments</strong>.</p><p>At its core is a rigorous <strong>Think → Act → Observe</strong> loop:</p><ul><li><strong>Think:</strong> The model analyzes the user’s request and the initial image, then formulates a multi-step plan.<br>For example: <em>“The objects are small. I need to zoom in, isolate regions, and count them.”</em></li><li><strong>Act:</strong> The model generates and executes <strong>Python code</strong> to manipulate or analyze the image — cropping regions of interest, running calculations, counting objects, or drawing annotations.</li><li><strong>Observe:</strong> The transformed image (for example, a high-resolution crop or annotated output) is appended back into the model’s context window, allowing it to inspect the results before producing a final answer. This loop enables Gemini 3 Flash to reason <em>with</em> images, not just <em>about</em> them.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*epsfSl4bqoI2X5p9FtJe7Q.png" /><figcaption><a href="https://blog.google/innovation-and-ai/technology/developers-tools/agentic-vision-gemini-3-flash/">Image Source</a></figcaption></figure><h4>What Changed with Agentic Vision?</h4><p>With Agentic Vision, Gemini 3 Flash can:</p><ul><li>Zoom into regions of interest</li><li>Perform visual math and measurements</li><li>Generate and execute code for image analysis</li><li>Inspect intermediate visual outputs</li><li>Ground answers in observable, inspectable evidence</li></ul><h4>Solving the “Black Box” Problem in Vision AI</h4><p>One of the biggest challenges in vision AI has been trust. When a model says <em>“There are 10 items,”</em> you’re often forced to take it at face value.</p><p>Agentic Vision changes that.</p><p>Because Gemini 3 Flash can annotate images directly — drawing bounding boxes, arrows, and labels — developers can <strong>see exactly how the model arrived at its conclusion</strong>. Instead of trusting a number, you can inspect the actual Matplotlib or OpenCV output showing where each item was detected.</p><p>Images are no longer opaque inputs. They become <strong>auditable artifacts</strong> in the reasoning process.</p><h4>Key Capabilities Enabled by Agentic Vision</h4><ul><li><strong>Zoom &amp; Inspect</strong><br>Automatically crop and re-analyze small or distant details at higher fidelity.</li><li><strong>Visual Math</strong><br>Count objects, sum values on receipts, or measure distances using pixel-to-ratio calculations.</li><li><strong>Annotation &amp; Grounding</strong><br>Draw boxes, arrows, and labels directly on images to explain and justify conclusions.</li></ul><h4>Let’s try it out!</h4><p>You can find the complete code at <a href="https://github.com/laxmi-genai/gemini3-samples">https://github.com/laxmi-genai/gemini3-samples</a></p><p>Below is a real prompt used to demonstrate Agentic Vision in action.</p><p><strong>Prompt</strong></p><pre>Count the items in this image and classify them and label it by its <br>specific color and object type.<br>Point to all the items in the image in the format of {&quot;point&quot;: [y,x], label=&quot;&quot;}. <br>Identify any objects that should not belong to a work desk and annotate them on <br>the image with boxes, arrows and make sure you label them.<br>Also provide the reasoning on why they do not belong in a work desk</pre><p><strong>Code Snippet</strong></p><p>This example uses <strong>Gemini 3 Flash</strong>, enables <strong>code execution</strong>, and requests a high-reasoning mode so the model can plan and verify its actions.</p><pre>response = client.models.generate_content(<br>    model=&quot;gemini-3-flash-preview&quot;,<br>    contents=[image, prompt],<br>    config=types.GenerateContentConfig(<br>        tools=[types.Tool(code_execution=types.ToolCodeExecution)],<br>        thinking_config=types.ThinkingConfig(<br>            thinking_level=&quot;HIGH&quot;,<br>        ),<br>    ),<br>)</pre><p>The critical pieces here are:</p><ul><li>Enabling the <strong>Code Execution</strong> tool</li><li>Allowing the model to reason deeply before acting</li><li>Letting visual outputs flow back into the model’s context</li></ul><p><strong>What the Model Identified as “Not Belonging on a Work Desk”</strong></p><p>The following items were detected, annotated, and justified by the model:</p><p><strong>Action Figure (Humanoid)</strong>:</p><ul><li>This is a toy/collectible intended for recreation or display rather than for professional or educational tasks.</li></ul><p><strong>Monster Figure:</strong></p><ul><li>Similar to the action figure, it is a recreational item and not a standard office supply.</li></ul><p><strong>Lip Butter Tube:</strong></p><ul><li>This is a personal care/cosmetic item, not a functional desk tool.</li></ul><p><strong>Fabric Strap:</strong></p><ul><li>This appears to be a personal accessory (likely a watch strap) and is not an office or desk-related tool.</li></ul><p><strong>Input and Output images</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*HQUwEOVb1sA4Lh0UOGPLWw.png" /><figcaption>Gemini 3 Agentic Vision</figcaption></figure><h4>Why This Matters for Developers</h4><p>Agentic Vision unlocks a new class of applications:</p><ul><li>Visual inspection systems that verify their own results</li><li>Debuggable vision pipelines with inspectable outputs</li><li>Multimodal agents that can reason, act, and validate</li><li>AI systems that explain <em>how</em> they know — not just <em>what</em> they know</li></ul><p>Images are no longer static prompts. They are <strong>interactive environments</strong> that models can explore, manipulate, and reason over.</p><h4>Final Thoughts</h4><p>Agentic Vision represents a shift from <em>looking</em> to <strong>reasoned seeing</strong>.</p><p>By combining multimodal reasoning with executable code, Gemini 3 Flash turns images into active participants in the decision-making loop — enabling AI systems that are more accurate, more trustworthy, and far more transparent.</p><p><strong><em>And yes…</em></strong><br><strong><em>Maybe it really is time to organize and clean up my desk.</em></strong></p><p><strong>Thank you, Gemini 3 !</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b20c7c6809ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/beyond-just-looking-gemini-3-now-has-agentic-vision-b20c7c6809ce">Beyond Just Looking: Gemini 3 Now Has Agentic Vision</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[Tips & Tricks: Beyond Model Selection: The Art of Input Discipline]]></title>
            <link>https://medium.com/google-cloud/tips-tricks-beyond-model-selection-the-art-of-input-discipline-304b7adf55ac?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/304b7adf55ac</guid>
            <category><![CDATA[model]]></category>
            <category><![CDATA[image-resolution]]></category>
            <category><![CDATA[vertex-ai]]></category>
            <category><![CDATA[google-gemini]]></category>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 17:51:54 GMT</pubDate>
            <atom:updated>2026-02-17T16:42:03.287Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-YdGSQcFzyWTT4WFrybXtg.png" /><figcaption>Image Courtesy: Imagen4</figcaption></figure><p>Most developers treat multimodal AI like a “black box” where you throw in an image and hope for the best. But in production, performance isn’t just about the model — it’s about how you curate what that model sees.</p><blockquote>“Input discipline is the new performance lever. It’s no longer about choosing the biggest model, but about looking at your data smarter.</blockquote><blockquote><strong><em>TL;DR:</em></strong></blockquote><blockquote><strong>The Problem:</strong> Treating all multimodal inputs (images/video) with the same high fidelity wastes tokens and increases latency.</blockquote><blockquote><strong>The Solution:</strong> Use Gemini 3’s media_resolution parameter (LOW, MEDIUM, HIGH, ULTRA_HIGH) to tune performance.</blockquote><blockquote><strong>The Strategy:</strong> Set resolution <strong>per-media part</strong> to give the model “eagle eyes” for details (like text) and “peripheral vision” for broad context (like video background).</blockquote><blockquote><strong>The Result:</strong> Faster, cheaper, and more predictable AI applications.</blockquote><p>As multimodal models become the backbone of modern AI applications, we are entering a new phase of optimization. Performance tuning is no longer just about choosing the right model or crafting the perfect prompt; it’s increasingly about <strong>how</strong> you feed that model — specifically when images and video are involved.</p><p>A powerful feature in Gemini 3 is the <strong>granular control over media resolution</strong>. While it sounds like a minor setting, it is actually a primary lever for managing token usage, latency, and cost in production environments.</p><h4>The Problem: The “High-Fidelity” Trap</h4><p>When working with images and video, it’s tempting to treat visual inputs as a single category:</p><blockquote>It’s an image, so process it at the highest possible fidelity.</blockquote><p>In practice, different media serve very different purposes:</p><ul><li>Some images require <strong>fine text reading</strong> or detailed inspection.</li><li>Some videos are used only for <strong>high-level context</strong> or scene detection.</li><li>Some long documents or videos must fit into a constrained context window.</li></ul><p>Applying the same visual fidelity everywhere is often unnecessary — and expensive.</p><h4>Media Resolution in Gemini 3</h4><p>Gemini 3 introduces the media_resolution parameter, which controls how many tokens the model allocates to processing a given image or video frame.</p><p>You can choose from four levels:</p><ul><li>LOW</li><li>MEDIUM</li><li>HIGH</li><li>ULTRA_HIGH</li></ul><p><strong><em>Higher resolutions allow the model to reason over finer visual details, but they also increase token usage and latency</em></strong>. Lower resolutions trade some detail for efficiency.</p><p>The important detail: <strong>media resolution can be set per media part</strong>, not just globally.</p><h4><strong>The Game Changer: Per-Media Control</strong></h4><p>The true power of this feature lies in its granularity. In Gemini 3, resolution can be set <strong>per media part</strong>, rather than as a global default for the entire request.</p><p>This allows you to build sophisticated, mixed-mode requests. For example, you can pair a static image that requires <strong>ULTRA_HIGH</strong> resolution (to read small text) with a 10-minute video set to <strong>LOW</strong> resolution (to understand the general context).</p><p>This turns “fidelity” from a static setting into a dynamic engineering decision.</p><p><strong>Example: Mixing Resolutions in a Single Request</strong></p><p>Here’s a simplified example showing how to set resolution on individual media parts:</p><pre><br>response = client.models.generate_content(<br>    model=MODEL_ID,<br>    contents=[<br>        types.Part(<br>            file_data=types.FileData(<br>                file_uri=&quot;gs://cloud-samples-data/generative-ai/image/a-man-and-a-dog.png&quot;,<br>                mime_type=&quot;image/jpeg&quot;,<br>            ),<br>            media_resolution=types.PartMediaResolution(<br>                level=types.PartMediaResolutionLevel.MEDIA_RESOLUTION_ULTRA_HIGH<br>            ),<br>        ),<br>        types.Part(<br>            file_data=types.FileData(<br>                file_uri=&quot;gs://cloud-samples-data/generative-ai/video/behind_the_scenes_pixel.mp4&quot;,<br>                mime_type=&quot;video/mp4&quot;,<br>            ),<br>            media_resolution=types.PartMediaResolution(<br>                level=types.PartMediaResolutionLevel.MEDIA_RESOLUTION_LOW<br>            ),<br>        ),<br>        &quot;When does the image appear in the video? What is the context?&quot;,<br>    ],<br>    config=types.GenerateContentConfig(<br>        thinking_config=types.ThinkingConfig(thinking_level=types.ThinkingLevel.LOW)<br>    ),<br>)<br><br>display(Markdown(response.text))</pre><p>In this request:</p><ul><li>The image is processed with high visual fidelity to preserve detail.</li><li>The video is processed at lower resolution to reduce cost and latency.</li><li>The model still reasons across both inputs coherently.</li></ul><h4><strong>Practical Considerations</strong></h4><p>A few important details to keep in mind:</p><ul><li><strong>Media resolution directly impacts token usage.</strong><br>Higher resolution means more visual tokens.</li><li><strong>Long inputs may require lower resolution.</strong><br>For long videos or extensive documents, lowering resolution may be necessary to fit within the model’s context window.</li><li><strong>ULTRA_HIGH is supported only for individual media parts.</strong><br>It cannot be set as a global default.</li></ul><p>If you don’t specify a resolution, Gemini will choose sensible defaults based on media type — but explicit control gives you predictable behavior</p><h4><strong>Why Input Discipline is the New Performance Lever</strong></h4><p>Moving resolution control into the hands of developers reflects a broader shift in AI engineering. As inputs scale, “Input Discipline” becomes as important as model selection for three reasons:</p><ol><li><strong>Predictable Latency:</strong> Reducing resolution on non-essential video frames can significantly cut down the “time to first token.”</li><li><strong>Context Window Preservation:</strong> For massive datasets, lowering resolution is often the only way to fit your entire history into the model’s active memory.</li><li><strong>Cost Governance:</strong> Strategic use of LOW and MEDIUM tiers ensures you aren&#39;t paying for &quot;hidden&quot; tokens that don&#39;t actually improve the final output.</li></ol><h4><strong>Closing Thoughts</strong></h4><p>New multimodal models continue to raise the ceiling of what is possible. Features like media_resolution help us stay in control of what is practical.</p><p>By treating resolution as a performance dial rather than a fixed setting, you’ll often find that the biggest performance wins don’t come from a bigger model, but from a smarter way of looking at your data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=304b7adf55ac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/tips-tricks-beyond-model-selection-the-art-of-input-discipline-304b7adf55ac">Tips &amp; Tricks: Beyond Model Selection: The Art of Input Discipline</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[Turning Handwritten Plans into Strategic Intelligence with Gemini 3]]></title>
            <link>https://medium.com/google-cloud/turning-handwritten-plans-into-strategic-intelligence-with-gemini-3-70d57222542d?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/70d57222542d</guid>
            <category><![CDATA[gemini-3]]></category>
            <category><![CDATA[nano-banana]]></category>
            <category><![CDATA[vertex-ai]]></category>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Fri, 16 Jan 2026 19:58:27 GMT</pubDate>
            <atom:updated>2026-01-29T03:07:04.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lBhBoAndAH1KnrlDIFhRDQ.png" /><figcaption>Gemini working on my handwritten note</figcaption></figure><p>Modern knowledge work still begins in surprisingly analog ways: handwritten notes, scribbled task lists, symbols in the margins, and last-minute interruptions written in red ink. While digital task managers excel at structured inputs, they often fail to capture the <strong>intent, prioritization, and risk signals embedded in human handwriting</strong>.</p><p>In this post, we explore how <strong>Gemini 3 on Vertex AI</strong> can bridge that gap — transforming a photographed daily plan into a <strong>Strategic Daily Briefing</strong>, reasoning over time constraints, and even generating executive-ready visual summaries.</p><h4>The Core Idea</h4><p>This use case demonstrates how <strong>multimodal reasoning</strong> with Gemini 3 can:</p><ol><li>Interpret handwritten task lists and symbols</li><li>Infer priorities, deadlines, and execution rules</li><li>Reason about time conflicts and interruptions</li><li>Generate structured strategic summaries</li><li>Produce visual artifacts (infographics) from reasoning outputs</li></ol><h4>Architecture Overview</h4><p>At a high level, the workflow looks like this:</p><p><strong>Handwritten Image → Gemini 3 Pro (Vision + Reasoning) → Strategic Text Output → Gemini 3 Image Model → Visual Infographic</strong></p><p><strong>Key components:</strong></p><ul><li><strong>Input</strong>: A JPEG image stored in Google Cloud Storage. You can also work with local files.</li><li><strong>Model</strong>: gemini-3-pro-preview</li><li><strong>Output</strong>: Markdown-formatted strategic briefing + generated infographic</li><li><strong>Advanced Feature</strong>: Explicit reasoning traces using Gemini’s thinking configuration</li></ul><p><strong>Follow Along: Code, Setup, and Prerequisites</strong></p><p>This walkthrough is based on a complete, runnable Python example that demonstrates multimodal reasoning, strategic analysis, and image generation using <strong>Gemini 3 on Vertex AI</strong>.</p><p>If you want to follow along or extend this use case, the full source code is available here:</p><p><strong>GitHub Repository</strong><br>👉 <a href="https://github.com/laxmi-genai/aicamp_jan2026">https://github.com/laxmi-genai/aicamp_jan2026</a></p><p><strong>Key file used in this post</strong></p><ul><li>gemini_3_usecase.py / gemini_3_usecase.ipynb</li></ul><h4>What You’ll Need</h4><p>Before running the code, make sure you have:</p><ul><li>A Google Cloud project with <strong>Vertex AI enabled or an API Key from AI Studio</strong></li><li>Access to <strong>Gemini 3 Preview models</strong></li><li>The <strong>Google Gen AI Python SDK (v1.51.0 or later)</strong></li><li>An image (or GCS URI) containing a handwritten daily plan (<strong>Note</strong>: The example uses images stored in <strong>Google Cloud Storage</strong>, but the same approach works with local files using Part.from_bytes.)</li></ul><p>Once your environment is set up, you can run the script end-to-end from strategic briefings to AI-generated infographics. Feel free to play around with the prompts and share what you are developing!</p><p><strong>Step 1: Authenticating and Initializing Gemini 3</strong></p><p>You could authenticate against a Google Cloud project or with an API key from AI Studio and initializes a Vertex-AI–backed Gemini client:</p><pre># Authenticate against a Google Cloud Project<br>PROJECT_ID = &quot;your-project-id&quot;  # @param {type: &quot;string&quot;, placeholder: &quot;[your-project-id]&quot;, isTemplate: true}<br>if not PROJECT_ID or PROJECT_ID == &quot;[your-project-id]&quot;:<br>    PROJECT_ID = str(os.environ.get(&quot;GOOGLE_CLOUD_PROJECT&quot;))<br><br>LOCATION = &quot;your-project-location&quot;</pre><p><strong>Step 2: Defining a Strategic Prompt (Not Just a Question)</strong></p><p>Instead of a generic “summarize this image” request, the prompt explicitly asks Gemini to <strong>act as a Strategic Assistant </strong>and evaluate the plan across five analytical dimensions:</p><ul><li>Core objective and status</li><li>Fixed vs. tentative time blocks</li><li>Productivity guardrails</li><li>Real-time interruptions</li><li>Actionable Triggers</li></ul><p><strong><em>Note:</em></strong> Try experimenting the prompts !!!</p><p><strong>Step 3: High-Resolution Multimodal Reasoning</strong></p><p>The image is passed to Gemini with <strong>high media resolution</strong>, allowing the model to capture subtle visual cues like ink color, emphasis, and layout:</p><pre>types.Part(<br>    file_data=types.FileData(<br>        file_uri=&quot;GCS_BUCKET_URL&quot;,<br>        mime_type=&quot;image/jpeg&quot;,<br>    ),<br>    media_resolution=types.PartMediaResolution(<br>        level=types.PartMediaResolutionLevel.MEDIA_RESOLUTION_HIGH,<br>    ),<br>)</pre><p>This is a crucial design choice. In practice, <strong>resolution materially affects reasoning quality</strong>, especially for handwritten artifacts.</p><p><strong><em>Note: </em></strong>Experiment with the low resolution option. What is getting missed out?</p><p><strong>Step 4: Generating the “Strategic Daily Briefing”</strong></p><p>The model produces a concise, action-oriented briefing that:</p><ul><li>Surfaces deadlines</li><li>Flags risks</li><li>Interprets interruptions</li><li>Converts visual ambiguity into structured guidance</li></ul><p><strong>Step 5: From Reasoning to Visual Communication</strong></p><p>Next, the textual briefing is passed to <strong>Gemini 3’s image generation model</strong>:</p><pre>model=&quot;gemini-3-pro-image-preview&quot;</pre><blockquote><strong>Reasoning → Synthesis → Visualization</strong>, all within the Gemini ecosystem.</blockquote><p><strong>Step 6: Explicit Time-Based Reasoning with Thought Traces</strong></p><p>The second scenario introduces a targeted reasoning question:</p><p><strong><em>Note:</em></strong> This question is based on the image used in the demo. You could experiment with other relevant questions!!</p><blockquote>“Based on the 1:30 PM slide deadline, what is the latest possible time I can address interruptions without missing my 2:00 PM review?”</blockquote><p>Here, Gemini 3 is configured with <strong>high-level thinking enabled</strong>:</p><pre>thinking_config=types.ThinkingConfig(<br>    include_thoughts=True,<br>    thinking_level=types.ThinkingLevel.HIGH<br>)</pre><p>This produces:</p><ul><li>A transparent reasoning trail (“Thoughts”)</li><li>A concise, actionable final answer</li></ul><p>For training, debugging, and trust calibration, this capability is especially valuable.</p><p><strong>Why This Use Case Matters</strong></p><p>This example goes beyond OCR or image captioning. It shows how Gemini 3 can:</p><ul><li>Perform <strong>semantic interpretation</strong>, not just recognition</li><li>Reason over <strong>time, constraints, and risk</strong></li><li>Support <strong>human-in-the-loop planning</strong></li><li>Generate <strong>decision artifacts</strong>, not just text</li></ul><p>Potential extensions include:</p><ul><li>Executive daily brief automation</li><li>Meeting readiness agents</li><li>Personal productivity copilots</li><li>Visual task intelligence for mobile workflows</li></ul><p><strong>Key Takeaways</strong></p><ul><li>Prompt design defines outcome quality</li><li>Image resolution impacts reasoning fidelity</li><li>Gemini 3 can chain perception, reasoning, and generation</li><li>Thought traces unlock trust and debugging capabilities</li><li>Multimodal AI is most powerful when applied to real human workflows</li></ul><p><strong>Final Thought</strong></p><p>Handwritten notes are not going away — but manual interpretation can. With Gemini 3, everyday artifacts become structured, reasoned, and visual intelligence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70d57222542d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/turning-handwritten-plans-into-strategic-intelligence-with-gemini-3-70d57222542d">Turning Handwritten Plans into Strategic Intelligence with Gemini 3</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[A2UI in Practice: Patterns, Pitfalls, and the Messages That Hold It Together]]></title>
            <link>https://medium.com/google-cloud/a2ui-in-practice-patterns-pitfalls-and-the-messages-that-hold-it-together-658720b83789?source=rss-204d878a3c46------2</link>
            <guid isPermaLink="false">https://medium.com/p/658720b83789</guid>
            <category><![CDATA[agentic-ui]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[a2ui]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[#TheGenAIGirl — code, community, and GenAI.]]></dc:creator>
            <pubDate>Sun, 04 Jan 2026 03:12:41 GMT</pubDate>
            <atom:updated>2026-01-05T02:40:12.838Z</atom:updated>
            <content:encoded><![CDATA[<p>Article #2 of the 3 part series on A2UI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2PMa7-c0COcmdWjZlP98IQ.png" /><figcaption>Image Courtesy: Imagen4</figcaption></figure><p>In Part 1, we framed A2UI as an <strong>interaction contract</strong>: agents declare interaction intent in structured messages, renderers turn those messages into native UI, and user actions flow back as typed events.</p><p>Part 2 is where things start to take shape.</p><p>Once you move past the initial “wow, it renders” moment in the Quickstart, the real questions start to surface:</p><ul><li>How do I structure updates so the UI remains stable over time?</li><li>Where does state live — and how does it flow between agent and client?</li><li>How do user actions send input back to the agent without guesswork?</li></ul><p>The good news is that A2UI already provides a precise vocabulary that makes these interactions predictable when used intentionally.</p><p>This article focuses on those patterns and the failure modes they help you avoid.</p><h4>The Core Primitive: A Stream of JSONL Messages</h4><p>At its core, A2UI is designed around a streaming-friendly sequence of <strong>JSON objects</strong> — often sent as JSON Lines (JSONL) — where each line represents a single message.</p><p>Each message contains <strong>exactly one</strong> top-level key:</p><ul><li>surfaceUpdate</li><li>dataModelUpdate</li><li>beginRendering</li><li>deleteSurface</li></ul><p>This constraint is deliberate. It’s what allows agents to describe interaction structure, populate state, and then explicitly signal when a surface is ready to render.</p><p><em>As of the current </em><strong><em>v0.8 stable specification</em></strong><em>, this sequence ensures that even as the protocol evolves, the core contract between the agent’s intent and the client’s execution remains stable.</em></p><p>During the Quickstart, this sequencing is what gives the UI its “controlled” feel: structure first, data second, render last.</p><h4>Pattern 1: Treat UI as a Surface You Control (Not a Blob You Replace)</h4><p>A2UI introduces <strong>surfaces</strong> as first-class concepts: named regions of UI that can be independently updated via a surfaceId.</p><p>From an interaction standpoint, this matters because the agent is not “drawing UI.” It’s targeting a surface by identity over time</p><p><strong>Example: </strong><strong>surfaceUpdate (defining structure)</strong></p><pre>{<br>  &quot;surfaceUpdate&quot;: {<br>    &quot;surfaceId&quot;: &quot;main&quot;,<br>    &quot;components&quot;: [<br>      {<br>        &quot;id&quot;: &quot;header&quot;,<br>        &quot;component&quot;: {<br>          &quot;Text&quot;: {<br>            &quot;text&quot;: { &quot;literalString&quot;: &quot;Book Your Table&quot; },<br>            &quot;usageHint&quot;: &quot;h1&quot;<br>          }<br>        }<br>      },<br>      {<br>        &quot;id&quot;: &quot;date-picker&quot;,<br>        &quot;component&quot;: {<br>          &quot;DateTimeInput&quot;: {<br>            &quot;label&quot;: { &quot;literalString&quot;: &quot;Select Date&quot; },<br>            &quot;value&quot;: { &quot;path&quot;: &quot;/reservation/date&quot; },<br>            &quot;enableDate&quot;: true<br>          }<br>        }<br>      },<br>      {<br>        &quot;id&quot;: &quot;submit-btn&quot;,<br>        &quot;component&quot;: {<br>          &quot;Button&quot;: {<br>            &quot;child&quot;: &quot;submit-text&quot;,<br>            &quot;action&quot;: { &quot;name&quot;: &quot;confirm_booking&quot; }<br>          }<br>        }<br>      },<br>      {<br>        &quot;id&quot;: &quot;submit-text&quot;,<br>        &quot;component&quot;: {<br>          &quot;Text&quot;: { &quot;text&quot;: { &quot;literalString&quot;: &quot;Confirm Reservation&quot; } }<br>        }<br>      }<br>    ]<br>  }<br>}</pre><p>This example highlights two foundational mechanics at once:</p><ul><li>surfaces are addressed explicitly via surfaceId</li><li>component properties can be either <strong>literal values</strong> or <strong>bound</strong> via JSON Pointer paths</li></ul><p><strong><em>Note:</em></strong><em> The component names used here (like </em><em>DateTimeInput) represent the specific catalog exposed by the client renderer. In A2UI, the agent can only use components the client has been taught to understand.</em></p><p><strong>Pitfall to avoid</strong></p><p>If an agent repeatedly re-sends entire UI structures without regard for surface stability, the result is often flicker, lost input state, or jarring re-layouts.</p><p>The renderer guidance explicitly recommends buffering surfaceUpdate and dataModelUpdate messages and using beginRendering as the clear signal that the UI is ready.</p><h4>Pattern 2: Separate Structure from State (and Let Data Binding Do the Work)</h4><p>A2UI deliberately separates <strong>UI structure</strong> from <strong>application data</strong>, linking them through data binding paths.</p><p>That’s why a typical lifecycle looks like this:</p><ol><li>surfaceUpdate defines the UI structure</li><li>dataModelUpdate populates or modifies state</li><li>beginRendering signals that the surface can be rendered</li></ol><p><strong>Example: </strong><strong>dataModelUpdate (populating state)</strong></p><pre>{<br>  &quot;dataModelUpdate&quot;: {<br>    &quot;surfaceId&quot;: &quot;main&quot;,<br>    &quot;path&quot;: &quot;/reservation&quot;,<br>    &quot;contents&quot;: [<br>      { &quot;key&quot;: &quot;datetime&quot;, &quot;valueString&quot;: &quot;2025-12-16T19:00:00Z&quot; },<br>      { &quot;key&quot;: &quot;guests&quot;, &quot;valueString&quot;: &quot;2&quot; }<br>    ]<br>  }<br>}</pre><p>Followed by</p><pre>{<br>  &quot;beginRendering&quot;: {<br>    &quot;surfaceId&quot;: &quot;main&quot;,<br>    &quot;root&quot;: &quot;root&quot;<br>  }<br>}</pre><p>This sequencing is not incidental — it’s baked into the data-flow model to ensure predictable rendering and clean ownership of state.</p><p>When structure and state are mixed, even small updates require full UI rewrites- — an approach that quickly becomes brittle in multi-turn interactions.</p><h4>Pattern 3: Make User Actions Typed and Explicit (So Agents Don’t Guess)</h4><p>A2UI’s interaction loop becomes robust when user actions are treated as <strong>typed events</strong>, not interpreted text.</p><p>User interactions are communicated back using a userAction message that includes:</p><ul><li>an action name</li><li>the surfaceId</li><li>and a resolved context payload</li></ul><p><strong>Example: defining an action context</strong></p><pre>{<br>  &quot;id&quot;: &quot;submit-btn&quot;,<br>  &quot;component&quot;: {<br>    &quot;Button&quot;: {<br>      &quot;child&quot;: &quot;submit-text&quot;,<br>      &quot;action&quot;: {<br>        &quot;name&quot;: &quot;confirm&quot;,<br>        &quot;context&quot;: [<br>          { &quot;key&quot;: &quot;details&quot;, &quot;value&quot;: { &quot;path&quot;: &quot;/reservation&quot; } }<br>        ]<br>      }<br>    }<br>  }<br>}</pre><p>When the user clicks the button, the client sends:</p><pre>{<br>  &quot;userAction&quot;: {<br>    &quot;name&quot;: &quot;confirm&quot;,<br>    &quot;surfaceId&quot;: &quot;booking&quot;,<br>    &quot;context&quot;: {<br>      &quot;details&quot;: {<br>        &quot;datetime&quot;: &quot;2025-12-16T19:00:00Z&quot;,<br>        &quot;guests&quot;: &quot;3&quot;<br>      }<br>    }<br>  }<br>}</pre><p>A key nuance here is that <strong>two-way binding is local to the client</strong>. User input updates the client-side data model continuously, but state is sent back to the agent only when an action is triggered via action.context.</p><p><strong>Pitfall to avoid</strong></p><p>If action context is not modeled explicitly, agents are forced to infer state from chat history or partial signals — an approach that becomes fragile very quickly. Think of this as the “UI-equivalent” of a tool call result: clean, structured, and immediately actionable.</p><h4>Pattern 4: Clean Up Surfaces When the Workflow Ends</h4><p>A2UI treats surface removal as a first-class operation.</p><p>Once an interaction is complete, the agent can explicitly remove the surface:</p><pre>{<br>  &quot;deleteSurface&quot;: {<br>    &quot;surfaceId&quot;: &quot;booking&quot;<br>  }<br>}</pre><h4>A Complete “Mini Flow” You Can Reuse</h4><p>Here’s a compact end-to-end sequence that ties interaction lifecycle together:</p><pre>{&quot;surfaceUpdate&quot;:{&quot;surfaceId&quot;:&quot;main&quot;,&quot;components&quot;:[<br>  {&quot;id&quot;:&quot;root&quot;,&quot;component&quot;:{&quot;Column&quot;:{&quot;children&quot;:{&quot;explicitList&quot;:[&quot;header&quot;,&quot;guests-field&quot;,&quot;submit-btn&quot;]}}}},<br>  {&quot;id&quot;:&quot;header&quot;,&quot;component&quot;:{&quot;Text&quot;:{&quot;text&quot;:{&quot;literalString&quot;:&quot;Confirm Reservation&quot;},&quot;usageHint&quot;:&quot;h1&quot;}}},<br>  {&quot;id&quot;:&quot;guests-field&quot;,&quot;component&quot;:{&quot;TextField&quot;:{&quot;label&quot;:{&quot;literalString&quot;:&quot;Guests&quot;},&quot;text&quot;:{&quot;path&quot;:&quot;/reservation/guests&quot;}}}},<br>  {&quot;id&quot;:&quot;submit-btn&quot;,&quot;component&quot;:{&quot;Button&quot;:{&quot;child&quot;:&quot;submit-text&quot;,&quot;action&quot;:{&quot;name&quot;:&quot;confirm&quot;,&quot;context&quot;:[{&quot;key&quot;:&quot;details&quot;,&quot;value&quot;:{&quot;path&quot;:&quot;/reservation&quot;}}]}}}},<br>  {&quot;id&quot;:&quot;submit-text&quot;,&quot;component&quot;:{&quot;Text&quot;:{&quot;text&quot;:{&quot;literalString&quot;:&quot;Confirm&quot;}}}}<br>]}}<br>{&quot;dataModelUpdate&quot;:{&quot;surfaceId&quot;:&quot;main&quot;,&quot;path&quot;:&quot;/reservation&quot;,&quot;contents&quot;:[<br>  {&quot;key&quot;:&quot;datetime&quot;,&quot;valueString&quot;:&quot;2025-12-16T19:00:00Z&quot;},<br>  {&quot;key&quot;:&quot;guests&quot;,&quot;valueString&quot;:&quot;2&quot;}<br>]}}<br>{&quot;beginRendering&quot;:{&quot;surfaceId&quot;:&quot;main&quot;,&quot;root&quot;:&quot;root&quot;}}<br>{&quot;userAction&quot;:{&quot;name&quot;:&quot;confirm&quot;,&quot;surfaceId&quot;:&quot;booking&quot;,&quot;context&quot;:{&quot;details&quot;:{&quot;datetime&quot;:&quot;2025-12-16T19:00:00Z&quot;,&quot;guests&quot;:&quot;3&quot;}}}}<br>{&quot;deleteSurface&quot;:{&quot;surfaceId&quot;:&quot;booking&quot;}}</pre><p>This isn’t toy logic — it’s the actual shape of a stable, typed interaction lifecycle.</p><h4>Closing Reflection</h4><p>In Part 1, we talked about A2UI as a foundation.</p><p>This is what that foundation looks like in practice:</p><ul><li>surfaces you can address precisely</li><li>a data model that keeps state explicit</li><li>a rendering lifecycle that supports streaming</li><li>and user actions that return structured context instead of ambiguity</li></ul><p>Once you internalize these patterns, the question shifts from <em>“How do I generate UI?”</em> to <em>“How do I design interactions the agent and client can both trust over time?”</em></p><h4>What Comes Next</h4><p>In Part 3, we’ll apply these patterns to a substantial use case — showing how an ADK agent can produce, validate, and stream these A2UI messages end-to-end in practice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=658720b83789" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/a2ui-in-practice-patterns-pitfalls-and-the-messages-that-hold-it-together-658720b83789">A2UI in Practice: Patterns, Pitfalls, and the Messages That Hold It Together</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>
    </channel>
</rss>