This sample demonstrates the 1P (first-party) Skills pattern: combining
a raw toolset (BigQueryToolset) with a curated skill (SkillToolset) to
give the agent both tools and guided workflows.
- BigQueryToolset provides raw tools:
execute_sql,list_dataset_ids,get_table_info, etc. - SkillToolset provides skill discovery and loading:
list_skills,load_skill,load_skill_resource,run_skill_script. - The bigquery-data-analysis skill ships pre-packaged with ADK and follows the agentskills.io specification.
The agent can discover the skill at runtime, load its instructions for guided workflows, and access reference materials on-demand.
-
Install ADK with BigQuery extras:
pip install google-adk[bigquery]
-
Set up OAuth credentials:
- Create OAuth 2.0 credentials in the Google Cloud Console.
- Update
agent.pywith yourclient_idandclient_secret.
-
Run the sample:
adk web contributing/samples
-
Select
1p_bigquery_skillfrom the agent list.
User Query
|
v
LlmAgent (gemini-2.5-flash)
|
+-- BigQueryToolset tools (direct data access)
| list_dataset_ids, list_table_ids, get_table_info,
| execute_sql, forecast, detect_anomalies, ...
|
+-- SkillToolset tools (guided workflows)
list_skills -> discovers "bigquery-data-analysis"
load_skill -> loads step-by-step instructions
load_skill_resource -> loads sql_patterns.md, etc.
run_skill_script -> executes skill scripts
The skill uses three levels of content:
- L1 - Metadata (always available): skill name and description shown
via
list_skills. - L2 - Instructions (on activation): full workflow steps loaded via
load_skill. - L3 - References (on demand): detailed SQL patterns, schema
exploration guides, and error handling loaded via
load_skill_resource.
This keeps the agent's context efficient while making deep knowledge available when needed.
Other toolsets can follow the same pattern:
- Create a spec-compliant skill directory under
integration/<toolset>/skills/. - Add a
get_*_skill()convenience loader. - (Optional) Add an alias in
tools/<toolset>/for backward compatibility. - Users add both the toolset and
SkillToolsetto their agent's tools.