ai-python-subagents
Installation
SKILL.md
ai-python-subagents
Use a subagent tool when the parent model should choose when to call another agent.
@ai.tool
async def research(topic: str) -> ai.SubAgentTool:
child = ai.Agent(tools=[lookup])
messages = [
ai.system_message("Research briefly."),
ai.user_message(topic),
]
async with child.run(model, messages) as stream:
async for event in stream:
yield event