[Feature Request]: First-Class Composable `Skill` & `Command` Abstraction for Modular `LlmAgent` Capabilities
Maintainer thường phản hồi trong vòng 3 ngày
@sanketpatil06 đang làm issue này rồi.
Từ ngày 19/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 22.3k
- Fork
- 4.4k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/adk-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
google/adk-python#8360 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
google/adk-python#8359 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Can pin to litellm version be changed?Có thể đã có người làm @llalitkumarrr đã nhận 10 ngày trước. Đang mởmodels
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
google/adk-python#8129 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
OpenAPI tools ignore operation- and path-level server overridesCó thể đã có người làm @sanketpatil06 đã nhận 14 ngày trước. Đang mởtools
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
google/adk-python#8064 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Two docstrings in openapi_tool document parameters the signatures do not acceptCó thể đã có người làm @surajksharma07 đã nhận 17 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
google/adk-python#8024 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của google/adk-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vllm-project/vllm#70030 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TigreGotico/tugaphone#408 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
gke-labs/kube-agents#7308 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
t: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
-
chore
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
lugassawan/swe-workbench#841 ·