Examples overview
Three runnable reference integrations live in the examples/ directory at the monorepo root. Each one is a real project with a README.md, an .env.example, and a smoke-test target - no pseudocode, no “imagine if this worked” snippets.
| Example | Language | SDK | What it shows |
|---|---|---|---|
python-billing-agent | Python 3.10+ | platools (PyPI) | Pydantic-typed billing tools, FastAPI host process, platools doctor + platools test in CI. |
typescript-support-agent | Node 20+ | @platools/sdk (npm) | Zod-typed support tools, bare Node host process, platools doctor gate. |
local-dev-loop | Python 3.10+ | platools + platools serve | Runs the billing tools locally via platools serve --stdio for Claude Desktop / Cursor. |
flight-checkin | Python 3.10+ | platools (editable) | Realistic multi-step mutation flow with consent-gated confirm_check_in + select_seat. |
How to run them
Every example ships with a README.md that includes the exact commands. The short version is always:
cd examples/<example-name>cp .env.example .env # fill in any blanks# Pythonuv sync # or: pip install -e .uv run python -m app.main# Nodepnpm installpnpm startConventions
- Never commit real API keys. Every example ships an
.env.examplewith placeholder values and a.gitignorethat excludes the real.env. The SDK readsPLATOS_URLandPLATOS_SECRETfrom the environment - keep them there. - Every example has a
README.md. It explains what the example does, how to run it, and what to look for. - Every example passes
platools doctor. The CI target for each example runs doctor before anything else; a broken example is a bug. - Every example is small enough to read in one sitting. If a sample has to be big, it’s not a sample - it’s a product.
Workspace wiring
Both Python examples use uv so they can resolve the in-monorepo platools source via a path dependency. The TypeScript example uses pnpm workspaces and references @platools/sdk via workspace:*. See each README for the exact snippet.
The root pnpm-workspace.yaml includes the examples/* glob so every example is built as part of pnpm -r typecheck. A breaking change to @platools/sdk surfaces as a type error in every example on the same CI run.
All example source code lives in the examples/ directory at the monorepo root.