mcpbeat Sign in

AI Python Subagents Agent Skill

Use for the subagent-as-a-tool pattern.

288 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
4
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/vercel-labs/seal --skill ai-python-subagents

What it tells the agent to use

found in the instruction text
Task spawns other agents

The instruction itself

1 sections, as written by the author

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

The parent model sees the child agent's final assistant text as the tool

result. The caller sees child events as ai.events.PartialToolCallResult.

Render nested output from event.value:

if isinstance(event, ai.events.PartialToolCallResult):
    if isinstance(event.value, ai.events.TextDelta):
        print(event.value.chunk, end="", flush=True)

Do not append child messages to the parent history yourself. The tool result

stores the child transcript as a MessageBundle.

For MessageBundle, preliminary output, and streaming tool details, use

ai-python-streaming-tools.

How to use it

Copy the folder

Take vercel-labs/ai-python-subagents from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.