Composition

A recipe can share a common operating system while giving each agent a focused role.

Instruction layers

  • SYSTEM.md is the recipe-wide instruction layer shared across root and delegated agents.
  • system_instructions in agent YAML specializes one agent in append or replace mode.
  • An agent's skills list selects the skills Pi discovers for that agent.
  • Skills carry reusable, progressively loaded procedure.
  • Extensions add Pi-native tools and runtime behavior without modifying the Pi harness.

Inheritance

name: researcher
from: agent
tools:
  - read
  - bash
system_instructions:
  mode: append
  content: |
    Verify claims against primary sources.

from: inherits another agent with field-specific rules: model, MCP, and extensions merge according to their own contracts; tools, skills, and subagents replace; system_instructions replaces wholesale. Read the canonical agent composition guide before relying on inheritance details.