01 - Hello Agent
Create a minimal agent — one prompt, one response, exit.
A progressive tutorial for building AI agents with pi-coding-agent.
Create a minimal agent — one prompt, one response, exit.
Real-time typewriter-style output with event subscriptions.
Define your own tools with TypeBox parameter schemas.
Save and resume conversations using JSONL session files.
Block tool execution until the user explicitly confirms.
Control agent behavior with system prompts and skill files.
Manage multiple conversation sessions — list, create, switch.
The grand finale — a complete, production-quality CLI agent.
How pi-coding-agent stacks up against other popular AI agent frameworks.
| Feature | pi-coding-agent | Vercel AI SDK | LangChain | CrewAI | OpenAI Agents SDK | Mastra |
|---|---|---|---|---|---|---|
| TypeScript-first | ✅ | ✅ | 🟡 | — | ✅ | ✅ |
| Streaming Events | ✅ | ✅ | ✅ | — | ✅ | ✅ |
| Tool / Function Call | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Session Persistence | ✅ | — | ✅ | — | — | — |
| Multi-Provider | ✅ | ✅ | ✅ | ✅ | — | ✅ |
| Built-in Coding Tools | ✅ | — | — | — | — | — |
| Skill / Plugin System | ✅ | — | ✅ | ✅ | — | ✅ |
| Human-in-the-Loop | ✅ | — | ✅ | ✅ | ✅ | — |
| Multi-Agent | — | — | ✅ | ✅ | ✅ | ✅ |
| GUI / Studio | — | — | ✅ | ✅ | — | — |
✅ Supported 🟡 Partial — Not built-in
Each chapter progressively introduces new patterns. Chapter 08 combines them all.
| Concept | Ch01 | Ch02 | Ch03 | Ch04 | Ch05 | Ch06 | Ch07 | Ch08 |
|---|---|---|---|---|---|---|---|---|
createAgentSession | ● | ● | ● | ● | ● | ● | ● | ● |
Streaming / Events | · | ● | ● | · | · | ● | · | ● |
Custom Tools | · | · | ● | · | ● | ● | · | ● |
Session Persistence | · | · | · | ● | · | · | ● | ● |
Confirmation Pattern | · | · | · | · | ● | · | · | ● |
System Prompt | · | · | · | · | · | ● | · | ● |
Skills Loading | · | · | · | · | · | ● | · | ● |
Multi-Session | · | · | · | · | · | · | ● | ● |
Coding Tools | · | · | · | · | · | · | · | ● |
Abort / DeltaBatcher | · | · | · | · | · | · | · | ● |
The tools and libraries used throughout this tutorial.