zerohead
Get started

Agents

Pi

Run Pi as a zerohead agent that signs in with API keys, though it has not yet run for real.

The source is not public yet. It will be published under MIT. The pages under Contributing describe working on it once it is.

The Pi adapter starts the Pi command-line tool once for each run.

Pi has never run for real through zerohead. The adapter was written from Pi's help text and documentation.

What you install and how it signs in

Install Pi yourself. zerohead never reads, copies or writes your own Pi folder, so a run cannot sign you out of Pi. Pi agents sign in only through a provider's API key, which you put in the agent's Environment setting, for example OPENAI_API_KEY. With no key, Pi's own error ends the run as Failed.

Settings

Choose Pi as the Adapter.

SettingWhat it does
CommandA program name or path to run instead of pi.
ProviderFor example openai. Needs a Model as well.
ModelPi's model, in provider/id form or with a provider chosen above.
Thinking leveloff, minimal, low, medium, high, xhigh or max.
Tools allowedA comma-separated list of the only tools Pi may use.
Tools blockedA comma-separated list of tools Pi may not use.
Session folderWhere Pi writes its session file.
EnvironmentAPI keys and other variables. Values are kept private.

How it runs

zerohead runs pi --mode json with a private per-run agent folder, and the prompt after --. Standard input is closed. Pi can exit with 0 after a failed or aborted answer, so zerohead calls a run successful only when Pi reports that it settled without being aborted and without an unresolved error.

How zerohead's tools reach it

Each run gets its own agent folder that holds only an mcp.json for the zerohead tool server. The token goes in ZEROHEAD_MCP_TOKEN. The folder is deleted when the run ends. If a run has no tool endpoint, zerohead tells Pi to use no MCP servers.

What it can do without asking

Pi has no sandbox flag. From its documentation, which has not been checked by a run, Pi does not ask for approval before each tool call, and enabled tools have the permissions of the Pi process. Use Tools allowed and Tools blocked to limit it. For example, read,grep,find,ls makes a read-only agent.

Sessions

Each run starts fresh. Because the agent folder is deleted, a Pi run cannot be resumed.

zeroheadHomeMIT license