feat: support sub agent mechanism

This commit is contained in:
hetao
2026-02-05 19:59:25 +08:00
parent 43ebce3b37
commit ef379a3100
18 changed files with 775 additions and 33 deletions

View File

@@ -0,0 +1,34 @@
"""Subagent registry for managing available subagents."""
from src.subagents.builtins import BUILTIN_SUBAGENTS
from src.subagents.config import SubagentConfig
def get_subagent_config(name: str) -> SubagentConfig | None:
"""Get a subagent configuration by name.
Args:
name: The name of the subagent.
Returns:
SubagentConfig if found, None otherwise.
"""
return BUILTIN_SUBAGENTS.get(name)
def list_subagents() -> list[SubagentConfig]:
"""List all available subagent configurations.
Returns:
List of all registered SubagentConfig instances.
"""
return list(BUILTIN_SUBAGENTS.values())
def get_subagent_names() -> list[str]:
"""Get all available subagent names.
Returns:
List of subagent names.
"""
return list(BUILTIN_SUBAGENTS.keys())