Agent scaffold · built on the pi-agent SDK

π-starter

Clone it and it runs. Add tools, extensions, skills, knowledge, or a new persona — and it becomes a vertical agent.

What it solves

A runnable skeleton, not a demo

The SDK's createAgentSession is wrapped once into buildAgent(); HTTP+SSE, WebSocket, an in-process CLI and the official RPC stdio transport all sit behind that single core.

Vertical by injection, not by fork

Business logic enters through extraTools, extraSkillPaths, extraKnowledgeDirs, extraExtensions. User-level ~/.pi scanning stays off, so nothing leaks into a deployed agent.

Safety is a first-class axis

Three built-in-tool tiers, a fail-closed path guard, read-only SQL, and an approval gate whose deny rules cannot be overridden and whose timeout closes the turn.

Architecture

TRANSPORTS — ONE CORE BEHIND ALL OF THEM CLI HTTP + SSE WebSocket Library RPC stdio ASSEMBLY buildAgent() — one assembly core, one conversation INJECTABLE RESOURCES model prompts tools skills knowledge memory database extensions AgentSession — @earendil-works/pi-coding-agent snapshot protocol with a rev chain — web/ React UI speaks the same frames
Simplified from docs/architecture.svg, which is generated from source; the full page keeps every layer and count.

Tech stack

What stands out

By the numbers

505test cases, offline, no real model call
47HTTP route handlers
84backend source files
9gates in npm run verify

Quickstart

npm install
cp .env.example .env      # fill PI_API_KEY / PI_MODEL
npm run setup && npm run dev      # CLI — or npm run web for HTTP + SSE + the built UI
MIT License © 2026 LPK3215 · github.com/LPK3215/pi-starter Full overview: docs/project_overview/index.html
Open full overview loading html2canvas…