Skip to content

Skills for ADK agents

Supported in ADKPython v1.25.0TypeScript v0.6.1Go v1.2.0Kotlin v0.1.0Experimental

An agent Skill is a self-contained unit of functionality that an ADK agent can use to perform a specific task. An agent Skill encapsulates the necessary instructions, resources, and tools required for a task, based on the Agent Skill specification. The structure of a Skill allows it to be loaded incrementally to minimize the impact on the operating context window of the agent.

Experimental

The Skills feature is experimental. We welcome your feedback via the respective ADK GitHub repositories: ADK Python, ADK TypeScript, ADK Go, ADK Kotlin.

Get started

Use the SkillToolset class to make one or more Skills available to your agent. You can define skills in code or load skills from a filesystem.

import pathlib

from google.adk import Agent
from google.adk.skills import load_skill_from_dir
from google.adk.tools import skill_toolset

weather_skill = load_skill_from_dir(
    pathlib.Path(__file__).parent / "skills" / "weather_skill"
)

my_skill_toolset = skill_toolset.SkillToolset(
    skills=[weather_skill],
    additional_tools=[get_weather_tool],
)

root_agent = Agent(
    model="gemini-flash-latest",
    name="skill_user_agent",
    description="An agent that can use specialized skills.",
    instruction=(
        "You are a helpful assistant that can leverage skills to perform tasks."
    ),
    tools=[
        my_skill_toolset,
    ],
)

For a complete code example of an ADK agent with a Skill, including both file-based and in-line Skill definitions, see the code sample skills_agent.

import {Agent, FunctionTool, SkillToolset, loadSkillFromDir} from '@google/adk';
import * as path from 'node:path';
import {z} from 'zod';