[Feature Request]: First-Class Composable `Skill` & `Command` Abstraction for Modular `LlmAgent` Capabilities
維護者通常 3 天內回覆
@sanketpatil06 已經在處理了。
開始於 2026年11月19日。
評估
這個 Issue 還沒有評估資料。
描述
Is your feature request related to a problem? Please describe.
Currently, LlmAgent treats domain instructions (instruction / global_instruction) as monolithic strings or templates and tools as flat lists of Python functions, BaseTool, or AgentTool instances.
When scaling an agent across multiple domains, business verticals, or evolving prompt/tool versions in production:
- Prompt & Tool Coupling: Domain-specific behavioral rules, context, and permitted tools are manually concatenated and wired at agent initialization time rather than encapsulated as a cohesive unit.
- Version Coexistence & Reuse: Teams cannot easily package a domain capability (instructions + scoped tools + lifecycle hooks) to reuse across different agents or run multiple versions side-by-side without duplicating agent definitions.
- CLI / Runtime Switching: Unlike contributor-side agent skills (
.agents/skills/), runtime ADK applications lack a native way to mount, inspect, or dynamically select modular capabilities via code or CLI flags (e.g.,adk run).
Describe the solution you'd like
Introduce a first-class, composable Skill primitive (and optional Command action binding) in google.adk that encapsulates scoped instructions, domain context, permitted tools, and lifecycle hooks into a reusable, versioned unit that can be mounted onto an LlmAgent.
Proposed Core API & Design Considerations
-
SkillPrimitive (google.adk.skills.Skill)
A declarative or class-based container bundling:name&version(e.g.,"bigquery_governance","1.0.0")description(used for routing/discovery or progressive disclosure)instruction(scoped system/domain guidance merged cleanly into the hostLlmAgentcontext)tools/commands(scopedBaseTool/ callable actions enabled only when the skill is active)- Optional
before_skill_callback/after_skill_callbackhooks for domain-level guardrails and telemetry.
-
LlmAgentComposition (skills=[...])
AllowLlmAgentto accept a list ofSkillinstances alongsidetools:
from google.adk.agents import LlmAgent
from google.adk.skills import Skill
governance_skill = Skill(
name="schema_governance",
version="1.0.0",
description="Enforces snake_case naming and read-only query validation.",
instruction="Always validate table schemas before generating SQL...",
tools=[validate_schema_tool, inspect_catalog_tool],
)
worker_agent = LlmAgent(
name="data_engineer_agent",
model="gemini-2.5-pro",
instruction="You are a core data engineering worker.",
skills=[governance_skill],
)
Progressive Disclosure / Dynamic Activation
Static Mounting: All mounted skills contribute their instructions and tools at agent startup.
On-Demand Activation (Optional): Expose skill metadata (name + description) first and load full instructions/tools into context only when invoked, keeping base token overhead low when an agent holds many skills.
CLI & Runner Integration
Support inspecting or selecting skills at runtime (e.g., adk run --skill schema_governance) and surfacing active skill metadata in Event / Session traces for observability.
Describe alternatives you've considered
Using AgentTool / Sub-Agents: Wrapping every domain capability as a separate sub-agent introduces unnecessary LLM round-trips, session state copying, and delegation latency when the capability is really a reusable skillset (instructions + tools) meant to execute within a single worker's reasoning loop.
Custom User-Space Wrapper Classes (SkillAgent): Implementing custom factory wrappers around LlmAgent works in individual repositories, but fragments ecosystem conventions and prevents native integration with adk web, adk run, and AgentEvaluator.
Reference Implementation & Real-World Context
I have implemented and tested this pattern in production use cases within my open-source repository:
Repository: ozkary/ai-engineering (see /adk)
Architectural Pattern: Decouples a lean worker agent kernel from domain-specific Skills (e.g., domain context, governance rules, and versioned capabilities) and Commands (deterministic tool actions), enabling strict Separation of Concerns (SoC) and multi-version skill coexistence without bloating core agent definitions.
Impact & Backwards Compatibility
100% Additive / Non-Breaking: skills: list[Skill] = [] defaults to empty on LlmAgent, preserving full backwards compatibility with existing instruction and tools definitions.
Testing & Observability: Aligns cleanly with AgentEvaluator and ADK's existing callback/event architecture.
- 主要語言
- Python
- 星號
- 22.3k
- 分支
- 4.4k
- 平均合併
- 1 天 2 小時
- 30 天內合併 PR
- 6
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
google/adk-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
google/adk-python#8360 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
google/adk-python#8359 ·
維護者通常 3 天內回覆
-
Can pin to litellm version be changed?可能已有人在做 @llalitkumarrr 於 10 天前認領。 未關閉models
難度 1/5 1 小時以內 新手友好度 65/100
google/adk-python#8129 · 2 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
-
OpenAPI tools ignore operation- and path-level server overrides可能已有人在做 @sanketpatil06 於 14 天前認領。 未關閉tools
難度 2/5 1-3 小時 新手友好度 75/100
google/adk-python#8064 · 4 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
-
Two docstrings in openapi_tool document parameters the signatures do not accept可能已有人在做 @surajksharma07 於 17 天前認領。 未關閉
難度 1/5 1 小時以內 新手友好度 88/100
google/adk-python#8024 · 1 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
查看 google/adk-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
vllm-project/vllm#70030 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
TigreGotico/tugaphone#408 ·
維護者通常 1 天內回覆
-
needs-triage
難度 2/5 1-3 小時 新手友好度 74/100
gke-labs/kube-agents#7308 ·
維護者通常 1 天內回覆
-
t: bug
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 3 天內回覆
-
chore
難度 1/5 1-3 小時 新手友好度 88/100
lugassawan/swe-workbench#841 ·