pai
    Preparing search index...

    pai

    pai runs on your machine and manages a Phantom AI key. Your agent can give each subagent a child key with its own spending limit, lifetime and rate cap. pai also sets plans and model routing, buys credit from an agent wallet, and checks which model answered a call. It runs as a CLI, as an MCP server (pai mcp), and through a skill for pi, Claude Code, Codex and Cursor.

    npm i -g @connortessaro/pai
    pai login # paste your key
    pai balance

    How pai behaves, one topic each:

    • Interface reference: every command and the flags it reads, every MCP tool with its inputs, every call pai makes to Phantom AI, and every environment variable. Generated from the code.
    • Code reference: every function, type and constant src/pai.mts exports, in the sidebar and the index below. The CLI starts at run and the MCP server at createMcpServer.

    Source, issues and releases: github.com/connortessaro/pai.