Module Structure¶
The codebase is organized into focused packages under src/:
agentpool/ — Core Agent Framework¶
agents/- Agent implementations (native, ACP)capabilities/- Native pydantic-ai capability implementations (MCPCapability, FunctionToolsetCapability, CombinedToolsetCapability, SubagentCapability, CodeModeCapability, FilteredToolsetCapability, AgentContext, DelegationService, ResourceSource, entry-point registry)delegation/- AgentPool orchestration, Team coordination, message routinglifecycle/- RunLoop lifecycle dimensions (TriggerSource, Journal, SnapshotStore, CommChannel, EventTransport)messaging/- Message processing, MessageNode abstraction, compactiontools/- Tool framework and implementationstool_impls/- Concrete tool implementations (bash, read, grep, etc.)models/- Pydantic data models and configuration schemasprompts/- Prompt management and templatingstorage/- Interaction tracking and analyticsmcp_server/- MCP server integrationrunning/- Agent execution runtimesessions/- Session managementhooks/- Event hooks systemobservability/- Logging and telemetry (Logfire)
agentpool_config/ — Configuration Models¶
Separated for clean imports. Contains YAML schema definitions for agents, teams, tools, MCP servers.
agentpool_server/ — Protocol Servers¶
acp_server/- Agent Communication Protocol serveropencode_server/- OpenCode TUI/Desktop serveragui_server/- AG-UI protocol serveropenai_api_server/- OpenAI-compatible API servermcp_server/- Model Context Protocol server
agentpool_toolsets/ — Reusable Toolset Implementations¶
builtin/- Built-in toolsets (code, debug, subagent, file_edit, workers)mcp_discovery/- MCP server discovery with semantic search- Specialized toolsets (composio, search, streaming, etc.)
agentpool_storage/ — Storage Providers¶
sql_provider/- SQLAlchemy-based storagezed_provider/- Zed IDE storage integrationclaude_provider/- Claude storage integrationopencode_provider/- OpenCode storage integration
Other Packages¶
agentpool_cli/- Command-line interfaceagentpool_commands/- Command implementationsagentpool_prompts/- Prompt templatesacp/- Agent Communication Protocol implementationclient/- ACP client implementationsagent/- Agent-side protocol implementationschema/- Protocol schemas and typesbridge/- ACP bridge for connecting agentstransports/- Transport layer (stdio, websocket)