pi-mono: Building a Universal AI Agent Toolkit with CLI, TUI, and vLLM Pods for Local Development

July 13, 2026 TormentNexus developer-tools
pi-mono: AI Agent Toolkit for Developers

🤖 pi-mono

A unified AI agent toolkit for building, deploying, and interacting with LLM-powered agents in production.

pi-mono (github.com/robertpelloni/pi-mono) is an open-source agent toolkit that consolidates the full agent development lifecycle into a single, coherent system. Designed for developers building AI tools, it provides a coding agent CLI, a unified LLM API, a TUI library, a web UI library, a Slack bot, and vLLM pod orchestration — all working together out of the box.

Architecture Overview

pi-mono is organized around a central Agent runtime that can be driven by multiple interfaces. The core components are:

🧠 Coding Agent CLI

Terminal-based agent with multi-turn reasoning, tool execution, code generation, and file system access. Supports streaming output and interactive debugging.

pi-mono run "refactor this module to use async"

🔌 Unified LLM API

Abstraction layer over OpenAI, Anthropic, vLLM, and local models. Automatic fallback, cost tracking, and structured output parsing.

# Single API for any provider
response = await llm.chat(messages, model="auto")

🖥️ TUI Library

Python-native terminal UI components for building agent dashboards, logs viewers, and interactive REPLs. Keyboard-driven, with rich text and real-time updates.

🌐 Web UI Library

FastAPI-based web interface components: chat views, agent state panels, tool call inspectors, and deployment dashboards. Ships with pre-built templates.

💬 Slack Bot

Configurable Slack app that routes messages to agents, supports threaded conversations, slash commands, and file uploads for context sharing.

⚡ vLLM Pods

Built-in orchestrator for spinning up vLLM inference servers. Auto-scaling pool management, model loading, and health checks for self-hosted models.

Key Technical Features

1. Multi-Interface Agent Runtime

All interfaces (CLI, TUI, web, Slack) share the same Agent core. Add custom tools via a simple decorator API:

from pi_mono import tool

@tool(description="Query a PostgreSQL database")
def run_sql(query: str) -> list[dict]:
    # ... execute query
    return results

2. Unified LLM Adapter

The llm module normalizes streaming, token counting, and error handling across providers. Key capabilities:

3. vLLM Pod Management

# Start a vLLM pod with auto-scaling
pi-mono vllm deploy --model meta-llama/Llama-3.1-8B --gpus 2 --port 8000

# List running pods
pi-mono vllm ls

The orchestrator handles GPU allocation, model downloading, and integrates with the unified LLM API — so your agents can seamlessly switch between local vLLM pods and cloud APIs.

4. TUI Framework

Built on urwid with a reactive component model. Supports:

Getting Started

pip install pi-mono

# CLI mode
pi-mono run

# Web UI (FastAPI server)
pi-mono serve

# Slack bot (requires app config)
pi-mono slack start

# Deploy local vLLM
pi-mono vllm deploy --model path/to/model
💡 Developer Note: pi-mono's unified_llm module is importable separately — you can use it to build custom agent frameworks without the full toolkit. All interfaces are optional; plug in only what you need.

Use Cases

Repository Structure

pi-mono/
├── pi_mono/
│   ├── core/          # Agent runtime, tool system, memory
│   ├── llm/           # Unified LLM API + adapters
│   ├── tui/           # Terminal UI components
│   ├── web/           # FastAPI routes, chat templates
│   ├── slack/         # Slack bot handler
│   └── vllm/          # vLLM pod manager & API proxy
├── cli.py
└── pyproject.toml

Why pi-mono?

Most agent tools focus on a single interface (CLI-only or web-only) or lock you into one LLM provider. pi-mono was built by developers who needed a homogeneous toolkit where the same agent code works in the terminal, a web dashboard, and a Slack channel — with the ability to swap between local and cloud models without changing a single line of agent logic.

Built with TormentNexus.