What are Pi extensions?
Aether runs on the Pi agent framework (@earendil-works/pi-agent-core, @earendil-works/pi-coding-agent). Pi extensions are standard Pi framework extensions that gain full access to the agent loop running inside Aether. Because they execute in the Node.js bridge process, they have access to the full Node.js runtime and the Pi framework’s tool-calling and command dispatch infrastructure.
Declaring a Pi extension
Add api.extensions array to your package.json pointing at one or more entry files:
package.json
The Pi extension factory
The entry file must export a default function that the Pi framework calls with anExtensionAPI instance:
agent.ts
async. Use the pi parameter to register everything your extension provides.
Pi vs Aether extensions
A single package can contain both a Pi extension and an Aether Script Mod. They serve different roles:| Pi extension | Aether Script Mod | |
|---|---|---|
| Runtime | Node.js bridge process | Android app process (JS bridge) |
| Primary role | Agent tools, commands, agent loop hooks | Android UI surfaces, component replacement, host API access |
| Entry export | Default export (activate) | Named export (activateAether or aether) |
| Reload | Hot-reloads with Script Mods | Hot-reloads |
activateAether. See Tools & Commands for a combined example.
The Pi framework API (
ExtensionAPI) is defined by the
@earendil-works/pi-coding-agent package. Refer to the Pi framework
documentation for the full API surface including session hooks, streaming, and
advanced tool options.