Skip to content

The agent manifest is a YAML file that defines your complete agent setup. The configuration is powered by Pydantic and provides excellent validation and IDE support for YAML linters by providing an extensive, detailed schema.

Top-Level Structure

Here's the complete manifest structure with all available top-level sections:

Manifest Overview

Complete agent configuration manifest defining all available agents.

This is the root configuration that: - Defines available response types (both inline and imported) - Configures all agent instances and their settings - Sets up custom role definitions and capabilities - Manages environment configurations

A single manifest can define multiple agents that can work independently or collaborate through the orchestrator.

Manifest Overview (YAML)
INHERIT: null  # Inheritance references.
name: null  # Optional name for this manifest.
resources: {}  # Resource configurations defining available filesystems.
agents: {}  # Mapping of agent IDs to their configurations.
default_agent: null  # Name of the default/main agent.
file_agents: {}  # Mapping of agent IDs to file-based agent definitions.
teams: {}  # Mapping of team IDs to their configurations.
storage:  # Storage provider configuration.
  providers: null  # List of configured storage providers
  default_provider: null  # Name of default provider for history queries.
  agents: null  # Global agent filter. Can be overridden by provider-specific filters.
  filter_mode: and  # How to combine global and provider agent filters:
  log_messages: true  # Whether to log messages.
  log_sessions: true  # Whether to log conversations.
  log_commands: true  # Whether to log command executions.
  title_generation_model: google-gla:gemini-2.5-flash-lite,openrouter:deepseek/deepseek-r1-0528:free  # Model to use for generating conversation titles.
  title_generation_prompt: 'Generate metadata for this conversation request. Provide:  # Prompt template for generating conversation titles.

    - A short, descriptive title (3-7 words)

    - A single emoji that represents the topic

    - An iconify icon name (e.g., ''mdi:code-braces'', ''mdi:database'', ''mdi:bug'')'
observability:  # Observability provider configuration.
  enabled: true  # Whether observability is enabled.
  provider: null  # Single observability provider configuration.
conversion:  # Document conversion configuration.
  providers: null  # List of configured converter providers.
  default_provider: null  # Name of default provider for conversions.
  max_size: null  # Global size limit for all converters.
responses: {}  # Mapping of response names to their definitions.
model_variants: {}  # Named model variants with pre-configured settings.
jobs: {}  # Pre-defined jobs, ready to be used by nodes.
mcp_servers: []  # List of MCP server configurations:
pool_server:  # Pool server configuration.
  type: mcp  # MCP server type.
  serve_nodes: true  # Which nodes to expose as tools:
  serve_prompts: true  # Which prompts of the pool's prompt library to serve as MCP prompts:
  serve_skills: true  # Publish the pool's skills through the MCP Skills extension (SEP-2640).
  serve_events: false  # Publish the pool's session activity as MCP events (Events extension, SEP-3415).
  background_tasks: false  # Let clients run agent and team tools as MCP background tasks (SEP-2663).
  tasks_url: null  # Where task state lives (only with background_tasks).
  tasks_ttl: null  # How long a task's state and result are kept (only with background_tasks).
  transport: stdio  # Transport type to use.
  host: localhost  # Host to bind server to (SSE / Streamable-HTTP only).
  port: 3001  # Port to listen on (SSE / Streamable-HTTP only).
  cors_origins: []  # Origins of browser clients allowed to call the server (SSE / Streamable-HTTP only).
  auth: null  # How clients authenticate (SSE / Streamable-HTTP only). Unset: anyone who can reach
  enabled: false  # Whether this server is currently enabled.
prompts:  # Prompt library configuration.
  system_prompts: {}  # Mapping of system prompt identifiers to their definitions.
  template: null  # Optional template for combining prompts.
  providers: []  # List of external prompt providers to use.
commands: {}  # Global command shortcuts for prompt injection.
compaction: null  # Compaction configuration for message history management.

Top-Level Sections

Field Type Default Description
INHERIT str | list[str] Inheritance references.
name str Optional name for this manifest.
resources dict[str, one of 57 types] (factory) Resource configurations defining available filesystems.
agents dict[str, one of 10 types] (factory) Mapping of agent IDs to their configurations.
default_agent str Name of the default/main agent.
file_agents dict[str, str | ClaudeFileAgentConfig | OpenCodeFileAgentConfig | NativeFileAgentConfig] (factory) Mapping of agent IDs to file-based agent definitions.
teams dict[str, TeamConfig] (factory) Mapping of team IDs to their configurations.
storage StorageConfig (factory) Storage provider configuration.
observability ObservabilityConfig (factory) Observability provider configuration.
conversion ConversionConfig (factory) Document conversion configuration.
responses dict[str, StructuredResponseConfig] (factory) Mapping of response names to their definitions.
model_variants dict[str, one of 16 types] (factory) Named model variants with pre-configured settings.
jobs dict[str, Job[Any, str]] (factory) Pre-defined jobs, ready to be used by nodes.
mcp_servers list[str | StdioMCPServerConfig | SSEMCPServerConfig | StreamableHTTPMCPServerConfig] (factory) List of MCP server configurations:
pool_server MCPPoolServerConfig (factory) Pool server configuration.
prompts PromptLibraryConfig (factory) Prompt library configuration.
commands dict[str, StaticCommandConfig | FileCommandConfig | CallableCommandConfig | str] (factory) Global command shortcuts for prompt injection.
compaction CompactionConfig Compaction configuration for message history management.
Section Documentation
agents Node Types: native, Claude Code, Codex, ACP, AG-UI, OpenCode V2, Antigravity and T3 agents
file_agents File Agents
teams Teams
default_agent The agent clients talk to first (else the first agent)
model_variants Model Variants
responses Response Types
mcp_servers MCP Servers
pool_server MCP Server (serve-mcp)
resources Resources
storage Storage
observability Observability
conversion Document Conversion
prompts System Prompts, Prompt Hubs
commands Commands
jobs Tasks
compaction Message History
INHERIT Inheritance

Configuration Resolution

AgentPool uses a layered configuration system inspired by OpenCode. Multiple config files are automatically discovered and deep-merged, allowing you to set global preferences while overriding project-specific settings.

Precedence Order

Configs are loaded and merged in this order (later sources override earlier ones):

Priority Source Location Description
1 Global ~/.config/agentpool/agentpool.yml User-wide preferences
2 Custom AGENTPOOL_CONFIG env var CI/deployment overrides
3 Inline AGENTPOOL_CONFIG_CONTENT env var Runtime config as YAML/JSON string
4 Project agentpool.yml in project root Project-specific settings
5 Explicit CLI argument Highest precedence
fallback Built-in Package defaults Only if no agents defined elsewhere

Deep Merge Behavior

Configs are deep-merged, not replaced. This means:

  • Nested dictionaries are merged recursively
  • Conflicting keys are overridden by higher-precedence sources
  • Non-conflicting settings from all sources are preserved
  • Lists are replaced entirely (not concatenated)

Project Config Discovery

Project config is discovered by searching for agentpool.yml (or .yaml, .json, .jsonc) starting from the current directory and traversing up to the nearest git repository root.

Fallback Behavior

The built-in fallback config (e.g., acp_assistant.yml) is only loaded if no agents are defined in any of the other layers. This ensures that:

  • Users who define their own agents don't get polluted with default agents
  • Users without any config still get a working default assistant

Example: Layered Configuration

~/.config/agentpool/agentpool.yml
# User preferences applied everywhere
model_variants:
  fast:
    type: string
    identifier: openai:gpt-4o-mini
  smart:
    type: anthropic
    identifier: claude-sonnet-4-5

storage:
  providers:
    - type: sql
      url: sqlite:///~/.local/share/agentpool/history.db
./agentpool.yml
# Project-specific agents (inherits global model_variants and storage)
agents:
  coder:
    model: smart  # References global variant
    system_prompt: "You are an expert Python developer."
    tools:
      - type: file_access
      - type: bash

The merged config contains both the global model_variants/storage and the project's agents.

Environment Variables

Variable Description
AGENTPOOL_CONFIG Path to custom config file
AGENTPOOL_CONFIG_CONTENT Inline YAML/JSON config content
AGENTPOOL_NO_GLOBAL_CONFIG Set to disable global config loading
AGENTPOOL_NO_PROJECT_CONFIG Set to disable project config discovery

CLI Commands

Use these commands to inspect config resolution:

# Show which configs are found and loaded
agentpool config show

# Show standard config paths
agentpool config paths

# Create a starter config file
agentpool config init           # In current project
agentpool config init global    # In global config dir

File-Level Inheritance (INHERIT)

In addition to layered resolution, individual config files can use the INHERIT key to explicitly inherit from another file:

base.yml
storage:
  log_messages: true
agents:
  base_agent:
    model: "openai:gpt-5"
    retries: 2
agents.yml
INHERIT: base-config.yml
agents:
  my_agent:
    model: openai:gpt-5
    description: "Specialized agent"

AgentPool supports UPaths (universal-pathlib) for INHERIT, allowing pointing to remote configurations (http://path/to/config.yml).

Reusing Settings with YAML Anchors

Top-level keys starting with x- (the Docker Compose convention) are extension fields: AgentPool ignores them and the JSON schema allows them. Use one to hold shared settings as YAML anchors (&name) and merge them into agents with <<: *name:

x-defaults: &defaults
  model: openai:gpt-5-mini
  retries: 2
  description: "Shared defaults"

agents:
  reviewer:
    <<: *defaults
    system_prompt: "Review the code you are given."
  writer:
    <<: *defaults
    model: openai:gpt-5  # keys next to the merge override it
    system_prompt: "Write documentation."

Other unknown top-level keys are still rejected, so typos like agent: keep failing validation.

Schema Validation

You can get IDE linter support by adding this line at the top of your YAML:

# yaml-language-server: $schema=https://raw.githubusercontent.com/phil65/agentpool/refs/heads/main/schema/config-schema.json

Note

Versioned config files will arrive soon for better stability!

Usage

Load a manifest in your code:

from agentpool import AgentPool

async with AgentPool("agents.yml") as pool:
    agent = pool.get_agent("analyzer")
    result = await agent.run("Analyze this code...")