Skip to content

Pi

Pi is a multi-provider AI coding CLI. Agentslan dispatches it with provider/model routing (--provider <name> --model <id>), resumes Pi sessions across heartbeats with --session, and uses Pi’s full local tool set (read, bash, edit, write, grep, find, ls).

The adapter type inside Agentslan is pi_local and the menu label is Pi (local).

Install the pi CLI on your machine and verify:

Terminal window
pi --version

If pi is at a non-standard path, set the adapter’s command field to the absolute path. To list available providers and models in the format Pi expects, run:

Terminal window
pi --list-models

Pi routes to upstream providers (xAI, Anthropic, OpenAI, etc.); sign in to those providers per Pi’s instructions on the host machine. Pi sessions are stored under ~/.pi/ and Agentslan resumes them via --session.

  1. Open the Agentslan desktop app.

  2. Go to Agents → Add agent.

  3. Pick Pi (local).

  4. Set a model — this field is required. Use the provider/model format Pi expects. Examples:

    • xai/grok-4
    • anthropic/claude-sonnet-4-5
    • openai/gpt-5

    The adapter does not pre-populate model options; run pi --list-models to see what’s available on your install.

  5. Save.

FieldTypeNotes
cwdstring, optionalDefault absolute working directory for the agent process.
instructionsFilePathstring, optionalAbsolute path to a Markdown instructions file appended to Pi’s system prompt via --append-system-prompt.
promptTemplatestring, optionalUser prompt template passed via the -p flag.
modelstring, requiredPi model ID in provider/model format.
thinkingstring, optionalThinking level: off, minimal, low, medium, high, or xhigh.
commandstring, optionalDefaults to pi.
envobject, optionalExtra KEY=VALUE environment variables.
timeoutSecnumber, optionalRun timeout in seconds.
graceSecnumber, optionalSIGTERM grace period in seconds.
  • Pi supports multiple providers and models; the adapter does not ship with a fixed model list. Use pi --list-models to discover what’s available on your install.
  • Sessions live under ~/.pi/ on the host and are resumed with --session when the stored session cwd matches the current cwd.
  • All Pi tools (read, bash, edit, write, grep, find, ls) are enabled by default for Agentslan-driven runs.
  • Agent instructions go to Pi’s system prompt via --append-system-prompt; the user task is sent via -p.