Manage coding agent sessions directly in your browser
Imagine stepping away from the terminal to browse coding agent conversation logs in a browser tab and fork new sessions from specific points to continue execution. Pi Web is a tool that reads the local configuration and session files used by the pi coding agent and displays them through a web interface. Installation is simple, and it is fully compatible with existing pi environments, so no data migration is required.
Session Forking and File Management
Pi Web provides a conversation list grouped by project, allowing you to view each session's execution status, context usage, cost, and compression details at a glance. Selecting 'Edit here' at a specific point in a conversation creates a branch within the current session, while creating a 'New session' generates an independent session file from previous messages. This forking feature is useful for conducting experimental coding without affecting the original session. It also provides file upload, Git diff inspection, and source code and document preview features, enabling code review and file management within the browser.
Model Configuration and Remote Access Management
A web-based configuration panel allows you to manage provider logins, API keys, models, plugins, and skills without entering terminal commands. By default, it listens only on localhost (127.0.0.1), which enhances security. If you need to access it via LAN or the internet, it is recommended to set a long random password and use an HTTPS reverse proxy or VPN. Exposing it to the internet over plain HTTP is prohibited because this only authenticates the connection without encrypting it. It also supports standard HTTP proxy environment variables to handle model API requests in corporate network environments.
Execution Environment and Data Boundaries
Pi Web requires Node.js 22.19.0 or higher and can be run immediately with the npx @agegr/pi-web@latest command. Agent data is read from the ~/.pi/agent directory by default, and session files are stored under this path. The file browser is restricted to the working directory and project root path selected in Pi Web, so it is not a general file explorer. This is an important security boundary, and it must run in the same file system environment as the pi agent to share existing sessions. It also provides hooks that allow Electron wrappers or other integrated apps to extend the session context menu through browser events.
Pre-Usage Checks
This tool is suitable for developers who already use the pi coding agent or manage agent sessions locally. It is particularly well-suited for users who prefer a browser-based UI but want to maintain local data privacy. Before use, you must verify that your Node.js version is 22.19.0 or higher and that you have read permissions for the pi agent data directory. If you plan to access it remotely, you must configure both HTTPS and password authentication, and avoid exposing it over plain HTTP. It is distributed under the MIT license and can be used freely.