The Storybook for AI Agents - Build, test, and showcase your pydantic-ai agents in an interactive playground.
Building AI agents is hard. Testing them is even harder.
When developing UI components, tools like Storybook revolutionized the workflow by providing an isolated environment to build, test, and showcase components. Agent Playbook brings this same philosophy to AI agent development.
- Slow iteration cycles - Running agents in full applications slows down development
- Hard to debug - Understanding agent behavior, tool calls, and decision-making is opaque
- Difficult to demonstrate - Showing agent capabilities to stakeholders requires complex setups
- No organized testing - Agents scattered across codebases without a unified testing environment
Agent Playbook automatically discovers your pydantic-ai agents, loads them into an interactive web playground, and lets you test, debug, and showcase them in real-time with full visibility into their thinking process and tool executions.
- 🔍 Auto-Discovery - Automatically finds and loads agents from your codebase
- 🎮 Interactive Playground - Beautiful web UI for testing agents in real-time
- 🔄 Streaming Support - Watch agent responses, thinking, and tool calls as they happen
- 🧩 Scenario Configuration - Test agents with different configurations
- 🛠️ Tool Visualization - See exactly what tools agents call with arguments and results
(The CLI command is playbook, not agent-playbook)
Step 1: Define your agent (support_agent.py)
Step 2: Export scenarios (support_agent__scenarios.py)
Agent Playbook auto-discovers modules ending with __scenarios and registers the agents. Use the export() function to define different configurations:
Start the server and open http://localhost:8765:
Contributions are welcome! Fork the repository, create a feature branch, and submit a Pull Request.
Licensed under AGPL-3.0. See LICENSE for details.
.png)



