This demo showcases the Agent Skills standard integration with ADK. It demonstrates how to:
- Load skills from directories using
AgentSkillLoader - Convert skills to ADK tools using
SkillTool - Generate discovery prompts for the LLM
- Use skills with progressive disclosure
# From the adk-python root directory
adk web contributing/samples/agent_skills_demoThe demo loads BigQuery ML skills from src/google/adk/tools/bigquery/skills/:
- bqml - Machine learning in BigQuery
- bq-ai-operator - AI operations (text generation, embeddings)
Each skill follows the Agent Skills standard format:
skill-name/
├── SKILL.md # Short description and instructions
├── references/ # Detailed documentation
│ ├── MODEL_TYPES.md
│ └── BEST_PRACTICES.md
├── scripts/ # Helper scripts
│ └── validate_model.py
└── assets/ # Templates, configs
Skills support three stages:
- Discovery (Stage 1): Minimal metadata shown in discovery prompt
- Activation (Stage 2): Full instructions loaded on demand
- Execution (Stage 3): Scripts and references loaded as needed
User: What ML skills do you have?
Agent: [Reviews discovery prompt and lists available skills]
User: Tell me about BQML
Agent: [Activates bqml skill, provides detailed instructions]
User: What model types are available?
Agent: [Loads MODEL_TYPES.md reference, explains options]
User: Validate my model configuration
Agent: [Runs validate_model.py script]
from google.adk.skills import AgentSkillLoader, SkillTool
# Load skills from directory
loader = AgentSkillLoader()
loader.add_skill_directory("./skills")
# Create tools for agent
skill_tools = [SkillTool(skill) for skill in loader.get_all_skills()]
# Generate system prompt
discovery_prompt = loader.generate_discovery_prompt()
# Create agent with skill tools
agent = LlmAgent(
model="gemini-2.0-flash",
instruction=f"Available skills:\n{discovery_prompt}",
tools=skill_tools,
)- Create a skill directory following the Agent Skills standard
- Add
SKILL.mdwith YAML frontmatter - Add references, scripts, and assets as needed
- Update the
SKILLS_DIRpath inagent.py
Skills can include ADK-specific configuration in their frontmatter:
adk:
config:
timeout_seconds: 300
max_parallel_calls: 5
allowed_callers:
- my_agent