PAI Knowledge OS

Measured, not claimed. The design choices in PAI come out of a series of lab reports, published with DOIs:
PAI Reports (doi:10.5281/zenodo.24274093).
The latest, Planner and Worker (doi:10.5281/zenodo.24274754), shows when a cloud
planner over a local coder pays off: a local model alone handles small changes for free; on larger multi-file work a
Sonnet planner over a local worker matches Sonnet alone at about a third less cloud cost. That is what
pai worker mode speed|balanced|budget switches between.
Local AI used to be hard. Now it is a button.
I have spent a long time on local AI. Getting a strong model to run on my own machine was the easy part; making it actually useful was not. Which server, which quantization, which port, how to keep it alive, how to send it only the work it can do, and how to fall back to the cloud when it cannot. Every piece worked on its own and none of them worked together.
PAI is what came out of that, and I am giving it to the community. A MacBook can already run a serious model: on mine, Strata serves Qwen3.8-Flash-Next in its Gyro-L quantization, and PAI turns that into a worker like any other. Start it from the cockpit, and PAI routes worker jobs to it automatically, shows its speed and cache live, and hands a job to the cloud only when it needs a wider context or deeper reasoning than the local model has. You stop thinking about local AI. It just takes its share of the work.
An AI chat is one vendor, one model, one budget and no memory. PAI turns it into a team: it remembers, it routes every job to the right model, cloud or local, and it shows you all of it live.
You burn your premium tokens on work a local model could do. You hit the weekly limit on a Tuesday. Every new session starts from zero. PAI fixes all three:
- Not bound to Anthropic. Claude Code is only the front end you type into; the model behind it is your choice. Run a whole session on GLM, Kimi, any other provider you add, or a model on your own machine, with no Anthropic model involved at all. Or mix them: switch on the fly with
/model, in the middle of a session, without losing your place.
- Model routing, cloud and local. When one provider's budget runs out, the next one takes over by itself, and every request is accounted per provider and per session.
- A hierarchy that spends tokens where they matter. Three tiers:
t0 the session you talk to, t1 the orchestrator that plans and reviews, t2 the workers that implement. Workers go local first, because local tokens are free. Cloud comes first only where it earns its price: wide context and real reasoning. And all of it is yours to set: each tier is an ordered list of models, the first available one serves, and you change the order as your default (pai worker route set t2 local,glm/glm-5.3-flash, or from the cockpit) or just for one session (--session <name>), without touching the others. Every worker runs in its own visible pane and git worktree; you review the diff, PAI merges it.
- The machine stays yours. Need all your CPU and GPU for a while?
pai freeze (or "freeze the workers" in any session) suspends every running worker and the local model where they are, without killing anything; pai thaw continues them exactly where they were, and nothing counts as failed.
- A live cockpit. One page shows your token budget per provider, cache hits, every model and local server with start and stop buttons, running workers, routing per tier, and memory and embedding progress. Drag the cards into the layout you want.
- A menu bar app. A native macOS app (
apps/menubar) shows limits, system graphs, local model speed and the job queue from the router, with pause, stop and freeze buttons.
- Memory underneath it all. Every session writes its own notes in the background, searchable across sessions, projects and your notes vault, by keyword, meaning or both. Everything stays on your machine.
What's inside