--- id: subagents-pydantic-ai version: "0.2.18" license: MIT License Copyright (c) 2026 Vstorm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # subagents-pydantic-ai — Subagent toolset for pydantic-ai with dual-mode execution and dynamic agent creation License: permissive · Maintenance: active · Downloads: 242.5K/mo ## What it is and what it does Subagents for Pydantic AI is a library that extends Pydantic AI agents with the ability to delegate work to specialist subagents. Instead of a single agent handling all tasks, you can define multiple subagents with specific roles (researcher, writer, analyst, etc.) and have the parent agent coordinate them. The library handles three execution modes: sync (blocking until the subagent finishes), async (spawning background tasks and checking results later), and auto (letting the system pick the best mode based on task characteristics). The package provides two main APIs: a high-level Capabilities API that automatically wires up delegation tools and system prompts, and a lower-level Toolset API for fine-grained control. It also supports dynamic agent creation at runtime, enabling the parent agent to spawn new specialists on demand. Built-in features include token tracking across delegated tasks, cooperative task cancellation, subagent-to-parent question-asking, and message steering for running background tasks. Use it for: - Research assistant that delegates to specialist researchers, then synthesizes findings with a writer agent. - Code review system with parallel security, style, and performance agents analyzing the same code. - Content pipeline where a researcher gathers data, an analyst processes it, and a writer produces output. - Customer support router that delegates billing, technical, and sales inquiries to focused agents. - Data processing system that spawns worker agents dynamically based on input volume or complexity. - Document analysis workflow extracting, summarizing, and categorizing content with focused agents. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds multi-agent delegation to Pydantic AI agents, letting you spawn and coordinate specialist subagents that run synchronously, asynchronously, or in auto-selected mode with built-in token tracking and task cancellation. Yes, if you are building multi-agent systems on top of Pydantic AI. The library is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It is still in Beta (0.2.18) and relatively new (first release January 2026), so expect API refinement; verify compatibility with your specific Pydantic AI version before committing to production use. ## Install pip install subagents-pydantic-ai uv add subagents-pydantic-ai poetry add subagents-pydantic-ai ## Installing subagents-pydantic-ai Before you install: Low friction: pure Python wheel with only three runtime dependencies (pydantic-ai-slim, pydantic, typing-extensions). Active maintenance with a commit as recent as 2026-08-12 and steady releases since January 2026. License in practice: MIT License permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects. Quickstart: pip install subagents-pydantic-ai from pydantic_ai import Agent from subagents_pydantic_ai import SubAgentCapability, SubAgentConfig agent = Agent( "openai:gpt-4.1", capabilities=[SubAgentCapability( default_model="openai:gpt-4.1", subagents=[ SubAgentConfig( name="researcher", description="Researches topics", instructions="Investigate thoroughly.", ), ], )], ) result = await agent.run("Research and summarize") Requires Python 3.10 or later; also requires a working Pydantic AI setup with a configured model (e.g., OpenAI API key for gpt-4.1). Verify before relying: - Performance characteristics and latency overhead when coordinating many concurrent subagents. - Token cost implications and how token tracking integrates with billing across multiple model calls. - Compatibility with Pydantic AI versions beyond the tested range. ## Package facts - License: MIT License Copyright (c) 2026 Vstorm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 242.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags multi-agent orchestration pydantic, agent delegation framework, subagent task coordination, pydantic ai multi-agent, async agent delegation, specialist agent routing, agent task management, multi-agent-orchestration, task-delegation, pydantic-ai-extension [View on SkillFed](https://skillfed.io/packages/subagents-pydantic-ai) · [View on PyPI](https://pypi.org/project/subagents-pydantic-ai/)