Agent recipes
A recipe is the versioned package defining one or more agents and the resources they share. Recipes is the open format for vertical agents, built on Pi.
A recipe has the following properties:
- Ownership. Agent definitions, instructions, skills, capability policy, and quality criteria live in your repository.
- Portability. Pi runs the same recipe semantics locally and inside an Introspection runtime, across supported models and infrastructure.
- Reviewability. Git shows which behavior changed and lets normal pull request controls govern production changes.
- Composability. Start with one agent, then add focused skills, tools, subagents, and judges only as requirements emerge.
Recipe, Pi, and Introspection
| Layer | Responsibility |
|---|---|
| Recipe | Declares the behavior and capabilities you own. |
| Pi | Resolves the recipe and executes the agent loop. |
| Introspection | Pins a recipe version, runs it in governed infrastructure, and records the production experience that informs the next version. |
Pi can run a recipe without an Introspection account. Introspection surrounds that same behavior with customer identity, scoped bindings, isolated sandboxes, durable tasks, conversations, judges, experiments, and deployment controls. Nothing is translated into a platform-specific agent format on the way to production.
pi.recipes is the canonical format reference. The pages here explain how recipes connect to Introspection and link to the canonical contract for field-level details.
Inside a recipe
The refund exception agent from the Quickstart begins with one agent, one skill, and one safe capability:
refund-exception-agent/
├── agents/
│ └── agent.yaml
├── skills/
│ └── refund-exceptions/SKILL.md
├── reference/
│ └── refund-policy.md
├── SYSTEM.md
└── package.jsonThe adjacent .introspection/refund-exception-agent.yaml file connects this
directory to a managed runtime. It is deployment configuration, not part of the
portable recipe.
package.json
{
"name": "@acme/refund-exception-agent",
"version": "0.1.0",
"description": "Review refund exceptions and draft evidence-backed responses.",
"type": "module",
"pi": {
"agents": ["agents/*.yaml"],
"skills": ["skills/**/SKILL.md"]
}
}Run the recipe locally from the repository root:
introspection local \
--runtime refund-exception-agent \
--print "Review order 1842 against the refund policy and draft the next response."The useful result is not merely a valid package. The trace should show the agent reading the authoritative files, applying the controlling rule, and returning a draft or escalation without taking the irreversible action.
Add structure only when it earns its place
Start with the smallest agent that handles representative cases. Extend it when the evidence shows a real need:
| Need | Add |
|---|---|
| A repeatable domain procedure | A focused skill |
| Deterministic code or a new capability | An extension or tool |
| An external service contract | A declared MCP server and environment binding |
| Work that benefits from an independent context and capability boundary | A subagent |
| A recurring semantic quality worth measuring | A calibrated judge |
Avoid copying the same instruction into several agent files. Put shared rules in
SYSTEM.md, detailed procedures in skills, and role-specific behavior in agent
YAML. Reference canonical files instead of duplicating their contents.
Distribution and deployment
Distribution is Git. Pushing the directory publishes source that anyone with Pi and the Recipes extension can resolve and run. A registry package is optional, and sharing a recipe does not create an Introspection runtime.
Deployment is a separate, explicit action. Introspection reads the adjacent runtime manifest, records the exact repository path and commit, and creates an immutable runtime version. Environment-specific credentials, endpoints, customer identity, and infrastructure remain outside the recipe as bindings and runtime configuration.
Continue
- Agent definitions: models, capabilities, variants, and subagents.
- Skills and prompts: progressively loaded domain procedures.
- Packaging: composition, distribution, and dependency boundaries.
- Develop and ship: move a recipe change through staging to production.