Pi Coding Agent
Agent Console connects to the pi coding agent
through pi-ahp, an open-source AHP host that
embeds pi. It uses your existing pi models, credentials, settings, and session
history; pi and its tools continue to run on the host.
Install pi-ahp
Section titled “Install pi-ahp”pi-ahp requires Node.js and at least one model provider configured for pi.
npm install --global pi-ahpDirect connection
Section titled “Direct connection”Start the host on an address reachable from your iPhone or iPad. For example, on a trusted local network:
pi-ahp --host 0.0.0.0The command prints a WebSocket URL with a generated connection token. Replace
0.0.0.0 in that URL with the machine’s LAN or VPN address, while preserving the
port and token.
In Agent Console:
- Open Add Host.
- Enter a name under Direct Connection.
- Paste the complete WebSocket URL.
- Tap Add.
Keep the token enabled whenever another device can reach the listener. See Connections for network and security guidance.
Cloud tunnel
Section titled “Cloud tunnel”For a machine behind NAT or on changing networks, pi-ahp-tunnel creates or
reuses a Microsoft Dev Tunnel:
devtunnel user login -gpi-ahp-tunnelThe devtunnel CLI must be installed.
Keep pi-ahp-tunnel running while using the app; it owns both the host process
and tunnel connection.
Then, in Agent Console:
- Open Add Host.
- Under Tunnel Connection, choose Microsoft Dev Tunnels.
- Sign in with the same account used by the
devtunnelCLI. - Select the tunnel created by
pi-ahp-tunnel.
The tunnel sign-in only authorizes access to the transport. pi continues to resolve model-provider credentials from its own configuration on the host.
Supported features
Section titled “Supported features”Available features depend on the installed pi-ahp version. See its current
AHP support matrix.