All products
Production AI Skills

Agent Reliability Playbook

Ship agents that work in production. The 7-layer reliability stack.

Ship AI agents that work in production, not just on demos.
See use cases ↓
One-time paymentLifetime updatesCommercial license

7

Skills

15

Anti-patterns

5

Tool adapters

12

Pre-launch items

What you'll be able to do

Concrete outcomes, not vague promises.

01

Your first production AI agent

You've built an agent prototype. It works on 3 test cases. Now you need to ship it to real users without breaking everything. The 7 layers are the discipline.

Ship with confidence, not crossed fingers.
02

Debugging a familiar failure

Agent booked 38 hotel rooms. Or sent an email to the wrong person. Or forgot the original goal after 20 turns. The anti-patterns skill is the catalog.

Identify the failure in 5 minutes, not 5 days.
03

Training your team on agent design

New engineers joining your AI team. They need to learn the discipline before they ship. The playbook is the onboarding curriculum.

Faster onboarding, fewer production incidents.
04

Pre-launch review for AI features

Every AI feature ships through a review checklist. The pack is the review checklist — 12 items for the orchestrator, 15 for the anti-patterns.

Catch the obvious mistakes before users do.

Built for

If any of these are you, this is for you.

AI engineers shipping their first production agentSenior engineers who have shipped agents and learned the hard wayAI engineering managers who need a team-wide disciplineIndie hackers building AI products who can't afford a production incidentConsultants selling AI agent work who need defensible quality
Built withpi-agentClaude CodeCursorClineMarkdown

Why this playbook works

Three things that make this different from a wall of prompts.

7 layers, one pack

Orchestration, tool design, state, error recovery, observability, stopping, anti-patterns. Skip one and the agent breaks. The pack teaches all 7.

Prevents the $400 bill

The runaway loop anti-pattern (AP-01) caught every AI builder. The pack teaches the cost caps, loop detection, and confirmation gates that stop it before users get charged.

Discipline in code, not prompts

Every 'be efficient' / 'stop when done' / 'be safe' instruction in a prompt is a bug. The pack teaches the code-level patterns that actually enforce the discipline.

Quick start

Drop the package into your project and start using the commands.

terminal
$tar -xzf agent-reliability-playbook-0.1.0.tgz && cd agent-reliability-playbook-0.1.0
$# Pick your agent host
$ls adapters/
$# pi-agent (recommended): cp -r skills/* ~/.pi/agent/skills/
$# Claude Code: cp -r adapters/claude-code/commands/* .claude/commands/
$# See INSTALL.md for Cursor / Cline / Aider

What's in the box

  • 7 skills
    one per reliability layer
  • 5 tool adapters
    pi-agent, Claude Code, Cursor, Cline, generic
  • 2 worked examples
    tool rewrite + runaway loop fix
  • Pre-launch checklist
    12 items
  • Anti-patterns catalog
    15 failure modes
  • Cost math per model tier
    know your bounds
  • Routing table
    which skill to load when
  • Decision trees
    workflow vs. agent vs. hybrid

Everything in the pack

What you get the moment your payment clears.

agent-reliability skill — master orchestrator + 7-layer reliability stack + pre-launch checklist
tool-design skill — 8 rules for the agent-computer interface (Anthropic's ACI discipline)
agent-state skill — context budget, message trim, checkpoint/restore
error-recovery skill — retry strategies, structured errors, idempotency keys
agent-observability skill — structured logging, traces, replay, vendor comparison
stopping-conditions skill — 8 hard caps + loop detection + confirmation gates
anti-patterns skill — catalog of 15 failure modes with symptoms, cause, fix, detection
5 tool adapters — pi-agent, Claude Code, Cursor, Cline, generic
2 worked examples — tool rewrite (40%→4% wrong calls), runaway loop fix ($44→$0.35)
Pre-launch checklist — 12 items, all checked
Cost math per model tier — know your bounds before shipping
Routing table — agent loads the right specialist skill for the right problem

Adapters included

These skills were authored for pi-agent, but we include drop-in adapters for the major AI coding tools.

ToolAdapter locationWhat you get
pi-agentadapters/pi-agent/SKILL.md drop-in
Claude Codeadapters/claude-code/.claude/commands/*.md + CLAUDE.md fragments
Cursoradapters/cursor/.cursorrules rule sets
Cline / Continueadapters/cline/System-prompt rules
Aider / genericadapters/generic/INSTRUCTIONS.md snippets

Same playbook, different packaging. The adapters translate the methodology into the format each tool expects. Install once, swap agents without re-learning the method.

Full documentation

Everything in the package, every prop, every pattern.

Agent Reliability Playbook

The 7-layer reliability stack for shipping AI agents that work in production.

Built and battle-tested. 7 skills covering orchestration, tool design, state management, error recovery, observability, stopping conditions, and the catalog of 15 anti-patterns. Adapters for pi-agent, Claude Code, Cursor, Cline, and any tool that reads a system-prompt file.

What's Inside

SkillPurpose
agent-reliabilityMaster orchestrator — the 7-layer reliability stack, pre-launch checklist, routing to specialists
tool-designThe agent-computer interface discipline — schemas, descriptions, parameter naming
agent-stateState management — context window budget, message trim, checkpoint/restore
error-recoveryError handling — retry strategies, structured errors, idempotency keys
agent-observabilityObservability — structured logging, traces, replay, vendors
stopping-conditionsThe 8 hard caps — when to halt a run (cost, time, loops, side effects)
anti-patternsThe catalog of 15 failure modes — symptoms, root cause, fix, detection

Quick Start

# 1. Extract
tar -xzf agent-reliability-playbook-0.1.0.tgz
cd agent-reliability-playbook-0.1.0

# 2. Pick your agent host
ls adapters/

# pi-agent (recommended)
mkdir -p ~/.pi/agent/skills
cp -r skills/* ~/.pi/agent/skills/
# /reload in pi to pick them up

# Claude Code
mkdir -p .claude/commands
cp -r adapters/claude-code/commands/* .claude/commands/
cat adapters/claude-code/CLAUDE.md >> CLAUDE.md

# Cursor / Cline / Aider
# See INSTALL.md for per-tool setup

The Core Idea

The single sentence that ties this whole pack together:

A reliable agent has 7 layers. Skip one and it breaks in production.

#LayerFailure mode it addresses
1Orchestration"Workflow built as agent" — wasted cost, slow
2Tool design"Model calls the wrong tool" — vague interface
3Agent state"Model forgets the goal after 20 turns"
4Error recovery"Single 500 takes down the whole agent"
5Observability"I can't reproduce the bug"
6Stopping conditions"Agent burns $500 in a loop"
7Anti-patterns"We made the same mistake 5 times"

The Pre-Launch Checklist

Before shipping any agent to real users, walk this list. Bold items are non-negotiable.

  • Orchestration chosen deliberately — workflow vs. agent vs. hybrid
  • Tool definitions have descriptions the model can read — what/when/when-not/examples
  • Tool calls validated before execution — schema, permissions, rate limits
  • State management strategy defined — in-context, working, persistent
  • Error recovery policy for every tool call — retry, fallback, escalate
  • Observability is logging — LLM calls, tool calls, state changes
  • Stopping conditions in code — MAX_ITERATIONS, MAX_COST_USD, MAX_DURATION_MS
  • Eval set covers happy path + 3 adversarial cases
  • Cost estimate per session — token cost × expected sessions
  • Latency budget per turn — p50 and p95 targets
  • Rollback plan — what to do if the agent misbehaves in prod
  • Sample of 5 prod transcripts reviewed end-to-end

The Architectures

Workflow = orchestrated via code paths. The LLM is called from specific places. The control flow is yours.

  • ✅ Predictable, testable, deterministic, cheaper
  • ❌ Rigid — can't handle novel inputs
  • Use for: customer support routing, structured data extraction, multi-step forms

Agent = LLM-driven process. The model decides what to do next.

  • ✅ Flexible, natural for tool-using tasks
  • ❌ Unpredictable, expensive, hard to debug
  • Use for: research tasks, open-ended exploration, non-deterministic steps

Hybrid = workflow at the outer layer, agent at the inner layer.

  • ✅ Best of both
  • ❌ More design work upfront
  • Default for production

Cost Discipline (Real Numbers)

ModelPer 20 iterations
Small LLM (Haiku, GPT-4o-mini)~$0.30
Medium LLM (Sonnet, GPT-4o)~$1.50
Max-thinking LLM (Opus w/ tools)~$12.00

A loop with no cost cap on a max-thinking model = $12+/session. Cost caps are not optional. They live in code.

Adapters Included

Works in every major AI coding tool:

ToolAdapter locationWhat you get
pi-agentadapters/pi-agent/SKILL.md drop-in
Claude Codeadapters/claude-code/.claude/commands/*.md + CLAUDE.md fragments
Cursoradapters/cursor/.cursorrules rule sets
Cline / Continueadapters/cline/System-prompt rules
Aider / genericadapters/generic/INSTRUCTIONS.md snippets

Updates

Free for life. Re-download for new anti-patterns, new vendor patterns, new LLM tier cost data.

What This Isn't

  • Not a framework — works with LangChain, LangGraph, CrewAI, raw OpenAI SDK, anything
  • Not prompt-only — the patterns live in code, not in the system prompt
  • Not academic — every pattern comes from a real production failure

What's in the download

agent-reliability-playbook-0.1.0/
├── README.md              ← setup guide
├── OVERVIEW.md            ← positioning
├── METHODOLOGY.md         ← the longer write-up
├── INSTALL.md             ← per-tool setup walkthrough
├── LICENSE.md
├── package.json
├── skills/                ← 7 SKILL.md files (one per layer)
│   ├── agent-reliability/
│   ├── tool-design/
│   ├── agent-state/
│   ├── error-recovery/
│   ├── agent-observability/
│   ├── stopping-conditions/
│   └── anti-patterns/
├── adapters/              ← drop-in for AI coders
│   ├── pi-agent/
│   ├── claude-code/
│   ├── cursor/
│   ├── cline/
│   └── generic/
├── examples/              ← 2 real worked examples (tool rewrite, runaway loop)
└── docs/                  ← diagrams + decision trees

Common questions

Things people ask before buying.

Is this just prompt engineering with extra steps?

No. The pack teaches the discipline of putting it in code, not the prompt. MAX_ITERATIONS in code, not 'be efficient'. Confirmation gates in code, not 'ask before sending'. Idempotency keys in code, not 'be careful with retries'. The patterns are about what your agent code does, not what your agent prompt says.

Does it work with my framework? (LangChain / LangGraph / CrewAI / raw OpenAI SDK)

Yes. The pack is methodology, not framework code. It works with LangChain, LangGraph, CrewAI, Vellum, raw OpenAI SDK, or anything else. The skills are pure markdown — they teach patterns you apply to whatever you're building on.

What's the difference vs. LangSmith / Langfuse / Helicone?

Those are observability tools — they help you see what's happening. This pack is the methodology — what to log, what to do when errors happen, when to stop. You can use the pack + an observability vendor together. The pack tells you what to instrument; the vendor helps you view it.

Will this prevent all my agent bugs?

No. The 7 layers address the most common, expensive, familiar failure modes. They don't address novel bugs, model-specific quirks, or genuinely new patterns. The pack is discipline, not magic. But it catches 80%+ of the bugs that hit production agents.

I'm building a single-prompt LLM feature, not an agent. Do I need this?

Probably not. The 7 layers are for agents (multi-step, tool-using, stateful). Single-prompt features have their own discipline (prompt engineering, eval, cost control), which is a different skill set. The pack is honest about this — if you don't have tools or state, you don't need the 7 layers.

£45 — lifetime

One purchase. Yours forever.

Pay once via Stripe. Get the complete package instantly. Free updates for the same major version. Commercial license included.

Secure payment via Stripe · Instant download · 30-day money-back if it doesn't save you time