Skip to content

Pi ​

Pi is one of Z.E.N.'s three built-in providers, alongside Claude and Codex. You can use Pi to run any node, set it as your workflow default, or mix it into a workflow that uses different providers per step.

Use Pi for a single node ​

yaml
nodes:
  - id: summarize
    provider: pi
    model: pi-default
    prompt: |
      Summarize the morning Slack into a five-bullet brief.

The provider: pi field tells Z.E.N. which provider to call for this node. Everything else (variables, dependencies, output capture) works the same as any other prompt node.

Use Pi as your default ​

In ~/.zen/config.yaml:

yaml
assistants:
  default: pi
  pi:
    model: pi-default

Every node that doesn't override provider: will use Pi. Override on the nodes where you specifically want Claude or Codex.

Configuration ​

Pi uses Pi's SDK in-process. It does not launch the Pi TUI. The workflow working directory is passed to Pi as cwd, so project-local Pi resources are resolved from that directory.

Basic global setup:

yaml
assistants:
  default: pi
  pi:
    model: google/gemini-2.5-pro

Project or instance-scoped Pi setup:

yaml
assistants:
  pi:
    model: zai/glm-5-turbo
    agentDir: /Volumes/4/data-mom/.pi-agent
    authPath: ~/.pi/agent/auth.json
    modelsJsonPath: /Volumes/4/data-mom/.pi-agent/models.json

agentDir, authPath, and modelsJsonPath can point at the same Pi setup or be split. When authPath is omitted and agentDir is set, Z.E.N. uses <agentDir>/auth.json. When modelsJsonPath is omitted and agentDir is set, Z.E.N. uses <agentDir>/models.json.

Custom providers belong in Pi's models.json. Z.E.N. passes that registry to Pi and lets Pi resolve provider auth, headers, local provider settings, and keyless provider behavior.

Extensions ​

Pi extensions run in-process with Z.E.N.'s server permissions, so only load extensions you trust.

yaml
assistants:
  pi:
    model: google/gemini-2.5-pro
    extensionMode: explicit
    extensionPaths:
      - /Volumes/4/data-mom/.pi-agent/extensions/my-extension
    interactive: true
    extensionFlags:
      plan: true

extensionMode controls discovery:

  • none: load no Pi extensions.
  • explicit: load only extensionPaths.
  • default: request normal Pi discovery from the configured agentDir and the workflow cwd, plus any extensionPaths.

enableExtensions remains supported as a compatibility alias. enableExtensions: true maps to extensionMode: default; enableExtensions: false maps to extensionMode: none.

Normal Pi discovery can include project-local .pi extension code. To keep server-side runs deterministic across old and new Pi SDKs, Z.E.N. only opens normal discovery when trustProjectExtensions: true is set. Without that trust flag, extensionMode: default loads only explicit extensionPaths. extensionMode: explicit is the safest option for repeatable workflows.

What you can do with Pi ​

Anything you'd do with Claude or Codex. Run a single node with Pi as the provider, set it as your default, or mix it across a workflow when one step is better suited to Pi than the others. The provider sits behind the same node interface as the rest.

AI that follows a recipe, not a conversation.