Pi Mono: The Complete Guide to the Modular AI Agent Toolkit
Pi Mono is a modular AI agent toolkit — coding agent CLI, unified LLM API, TUI & web UI libraries, Slack bot, and vLLM pods as composable packages in a monorepo. By Mario Zechner (creator of libGDX). 21,500+ stars, TypeScript, MIT.
What Is Pi Mono?
A monorepo containing 7 composable packages that together form a complete AI agent infrastructure. Each package can be used independently or combined — from a unified LLM API layer to a full coding agent CLI with TUI, web UI, Slack bot, and self-hosted vLLM inference.
- Language: TypeScript
- License: MIT
- Stars: 21,500+ ⭐
- Forks: 2,272
- Releases: 169
- Contributors: 141
- Author: Mario Zechner (badlogic, creator of libGDX)
Packages
| Package | Purpose |
|---|---|
| @mariozechner/pi-ai | Unified LLM API — single interface to multiple LLM providers |
| @mariozechner/pi-agent-core | Agent Core — foundational agent primitives, tools, and execution |
| @mariozechner/pi-coding-agent | Coding Agent CLI — full-featured terminal coding agent |
| @mariozechner/pi-mom | Slack Bot — "Mom" — AI assistant deployed as Slack bot |
| @mariozechner/pi-tui | TUI Library — terminal user interface components for agents |
| @mariozechner/pi-web-ui | Web UI Library — browser-based UI components for agents |
| @mariozechner/pi-pods | vLLM Pods — self-hosted LLM inference with vLLM |
Architecture
┌─────────────────────────────────┐
│ Applications │
│ ┌──────┐ ┌──────┐ ┌───────┐ │
│ │ CLI │ │ Slack│ │ Web │ │
│ │Agent │ │ Bot │ │ App │ │
│ └──┬───┘ └──┬───┘ └──┬────┘ │
├─────┼─────────┼─────────┼──────┤
│ │ UI Libraries │ │
│ ┌──┴───┐ ┌────┴───┐ │
│ │ TUI │ │ Web UI │ │
│ └──┬───┘ └────┬───┘ │
├─────┼───────────────────┼──────┤
│ └────────┬──────────┘ │
│ ┌────┴─────┐ │
│ │Agent Core│ │
│ └────┬─────┘ │
│ ┌────┴─────┐ │
│ │ Pi AI │ (Unified) │
│ └────┬─────┘ │
├──────────────┼─────────────────┤
│ ┌────┴─────┐ │
│ │vLLM Pods │ (Infra) │
│ └──────────┘ │
└─────────────────────────────────┘
Layer 1: Pi AI (Unified LLM API)
Single interface to multiple LLM providers. Swap models without changing application code.
Layer 2: Agent Core
Agent primitives, tool definitions, execution engine, and context management.
Layer 3: UI Libraries
- TUI — Rich terminal interfaces for interactive agent sessions
- Web UI — Browser-based UI components with the same agent capabilities
Layer 4: Applications
- Coding Agent CLI — Full coding agent in the terminal
- Mom (Slack Bot) — AI assistant deployed to Slack
- Custom Apps — Build your own using any combination of packages
Layer 5: Infrastructure
- vLLM Pods — Self-hosted inference pods for running LLMs locally
Pi Mono vs Alternatives
Category: This is a modular AI agent toolkit / monorepo.
| Feature | Pi Mono | Vercel AI SDK | LangChain.js |
|---|---|---|---|
| Focus | Modular agent toolkit | AI SDK for web apps | LLM framework |
| Stars | 21.5K ⭐ | ~17K ⭐ | ~15K ⭐ |
| Coding Agent CLI | ✅ | ❌ | ❌ |
| Unified LLM API | ✅ pi-ai | ✅ | ✅ |
| Agent Core | ✅ pi-agent-core | ✅ | ✅ |
| TUI Library | ✅ pi-tui | ❌ | ❌ |
| Web UI Library | ✅ pi-web-ui | ✅ | ❌ |
| Slack Bot | ✅ pi-mom | ❌ | ❌ |
| vLLM Pods | ✅ Self-hosted inference | ❌ | ❌ |
| Monorepo Architecture | ✅ Composable packages | Single package | Multiple packages |
| Contributors | 141 | ~200 | ~500 |
| Language | TypeScript | TypeScript | TypeScript |
| License | MIT | Apache-2.0 | MIT |
When to choose Pi Mono: You want a composable, batteries-included AI agent toolkit — from unified LLM API through coding agent CLI, with TUI, web UI, Slack bot, and self-hosted inference all as mix-and-match packages.
When to choose Vercel AI SDK: You're building Next.js/React AI applications and want tight Vercel ecosystem integration.
When to choose LangChain.js: You need a broad LLM framework with extensive integrations and chain-of-thought abstractions.
Conclusion
Pi Mono takes a uniquely modular approach to AI agent infrastructure. Instead of a monolithic framework, it provides 7 composable packages — from unified LLM API to coding agent CLI to self-hosted vLLM pods. With 21.5K stars, 141 contributors, and 169 releases, it's a mature, well-maintained toolkit from the creator of libGDX. The monorepo architecture means you pick exactly the pieces you need.
