<?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 Dinesh Selvaraj on Medium]]></title>
        <description><![CDATA[Stories by Dinesh Selvaraj on Medium]]></description>
        <link>https://medium.com/@sdinesh21?source=rss-71be4e553e34------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8URv12e6WjherwkKJ_N37w.jpeg</url>
            <title>Stories by Dinesh Selvaraj on Medium</title>
            <link>https://medium.com/@sdinesh21?source=rss-71be4e553e34------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 17:57:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sdinesh21/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[Gemini Interactions API: A Unified Interface for Models and Agents]]></title>
            <link>https://medium.com/google-cloud/gemini-interactions-api-a-unified-interface-for-models-and-agents-b8d1e6e660d2?source=rss-71be4e553e34------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8d1e6e660d2</guid>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Dinesh Selvaraj]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 22:00:28 GMT</pubDate>
            <atom:updated>2026-02-16T04:19:44.886Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Google’s Gemini API has a new interface. The <a href="https://ai.google.dev/gemini-api/docs/interactions">Interactions API</a> (Beta) rethinks how developers build multi-turn, tool-heavy, and agent-driven applications — shifting state management from the client to the server.</p><p>With generateContent, you maintain a growing history array, serialize it with every request, and manage tool call loops by appending function results to that same array. The Interactions API replaces this with a single previous_interaction_id reference. But it goes further — introducing background agents, built-in persistence, and a unified surface for models and agents that generateContent doesn&#39;t support at all.</p><p>In this article, you’ll learn what’s genuinely new, what’s simpler, and what the trade-offs look like through real benchmark observations. Every code example uses a healthcare patient intake scenario to keep things concrete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wWrTTrPOH6dIgF9NXR_Cpg.png" /><figcaption>Interactions API capabilities</figcaption></figure><h3>What is the Interactions API?</h3><p>The Interactions API wraps every API call in a persistent resource called an <strong>Interaction</strong> — an object with an id, typed outputs, token usage, and a status field.</p><pre>from google import genai<br><br>client = genai.Client()<br>interaction = client.interactions.create(<br>    model=&quot;gemini-3-flash-preview&quot;,<br>    input=&quot;Tell me a short joke about programming.&quot;<br>)<br>print(interaction.outputs[-1].text)</pre><p>The input parameter accepts a plain string, a list of typed content objects (for multimodal), or a list of role-tagged turns (for stateless history). This replaces the Content and Part types required by generateContent.</p><p>The API works with both models (model=) and agents (agent=) through the same endpoint. Supported models include gemini-2.5-pro, gemini-2.5-flash, gemini-3-flash-preview, and gemini-3-pro-preview. The Deep Research agent (deep-research-pro-preview-12-2025) is also available.</p><h3>What’s New — Capabilities generateContent Cannot Do</h3><p>Four capabilities in the Interactions API have no equivalent in generateContent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FPG_LC7s__A-m6HnlJtXbg.png" /><figcaption>generateContent and Interactions API comparison</figcaption></figure><h3>Server-side state management</h3><p>Pass previous_interaction_id and the server reconstructs the full conversation context. No client-side history array needed:</p><pre>r1 = client.interactions.create(<br>    model=&quot;gemini-3-flash-preview&quot;,<br>    input=&quot;Hi, I&#39;d like to schedule a visit with my doctor.&quot;,<br>    system_instruction=&quot;You are a healthcare intake assistant.&quot;<br>)<br><br># Server recalls Turn 1 - only the new message is sent<br>r2 = client.interactions.create(<br>    model=&quot;gemini-3-flash-preview&quot;,<br>    input=&quot;My name is Sarah Johnson.&quot;,<br>    previous_interaction_id=r1.id,<br>    system_instruction=&quot;You are a healthcare intake assistant.&quot;<br>)</pre><p>Note: system_instruction, tools, and generation_config are <strong>interaction-scoped</strong> — they must be re-specified on each call. Only conversation history is persisted across the chain.</p><h3>Agents and background execution</h3><p>generateContent is synchronous and model-only. The Interactions API supports agents that run asynchronously:</p><pre>research = client.interactions.create(<br>    input=&quot;Research advances in AI-assisted medical diagnostics.&quot;,<br>    agent=&quot;deep-research-pro-preview-12-2025&quot;,<br>    background=True<br>)<br><br># Poll for completion - client is free to do other work<br>while True:<br>    result = client.interactions.get(research.id)<br>    if result.status == &quot;completed&quot;:<br>        print(result.outputs[-1].text)<br>        break<br>    time.sleep(10)</pre><h3>Built-in persistence</h3><p>Every interaction is stored by default. Retrieve any past interaction by ID within the retention window (55 days paid, 1 day free):</p><pre>past = client.interactions.get(&quot;&lt;interaction-id&gt;&quot;, include_input=True)</pre><p>Opt out with store=false. Delete by ID at any time. generateContent retains nothing after the response is returned.</p><h3>Unified models + agents surface</h3><p>Models and agents use the same endpoint. Chain them in a single conversation — use an agent for research, then a model for summarization, linked via previous_interaction_id. This composability is architecturally impossible with generateContent.</p><h3>What’s Simpler — A Better Developer Experience</h3><p>The Interactions API also streamlines tasks that generateContent already supports. Same models, same quality — simpler interface.</p><h3>Multimodal input</h3><p>Flat typed objects replace nested Content/Part construction:</p><pre>interaction = client.interactions.create(<br>    model=&quot;gemini-3-flash-preview&quot;,<br>    input=[<br>        {&quot;type&quot;: &quot;document&quot;, &quot;uri&quot;: &quot;gs://bucket/report.pdf&quot;,<br>         &quot;mime_type&quot;: &quot;application/pdf&quot;},<br>        {&quot;type&quot;: &quot;text&quot;, &quot;text&quot;: &quot;Analyze this lab report.&quot;}<br>    ]<br>)</pre><p>Supported types: text, image, audio, video, document.</p><h3>Structured output</h3><p>Use response_format with a Pydantic schema to enforce JSON structure:</p><pre>from pydantic import BaseModel<br>from typing import Literal<br><br>class PatientSummary(BaseModel):<br>    patient_name: str<br>    urgency_level: Literal[&quot;routine&quot;, &quot;urgent&quot;, &quot;emergent&quot;]<br>    recommended_follow_up: list[str]<br>interaction = client.interactions.create(<br>    model=&quot;gemini-3-flash-preview&quot;,<br>    input=&quot;Extract structured data from: Patient Sarah Johnson, &quot;<br>          &quot;persistent headaches, HbA1c 7.8%...&quot;,<br>    response_format=PatientSummary.model_json_schema(),<br>)<br>parsed = PatientSummary.model_validate_json(interaction.outputs[-1].text)</pre><h3>Function calling</h3><p>Same tool definition pattern, but previous_interaction_id eliminates re-sending history when returning results:</p><pre>interaction = client.interactions.create(<br>    model=&quot;gemini-3-flash-preview&quot;,<br>    input=&quot;Look up patient SJ-2026-4412.&quot;,<br>    tools=[ehr_lookup_tool],<br>)<br><br>for output in interaction.outputs:<br>    if output.type == &quot;function_call&quot;:<br>        result = execute_function(output.name, output.arguments)<br>        interaction = client.interactions.create(<br>            model=&quot;gemini-3-flash-preview&quot;,<br>            previous_interaction_id=interaction.id,<br>            input=[{&quot;type&quot;: &quot;function_result&quot;, &quot;name&quot;: output.name,<br>                    &quot;call_id&quot;: output.id, &quot;result&quot;: json.dumps(result)}],<br>            tools=[ehr_lookup_tool],<br>        )</pre><h3>Built-in tools and streaming</h3><p>Google Search grounding, code execution, URL context, and computer use work with a one-line tool definition (tools=[{&quot;type&quot;: &quot;google_search&quot;}]). Streaming uses typed events — filter for chunk.event_type == &quot;content.delta&quot; and chunk.delta.type == &quot;text&quot;.</p><h3>Experiment — Putting Both APIs to the Test</h3><p>To see how these differences play out in practice, I built the same 10-turn patient intake conversation using both APIs and traced the native SDK usage metadata across 3 averaged runs. Same model (gemini-3-flash-preview), same system instruction, same patient messages.</p><p>The conversation covers registration, insurance, chief complaint, medication history, allergies, and family history — a realistic clinical intake flow.</p><h3>What I measured</h3><p>Both APIs expose token usage natively. generateContent returns response.usage_metadata with prompt_token_count, candidates_token_count, and cached_content_token_count. The Interactions API returns interaction.usage with total_input_tokens, total_output_tokens, and total_cached_tokens.</p><h3>What I observed</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZ6n3WHZbhbOERpZkcBDgA.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63f22cafd112cd59341c7aa59f027ad2/href">https://medium.com/media/63f22cafd112cd59341c7aa59f027ad2/href</a></iframe><p><strong>Input tokens</strong> dropped 79%. With generateContent, the full history is re-sent every turn, causing input tokens to compound. The Interactions API sends only the new message.</p><p><strong>Total tokens</strong> fell 42%. Output and thought tokens were comparable, so the savings come from eliminating redundant input processing.</p><p><strong>Payload size</strong> was 85% smaller on average. By the final turn, the generateContent payload was 13.1x larger.</p><h3>What this suggests</h3><ul><li><strong>Token and payload savings are structural.</strong> They follow directly from the architecture (server holds history vs client re-sends it) and will hold regardless of conversation topic.</li><li><strong>Cost impact scales with conversation length.</strong> At 10 turns the input reduction is 79%. With longer conversations and thousands of concurrent sessions, this compounds.</li><li><strong>These are observations from one experiment</strong> — one model, one conversation pattern, 3 runs. Your results will vary.</li></ul><h3>Production Considerations</h3><p>The Interactions API is in Beta. Features and schemas may change. For production workloads requiring API stability, generateContent remains the recommended path.</p><p><strong>Error handling.</strong> Check interaction.status for failed or requires_action states. Implement retry logic with exponential backoff for rate limits, especially in high-throughput clinical workflows.</p><p><strong>When to use which.</strong> Use the Interactions API for stateful conversations, agent-based workflows, and scenarios where server-side persistence or background execution adds value. Use generateContent for single-shot generation, latency-sensitive production workloads, and anywhere you need API stability guarantees.</p><h3>Summary</h3><p>The Interactions API introduces four capabilities that generateContent cannot provide: server-side state management, agents with background execution, built-in persistence, and a unified models-and-agents surface. It also simplifies multimodal input, structured output, function calling, and streaming through a cleaner developer interface.</p><p>For multi-turn, tool-heavy applications where input tokens and payload size compound with each turn, the architectural advantages are measurable.</p><p><strong>Get started:</strong></p><ul><li><a href="https://ai.google.dev/gemini-api/docs/interactions">Interactions API documentation</a></li><li><a href="https://ai.google.dev/api/interactions-api">API reference</a></li><li><a href="https://colab.sandbox.google.com/github/google-gemini/cookbook/blob/main/quickstarts/Get_started_interactions_api.ipynb">Quickstart notebook</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8d1e6e660d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/gemini-interactions-api-a-unified-interface-for-models-and-agents-b8d1e6e660d2">Gemini Interactions API: A Unified Interface for Models and Agents</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 in ADK: On-Demand Instructions for your Agents]]></title>
            <link>https://medium.com/google-cloud/introducing-skills-in-adk-teach-your-agent-new-tricks-one-skill-at-a-time-be319f9b1917?source=rss-71be4e553e34------2</link>
            <guid isPermaLink="false">https://medium.com/p/be319f9b1917</guid>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[agent-development-kit]]></category>
            <category><![CDATA[google-adk]]></category>
            <category><![CDATA[agent-skills]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Dinesh Selvaraj]]></dc:creator>
            <pubDate>Fri, 13 Feb 2026 06:44:45 GMT</pubDate>
            <atom:updated>2026-02-13T08:45:09.591Z</atom:updated>
            <content:encoded><![CDATA[<h3>Skills in Agentic AI</h3><p>As AI agents move from demos to production, a recurring challenge emerges: how do you teach an agent specialized knowledge without bloating every interaction with instructions it does not need?</p><p>The industry standard emerging for this problem is <strong>Skills</strong> — modular instruction packages that an agent loads on demand. A skill is not a tool. It does not execute code or call an API. It is a knowledge package: a set of instructions, reference material, and templates that tells the agent <em>how to behave</em> for a specific type of task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G9xESBsRe9KDPBXl0x488w.png" /></figure><p>Anthropic recently published <a href="https://resources.anthropic.com/hubfs/The-Complete-Guide-to-Building-Skill-for-Claude.pdf?hsLang=en">The Complete Guide to Building Skills for Claude</a>, formalizing this pattern as an open standard. The core idea is <strong>progressive disclosure</strong>:</p><ul><li><strong>First level</strong> (metadata): Always visible to the agent. Just the skill name and description — enough to know <em>when</em> to use it.</li><li><strong>Second level</strong> (instructions): Loaded only when the agent decides the skill is relevant to the current query.</li><li><strong>Third level</strong> (references and assets): Additional files the agent fetches only as needed — glossaries, templates, documentation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eIPicbcy7thOX_JiIIqClQ.png" /></figure><p>This three-level system minimizes token usage while maintaining deep specialization. The agent sees the full catalog of what it <em>could</em> do, but only pays the context cost for what it <em>actually</em> does in a given conversation.</p><p>The pattern applies regardless of the underlying framework. Anthropic has standardized it for Claude. And now, <strong>Google’s Agent Development Kit (ADK)</strong> has adopted the same concept through SkillToolset.</p><h3>Skills in Google ADK</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9nmPGxzydMeHLiAHHvl02w.png" /></figure><p>ADK implements Skills through the SkillToolset class. You package instructions, references, and assets into a directory, and the toolset handles the progressive disclosure at runtime.</p><p>Every skill directory follows this structure:</p><pre>my_skill/<br>├── SKILL.md          # Required: YAML frontmatter + markdown instructions<br>├── references/       # Optional: glossaries, documentation, examples<br>└── assets/           # Optional: output templates, structured data</pre><p>The SKILL.md file starts with YAML frontmatter (name, description) followed by markdown instructions:</p><pre>---<br>name: medical_simplifier<br>description: Translates medical terminology into patient-friendly language.<br>metadata:<br>  domain: healthcare<br>  version: &quot;1.0&quot;<br>---<br><br># Medical Terminology Simplifier<br><br>Follow these steps for every user query:<br><br>### Step 1: Load the Abbreviation Glossary<br>Use `load_skill_resource` to retrieve `references/medical_abbreviations.md`.<br><br>### Step 2: Load the Output Template<br>Use `load_skill_resource` to retrieve `assets/summary_template.md`.<br><br>### Step 3: Identify and Simplify Medical Jargon<br>Rewrite the text at a 6th-8th grade reading level...</pre><h3>How it works at runtime</h3><p>When you attach a SkillToolset to an agent, the toolset injects a lightweight XML index of skill names and descriptions into the system prompt. The agent then has access to two tools:</p><ul><li><strong>load_skill(name)</strong> — fetches the full instructions from SKILL.md</li><li><strong>load_skill_resource(skill_name, path)</strong> — fetches a specific file from references/ or assets/</li></ul><p>The LLM decides which skill to load based on the user&#39;s input. No routing code required. This maps directly to the progressive disclosure model — metadata is always present, instructions load on demand, and references load only when the instructions call for them.</p><h3>A Simple Example: Single-Skill Agent</h3><p>Here is a minimal agent that uses SkillToolset with one skill — a medical terminology simplifier:</p><pre>from pathlib import Path<br>from google.adk import Agent<br>from google.adk.skills import models<br>from google.adk.tools import skill_toolset<br><br># Resolve skill directory<br>skill_dir = Path(__file__).parent / &quot;skills&quot; / &quot;medical_simplifier&quot;<br>refs_dir = skill_dir / &quot;references&quot;<br>assets_dir = skill_dir / &quot;assets&quot;<br><br># Read SKILL.md and extract instructions (body after frontmatter)<br>skill_md = (skill_dir / &quot;SKILL.md&quot;).read_text(encoding=&quot;utf-8&quot;)<br>parts = skill_md.split(&quot;---&quot;, 2)<br>instructions = parts[2].strip()<br><br># Read resource files from disk<br>references = {<br>    f.name: f.read_text(encoding=&quot;utf-8&quot;)<br>    for f in refs_dir.iterdir() if f.is_file()<br>}<br>assets = {<br>    f.name: f.read_text(encoding=&quot;utf-8&quot;)<br>    for f in assets_dir.iterdir() if f.is_file()<br>}<br><br># Construct the Skill model<br>medical_skill = models.Skill(<br>    frontmatter=models.Frontmatter(<br>        name=&quot;medical_simplifier&quot;,<br>        description=(<br>            &quot;Translates complex medical terminology into &quot;<br>            &quot;patient-friendly language.&quot;<br>        ),<br>        metadata={&quot;domain&quot;: &quot;healthcare&quot;, &quot;version&quot;: &quot;1.0&quot;},<br>    ),<br>    instructions=instructions,<br>    resources=models.Resources(<br>        references=references, assets=assets<br>    ),<br>)<br># Create the SkillToolset and attach to the agent<br>medical_skill_toolset = skill_toolset.SkillToolset(<br>    skills=[medical_skill]<br>)<br>root_agent = Agent(<br>    name=&quot;medical_simplifier_agent&quot;,<br>    model=&quot;gemini-2.5-flash&quot;,<br>    instruction=(<br>        &quot;You are a helpful medical language assistant. &quot;<br>        &quot;Use the medical_simplifier skill to process requests.&quot;<br>    ),<br>    tools=[medical_skill_toolset],<br>)</pre><p>This setup functions correctly: if you send the agent a clinical note, it successfully loads the skill, fetches the abbreviation glossary, applies the output template, and returns a patient-friendly summary.</p><p>But there is a problem with this design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hs99q0F528n_GhtmkIQQvQ.png" /></figure><h3>The Problem with This Approach</h3><p>This agent has <strong>one skill</strong> and <strong>one job</strong>. Every user query is a medical text that needs simplifying. Every conversation triggers load_skill(&quot;medical_simplifier&quot;). The skill is loaded 100% of the time.</p><p>That means the “on-demand” loading mechanism adds overhead without providing any benefit:</p><ul><li><strong>Extra tokens</strong>: The skill index XML and the load_skill / load_skill_resource tool declarations are injected into every call — on top of the instructions themselves.</li><li><strong>Extra latency</strong>: The agent makes at least one additional LLM round-trip to call load_skill before it can start processing. If it also loads references and assets, that is two or three extra round-trips.</li><li><strong>No selective loading</strong>: There is nothing to select from. The agent always loads the same skill.</li></ul><p>For a single-skill agent, you are strictly better off inlining the instructions directly in the agent’s instruction parameter. No overhead, no extra round-trips, same result.</p><p>So when <em>do</em> skills actually help?</p><h3>The Right Way: Multi-Skill Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxH_SK7njEaYrV33tcbwJA.png" /></figure><p>Skills deliver value when an agent is a <strong>generalist that goes deep on demand</strong> — multiple specialized capabilities, but only one activated per query.</p><p>Consider a Medical Document Assistant that handles four types of documents. Each type requires different instructions, different reference material, and a different output template:</p><pre>medical_document_assistant/<br>├── agent.py<br>└── skills/<br>    ├── lab_report_interpreter/<br>    │   ├── SKILL.md<br>    │   ├── references/<br>    │   │   └── reference_ranges.md<br>    │   └── assets/<br>    │       └── lab_report_template.md<br>    ├── discharge_summary_simplifier/<br>    │   ├── SKILL.md<br>    │   ├── references/<br>    │   │   └── common_procedures.md<br>    │   └── assets/<br>    │       └── discharge_template.md<br>    ├── prescription_explainer/<br>    │   ├── SKILL.md<br>    │   ├── references/<br>    │   │   └── common_medications.md<br>    │   └── assets/<br>    │       └── prescription_template.md<br>    └── radiology_report_reader/<br>        ├── SKILL.md<br>        ├── references/<br>        │   └── imaging_terminology.md<br>        └── assets/<br>            └── radiology_template.md</pre><p>Each skill is a self-contained directory.</p><ul><li>lab_report_interpreter — includes lab reference ranges</li><li>discharge_summary_simplifier — includes a hospital procedures glossary</li><li>prescription_explainer — includes a drug interaction glossary</li><li>radiology_report_reader — includes an imaging terminology reference</li><li>Each skill is self-contained. None share resources.</li></ul><h3>The agent code</h3><p>The agent loads all four skills and wraps them in a single SkillToolset. A helper function avoids repeating the loading pattern:</p><pre>from pathlib import Path<br>from google.adk import Agent<br>from google.adk.skills import models<br>from google.adk.tools import skill_toolset<br><br><br>def _load_skill(skill_dir, name, description, metadata):<br>    &quot;&quot;&quot;Read SKILL.md, references/, and assets/ from disk.&quot;&quot;&quot;<br>    skill_md = (skill_dir / &quot;SKILL.md&quot;).read_text(encoding=&quot;utf-8&quot;)<br>    parts = skill_md.split(&quot;---&quot;, 2)<br>    instructions = parts[2].strip()<br><br>    references = {<br>        f.name: f.read_text(encoding=&quot;utf-8&quot;)<br>        for f in (skill_dir / &quot;references&quot;).iterdir()<br>        if f.is_file()<br>    }<br>    assets = {<br>        f.name: f.read_text(encoding=&quot;utf-8&quot;)<br>        for f in (skill_dir / &quot;assets&quot;).iterdir()<br>        if f.is_file()<br>    }<br><br>    return models.Skill(<br>        frontmatter=models.Frontmatter(<br>            name=name,<br>            description=description,<br>            metadata=metadata,<br>        ),<br>        instructions=instructions,<br>        resources=models.Resources(<br>            references=references, assets=assets<br>        ),<br>    )</pre><p>With the helper in place, loading four skills is straightforward:</p><pre>skills_dir = Path(__file__).parent / &quot;skills&quot;<br><br>lab_report_skill = _load_skill(<br>    skills_dir / &quot;lab_report_interpreter&quot;,<br>    name=&quot;lab_report_interpreter&quot;,<br>    description=&quot;Interprets lab results (CBC, BMP, lipid panels) &quot;<br>                &quot;against normal reference ranges.&quot;,<br>    metadata={&quot;domain&quot;: &quot;healthcare&quot;,<br>              &quot;document_type&quot;: &quot;lab_report&quot;},<br>)<br><br>discharge_skill = _load_skill(<br>    skills_dir / &quot;discharge_summary_simplifier&quot;,<br>    name=&quot;discharge_summary_simplifier&quot;,<br>    description=&quot;Simplifies hospital discharge summaries into &quot;<br>                &quot;plain language.&quot;,<br>    metadata={&quot;domain&quot;: &quot;healthcare&quot;,<br>              &quot;document_type&quot;: &quot;discharge_summary&quot;},<br>)<br><br>prescription_skill = _load_skill(<br>    skills_dir / &quot;prescription_explainer&quot;,<br>    name=&quot;prescription_explainer&quot;,<br>    description=&quot;Explains prescriptions — what each medicine does, &quot;<br>                &quot;dosing, side effects, and warnings.&quot;,<br>    metadata={&quot;domain&quot;: &quot;healthcare&quot;,<br>              &quot;document_type&quot;: &quot;prescription&quot;},<br>)<br><br>radiology_skill = _load_skill(<br>    skills_dir / &quot;radiology_report_reader&quot;,<br>    name=&quot;radiology_report_reader&quot;,<br>    description=&quot;Simplifies radiology reports (X-ray, CT, MRI) &quot;<br>                &quot;into plain language.&quot;,<br>    metadata={&quot;domain&quot;: &quot;healthcare&quot;,<br>              &quot;document_type&quot;: &quot;radiology_report&quot;},<br>)</pre><p>Wrap them in a single toolset and attach to the agent:</p><pre>medical_skills = skill_toolset.SkillToolset(<br>    skills=[lab_report_skill, discharge_skill,<br>            prescription_skill, radiology_skill]<br>)<br><br>root_agent = Agent(<br>    name=&quot;medical_document_assistant&quot;,<br>    model=&quot;gemini-2.5-flash&quot;,<br>    instruction=(<br>        &quot;You are a medical document assistant. Identify the &quot;<br>        &quot;type of document and use the appropriate skill. &quot;<br>        &quot;You do NOT provide medical advice.&quot;<br>    ),<br>    tools=[medical_skills],<br>)</pre><p>Notice the agent&#39;s instruction is minimal — four sentences. All domain-specific logic lives in the skills, not the agent prompt.</p><h3>What happens at runtime</h3><p>When a user pastes a lab report, the LLM reads the index, recognizes the input matches lab_report_interpreter, and calls load_skill(name=&quot;lab_report_interpreter&quot;). It then follows the skill&#39;s instructions to load reference ranges and the output template. The other three skills — discharge, prescription, radiology — are never loaded. Their instructions, glossaries, and templates consume zero tokens.</p><p>Here is the actual runtime trace in ADK’s dev UI — you can see the agent calling load_skill followed by multiple load_skill_resource calls to fetch the references and template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hGJJiJhpJr0EoMNMNB5s6A.png" /></figure><p>The agent produces a structured, patient-friendly lab report — values compared against reference ranges, flagged as High/Low/Normal, with plain-language explanations for each result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*azKvVpAtQEbmXMP4czM_gQ.png" /></figure><h3>Why This Works</h3><p><strong>Token savings:</strong> Without skills, all instruction sets sit in the system prompt on every call. With skills, only required skill(s) load. That is a significant token reduction per call, compounding over multi-turn conversations.</p><p><strong>Modularity:</strong> Each skill is a self-contained directory. Move lab_report_interpreter/ to another project, hand it to another team, or version it independently — no coupling to the agent code.</p><p><strong>Independent updates:</strong> A pharmacist updates common medications reference without touching the radiology glossary. A lab technician adds reference ranges without involving the radiology team. Skills are maintained independently because they are packaged independently.</p><p><strong>LLM-driven routing:</strong> No if/else routing code. The LLM reads the skill index and picks the right skill based on user input — the same pattern that makes tools work in agents.</p><h3>When to Use Skills — and When Not To</h3><p><strong>Use </strong><strong>SkillToolset when:</strong></p><ul><li>Your agent has <strong>multiple behavioral modes</strong> and only one is needed per query. This is the primary use case.</li><li>Skill instructions or references are <strong>large</strong> and would bloat the system prompt if always present.</li><li>Skills need to be <strong>reused across agents</strong> — each skill directory is self-contained and portable.</li><li>Different skills are <strong>maintained by different people</strong> and update on different cadences.</li></ul><p><strong>Skip </strong><strong>SkillToolset when:</strong></p><ul><li>Your agent has a <strong>single skill</strong> that is always activated. Inline the instructions directly.</li><li>You are on a <strong>latency-critical path</strong>. Each load_skill call adds an extra LLM round-trip.</li></ul><p>The decision is straightforward:</p><blockquote>If your agent is a specialist that always does the same thing, inline the instructions. If your agent is a generalist that needs to go deep on one of many domains per query, use skills.</blockquote><h3>Summary</h3><p>Skills are an emerging pattern in the AI agent ecosystem — a way to package specialized knowledge as modular, on-demand instruction sets. Anthropic has standardized the concept as an open standard for Claude. Google ADK has adopted the same idea through SkillToolset, bringing progressive disclosure to ADK agents.</p><p>The key insight is that skills are not useful for single-purpose agents. They are useful when an agent has many capabilities but only activates one or two per conversation. The more skills an agent has, and the fewer it needs per query, the greater the savings.</p><h3>References</h3><ul><li><a href="https://github.com/google/adk-python">ADK GitHub repository</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be319f9b1917" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/introducing-skills-in-adk-teach-your-agent-new-tricks-one-skill-at-a-time-be319f9b1917">Skills in ADK: On-Demand Instructions for your Agents</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>