InitRunner

Capabilities

Capabilities are PydanticAI's composable extension point for cross-cutting agent behavior. A capability bundles tools, lifecycle hooks, instructions, and model settings into a single unit that attaches to an agent. InitRunner exposes PydanticAI's built-in capabilities via spec.capabilities in role YAML.

For InitRunner-managed integrations (filesystem, shell, SQL, etc.), use Tools instead. Both can coexist in the same role.

YAML Syntax

Capabilities use PydanticAI's native spec format with three forms:

spec:
  capabilities:
    # Bare string (no arguments)
    - WebSearch

    # Single positional argument
    - Thinking: high

    # Keyword arguments
    - MCP:
        url: https://mcp.example.com
    - WebSearch:
        allowed_domains: [docs.python.org, pydantic.dev]
        search_context_size: high

Names are CamelCase class names matching PydanticAI's capability registry.

Supported Capabilities

CapabilityArgumentsPurpose
Thinkingeffort: minimal, low, medium, high, xhighEnable model-level extended thinking
WebSearchallowed_domains, blocked_domains, search_context_size, max_usesWeb search with provider-adaptive fallback
WebFetchallowed_domains, blocked_domains, max_usesURL fetching with local fallback
ImageGeneration(none)Image generation with fallback
MCPurl (required), id, authorization_token, headers, allowed_toolsPydanticAI-native MCP server connection
BuiltinTooltool (builtin tool spec)Register individual builtin tools
PrefixToolsprefix, capability (nested spec)Namespace tool names to avoid conflicts

Examples

Extended thinking

spec:
  capabilities:
    - Thinking: high

Web search with domain filtering

spec:
  capabilities:
    - WebSearch:
        allowed_domains: [docs.python.org, github.com]
        search_context_size: medium

Remote MCP server

spec:
  capabilities:
    - MCP:
        url: https://mcp.example.com/api
        authorization_token: ${MCP_TOKEN}

Prefixed capabilities (namespace tools)

spec:
  capabilities:
    - PrefixTools:
        prefix: search
        capability:
          WebSearch:
            allowed_domains: [example.com]

Combined

spec:
  capabilities:
    - Thinking: high
    - WebSearch:
        allowed_domains: [docs.python.org]
    - MCP:
        url: https://tools.example.com/mcp

Guardrail Capabilities

InitRunner auto-constructs an InputGuardCapability from spec.security.content when any input validation is configured (blocked patterns, profanity filter, LLM classifier, or non-default max prompt length). This capability fires before the agent starts and raises ContentBlockedError to abort the run when the user prompt violates the content policy.

No capabilities: entry is needed — the guard is auto-constructed from the security config:

spec:
  security:
    content:
      blocked_input_patterns:
        - "ignore.*instructions"
        - "reveal.*system.*prompt"
      profanity_filter: true
      max_prompt_length: 10000

See Security for the full content policy reference.

Capabilities vs Tools

Capabilities (spec.capabilities)Tools (spec.tools)
SourcePydanticAI built-insInitRunner tool registry
ScopeCross-cutting (hooks + tools + instructions)Single tool function
Use forThinking, web search, MCP serversFilesystem, shell, SQL, HTTP, custom code

Both can coexist in the same role. InitRunner logs a warning when both an MCP capability and an MCP tool target the same server.

Thinking vs Reasoning

The Thinking capability controls model-level extended thinking — how much the LLM reasons internally before responding. InitRunner's spec.reasoning controls orchestration patterns (react, reflexion, todo_driven, plan_execute) that structure multi-step agent runs. See Reasoning.

These are orthogonal and can be combined, though InitRunner logs a warning since the interaction may be confusing.

Dashboard

Agents with capabilities show:

  • A capabilities dot in the capability glyph (2x4 grid)
  • An Enhanced filter in the capability filter bar
  • A Capabilities section in the agent detail config panel listing each capability's type and configuration

On this page