-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
As a contributor to AgentPool, I'd like to clarify the design philosophy regarding AgentPool's relationship with pydantic-ai to better understand how to approach certain contributions and feature proposals.
Context
Based on the codebase analysis, I observe that:
- AgentPool has its own abstraction layer:
MessageNode,BaseAgent,Tool,Team- which unifies multiple protocols (native/pydantic-ai, ACP, AG-UI, Claude Code, Codex) - Pydantic-ai is used as an execution backend: For native agents, AgentPool lazily creates pydantic-ai's
Agentinstance viaget_agentlet(), converting its ownToolabstractions to pydantic-ai'sToolusingto_pydantic_ai() - AgentPool adds orchestration features: Session management, protocol bridging, multi-agent teams, hooks, connections - which go beyond pydantic-ai's scope
Questions
1. Should pydantic-ai be treated as a "first-class citizen" in AgentPool?
- Should AgentPool increasingly leverage pydantic-ai's abstractions (e.g.,
Agentclass,RunContext, toolsets, multi-agent patterns) where they align? - Or should AgentPool maintain independent abstractions to support heterogeneous agent types?
2. Is AgentPool intended as a "second-level wrapper/orchestration framework" on top of pydantic-ai? - Should we view AgentPool's role as: pydantic-ai handles agent execution, AgentPool handles orchestration (protocol bridging, multi-agent coordination, deployment)?
- This aligns with the README's description: "AgentPool acts as a protocol bridge"
3. For features that pydantic-ai provides, should AgentPool: - (A) Wrap and expose them (current pass-through pattern in RFC-0002/0003)
- (B) Re-implement them in AgentPool's own abstractions
- (C) Mix - use pydantic-ai for native agents, maintain own abstractions for cross-protocol features
4. Specific scenarios I'm considering: - Multi-agent workflows: Should we use pydantic-ai's agent delegation pattern or AgentPool's
Teamabstraction? - Tool management: Should we leverage pydantic-ai's toolsets more heavily or continue with AgentPool's
ToolManager? - Configuration: Should we expose more pydantic-ai agent options directly in YAML, or keep them behind abstractions?
Motivation
Understanding this design philosophy would help contributors:
- Make better decisions about whether a feature belongs in AgentPool or should be delegated to pydantic-ai
- Avoid duplicating effort on things pydantic-ai already provides
- Maintain consistency with the project's architectural vision
- Write more aligned code and PRs
Research Notes
I've researched both the AgentPool codebase and pydantic-ai's design philosophy:
From AgentPool:
- Tools use
to_pydantic_ai()conversion with fallback toschemez BaseAgentextendsMessageNode, not pydantic-ai'sAgent
From pydantic-ai:- Designed as "FastAPI for GenAI" - a core framework meant to be extended
- Provides toolsets, custom agents, history processors as extension points
- Multiple frameworks already build on top: pydantic-deep, pydantic-ai-todo, etc.
- Has multi-agent patterns (delegation, graphs) but orchestration is left to frameworks
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels