Pi Web
A local browser UI for the pi coding agent that reuses the same config and session files, so you can browse, resume, and branch conversations.
- Source repo
- agegr/pi-web
- Stars
- ★ 8.3k
- Last updated
- 3d ago
- License
- MIT
- Primary language
- TypeScript
- FA score
- 57/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changes
- Cost
- Free software; you pay for model usage
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- You already have pi sessions spread across several projects and want to browse, resume, and tidy them in a browser grouped by project.
- Not a fit if
- Users wanting a general filesystem browser for the whole machine
- Teams exposing it to the internet without their own HTTPS proxy or VPN
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-14latest release v0.17.0 (2026-11-14)+19.0 ★/day over 7 days
- Source review
- 57/100 · Major gaps
What does this agent do, and when should you use it?
Pi Web is a locally hosted browser interface for the pi coding agent. It reads pi's own local configuration and session files, so conversations shown in the browser match what pi has on disk and can be resumed directly. The session workspace groups conversations by project and surfaces running state, context usage, cost, and compaction details, with two ways to branch: a new independent session file or an in-session branch edited from an earlier message. Beyond chat, it bundles project file tools: browse and upload files, inspect Git diffs, preview source, Markdown, images, audio, PDFs, and DOCX, and switch Git worktrees from the sidebar. Model providers, credentials, model tests, plugin packages, and skills are all configurable in the web UI, which ships in English, Simplified Chinese, and Traditional Chinese. It runs as a local Node service bound to 127.0.0.1:30141 by default and starts with a single npx command.
Pi Web runs a Next.js server (app/ holds the UI and API routes) that reads pi's agent directory (default ~/.pi/agent, overridable with PI_CODING_AGENT_DIR) and renders session files stored as sessions/<encoded-cwd>/<timestamp>_<uuid>.jsonl, grouped by project. From there you can resume, rename, export, and delete sessions and inspect running state, context usage, cost, and compaction details; "New session" forks an independent session file from an earlier message, while "Edit from here" creates a branch inside the current session. The file panel browses and uploads files in working directories, shows Git diffs, previews source, Markdown, images, audio, PDFs, and DOCX with automatic refresh, and the sidebar switches between Git worktrees of the same repository. The Models panel reuses pi's model, settings, and credential storage for provider login, API keys, model tests, and plugin/skill management. Server-side model and API requests honor HTTP_PROXY, HTTPS_PROXY, and NO_PROXY; optional PI_WEB_PASSWORD enables browser login, and API clients can use Basic Auth with username pi.
- You already have pi sessions spread across several projects and want to browse, resume, and tidy them in a browser grouped by project.
- You want to fork at a specific historical message: save an independent session with "New session", or create an in-session branch with "Edit from here" and compare outcomes.
- You need to review a Git diff from an agent run and preview the changed source, Markdown, or images without opening an editor.
- You keep multiple Git worktrees of one repository and want to switch checkouts from the sidebar while keeping sessions of that repo grouped together.
- You prefer to configure provider login, API keys, model tests, and plugins/skills in a web panel instead of hand-editing CLI configuration.
- You want remote access on a trusted LAN by binding 0.0.0.0 with a long random password, or through an HTTPS reverse proxy or VPN.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npx @agegr/pi-web@latestnpm install -g @agegr/pi-web@latestnpm install then npm run dev; run npm test, node_modules/.bin/tsc --noEmit, and npm run lint. Do not run next build or npm run build during normal development
- Ports
30141- Environment variables
PI_WEB_PASSWORD- Runtime
- Node.js 22.19.0
How do you install or deploy this agent?
Node.js 22.19.0 or newer is required; verify with node --version. Run without installing:
npx @agegr/pi-web@latestOr install the CLI globally:
npm install -g @agegr/pi-web@latest
pi-webTo update, stop the running process with Ctrl+C and rerun the install command; to uninstall, run npm uninstall -g @agegr/pi-web. The CLI opens a browser once the server is ready; otherwise open http://127.0.0.1:30141. If no model provider is configured yet, sign in or add an API key in the Models panel first.
How do you use this agent?
Start with npx @agegr/pi-web@latest; the server listens only on 127.0.0.1:30141 by default. Common options: pi-web --help prints startup options; --port/-p or PORT sets the port; --hostname/-H or PI_WEB_HOSTNAME sets the bind address; --no-open or PI_WEB_NO_OPEN=1 disables automatic browser opening. Remote access example:
PI_WEB_PASSWORD='a-long-random-password' pi-web --hostname 0.0.0.0Password auth does not encrypt the connection: never expose it over plain HTTP to the internet, use HTTPS via a trusted reverse proxy or VPN, and add the exact external hostname to PI_WEB_ALLOWED_HOSTS when a proxy forwards it. Other variables: PI_WEB_SKIP_VERSION_CHECK=1 disables update checks, and PI_WEB_IDLE_TIMEOUT_MS sets the idle timeout (default 600000 ms, 0 disables it). Proxy example:
HTTP_PROXY=http://127.0.0.1:7890 HTTPS_PROXY=http://127.0.0.1:7890 NO_PROXY=localhost,127.0.0.1 npx @agegr/pi-web@latestFor development: npm install then npm run dev; run npm test, node_modules/.bin/tsc --noEmit, and npm run lint. Do not run next build or npm run build during normal development.
What are this agent's strengths and limitations?
- It reuses pi's own model, settings, and credential storage, so configuration changes are visible to both interfaces with no account migration or sync step.
- Session handling is granular: project grouping plus resume, rename, export, and delete, with a real distinction between an independent "New session" file and an "Edit from here" in-session branch.
- File-side tooling is substantial: Git diffs, Git worktree switching, and previews for source, Markdown, images, audio, PDFs, and DOCX with automatic refresh.
- It binds to 127.0.0.1 by default and exposes explicit controls for exposure and timeouts via PI_WEB_PASSWORD, PI_WEB_ALLOWED_HOSTS, and PI_WEB_IDLE_TIMEOUT_MS.
- The UI ships in English, Simplified Chinese, and Traditional Chinese and follows the browser language initially, which lowers the barrier for mixed teams.
- It depends on pi's directory layout (jsonl session files under ~/.pi/agent by default) and must run in the same filesystem environment as pi to share existing sessions.
- It requires Node.js 22.19.0 or newer and network access for server-side model and API calls, so it is unusable fully offline.
- Password auth is access control only and does not encrypt traffic; internet exposure requires your own HTTPS reverse proxy or VPN and correct PI_WEB_ALLOWED_HOSTS setup.
- The file browser is deliberately limited to working directories selected in Pi Web and project/session roots it already knows, not the whole filesystem.
- Do not run next build or npm run build during normal development because it writes to .next/ and can interfere with the dev server, so the build workflow differs from a typical Next.js project.
How does this agent compare with similar options?
The README names the upstream pi coding agent (https://github.com/earendil-works/pi): Pi Web does not run agent logic itself but acts as its local browser front end over the same configuration and session files. No other alternatives are named.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Pi Web This agent | 57 · Major gaps | CLIFree + model costs | ★ 8.3k | 3d ago | TypeScript | — |
| zerostack | 69 · Some gaps | CLIFree + model costs | ★ 1.8k | today | Rust | OpenAI API · Claude API |
| nca Native AI Coding CLI | 59 · Major gaps | CLIFree + model costs | ★ 211 | 8d ago | Rust | OpenAI API · Claude API |
| Kooky | 68 · Some gaps | Desktop appFree | ★ 656 | 1mo ago | Swift | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The README states that the server binds to 127.0.0.1 by default and that remote use needs a password, while warning that the password does not encrypt the connection. The sampled model-test route checks request origin and JSON content type, uses a temporary directory, and applies a timeout. However, the product can run an agent, high-privilege tools, terminals, and MCP; the evidence does not show consistent per-action confirmation and recovery for effects such as deletion, upload, or launching external processes. Protection details for API keys and shared configuration are limited in this sample. Exact dependency versions aid reproducibility, but no lockfile or dependency security review is shown. Repository metadata and the MIT license are traceable; publisher identity and maintenance responsibility are unverified.
The README, AGENTS architecture notes, and sampled API routes are broadly consistent about sessions, event streams, configuration, and file features. Error paths return structured status codes and messages, and model testing has a timeout. Deductions reflect the sample's lack of evidence for all routes, runtime failure handling, and offline dependency availability; the published package excludes some source directories and dependency resolution can change at install time.
The product targets local developers using the pi coding agent and documents multilingual UI, proxy variables, port and host settings, Docker guidance, and remote access. It describes file-access boundaries and a loopback default; the MCP route rereads configuration and checks project-directory trust. The intended scenarios center on pi's local environment, and the sample does not fully document platform differences, headless use, or every tool's activation conditions.
The README has a clear repository map, installation and configuration instructions, commands, environment variables, and links to focused guides. Package metadata matches the complete MIT license text. Deductions reflect the absence of a changelog and explicit maintainer or support responsibility in the supplied material; examples and limitations are useful but do not amount to a comprehensive FAQ, and updates mainly use npm latest.
The product combines session browsing and resumption, agent runs, file review, model configuration, and worktree switching in a browser UI. The README clarifies that the demo uses prerecorded replies and does not call a model. Static evidence cannot establish whether these features reliably produce their intended results; running a local server, installing dependencies, and configuring a model have costs that the sample does not quantify.
README instructions can be cross-checked against package metadata, CI workflows, and the two sampled API routes; the packet provides concrete configuration and behavior descriptions. Deductions reflect that this is only a repository sample, many security and feature claims lack their corresponding implementation files here, static review cannot verify execution, and publisher identity is unknown.
- Binding remotely exposes an agent that can perform high-privilege actions. Password authentication does not encrypt traffic; the README recommends access only through a trusted HTTPS reverse proxy or trusted VPN.
- Pi Web shares configuration, credentials, and session files with pi. Use a trusted runtime and project directory, and take care with deletion, uploads, terminals, and MCP features.
- This assessment uses only the supplied static sample; the program was not run and its security and feature claims were not independently verified.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
中文 基于 v0.16.0..v0.17.0 的提交整理。 ```bash npm install -g @agegr/pi-web@latest ``` 新增 - Agents 条:主聊天区显示子 Agent 或侧聊时,工具栏下方出现一行,列出主 Agent 和同一家族的所有成员,高亮当前所在的一个,运行中的显示转圈,点一下即可切换;「主 Agent」始终固定在最左。在切换器里选中一行会直接关闭切换器、交给这一条。右端的锁可以让它在主 Agent 上也一直显示(按浏览器记住)。(#1681, 1eb21f7) - 搜索覆盖侧聊:侧聊里自己新增的内容现在能搜到(从父会话继承的部分只在父会话中命中);点开结果会打开父会话,并在右侧面板切到那个侧聊。(#1689,感谢 fallleave001) - 单个上传文件可用满 100MB:去掉每个文件 25MB 的上限,只保留整次请求 100MB 的限制;大文件改为异步写入,不再拖慢其他请求。(bae035e) 修复 …View on GitHub ↗ -
Release notes excerpt
中文 基于 v0.15.0..v0.16.0 的提交整理。 ```bash npm install -g @agegr/pi-web@latest ``` 新增 - 支持 pi 内置的 llama.cpp 提供商:Settings › Models 可以添加 llama.cpp,表单默认使用 pi 的地址 http://127.0.0.1:8080,并带有官方图标。(#1629,感谢 Julien Chaumond) - 工具菜单里逐个开关内置工具:预设下方列出内置工具复选框,例如只启用 read 和 grep,不必编辑 settings.json;不对应任何预设的组合显示为 Custom,刷新后保留,新会话也沿用。(#1612,感谢 Yannik) - 会话搜索按空格分词匹配:alpha beta 匹配同时包含两个词的会话(顺序不限),用双引号括起的部分仍按完整短语匹配。(#1616,感谢 fallleave001) - 搜索结果显示项目名:选中结果后展开所在项目分组并定位到该会话。(#1582,感谢 花菜) …View on GitHub ↗ -
Release notes excerpt
中文 基于 v0.14.2..v0.15.0 的提交整理。 ```bash npm install -g @agegr/pi-web@latest ``` 新增 - 运行中也能切换模型:聊天框的模型选择器在运行时不再禁用,与 pi 的 TUI 一样,切换从这次运行的下一个请求起生效,推理级别本来就是这样。(#1527) - 侧聊标签随主会话恢复:右侧面板里打开的侧聊标签按主会话保存在当前浏览器标签页中,回到该会话或刷新页面时恢复(已删除的侧聊不会恢复);同一项目内切换会话时保留子代理标签;未命名的侧聊在标签栏和 Agents 切换器里统一叫「Side chat 1」「Side chat 2」。(#1512,感谢 Tiger) - 拖动重排右侧面板标签:文件、终端和代理聊天标签可以拖到其他标签前后,顺序只在页面内保留。(#1511,感谢 Tiger) - 重排自定义提供商的模型:Settings › Models 里 models.json 提供商的模型行可以在桌面上拖动、用 Alt+↑/↓ 移动,或点「+ 模型」旁的 A–Z 按名称排序一次;保存后写回文件顺序,选择器和 pi 的 /model 跟着变。(6386fa4, #1479) …View on GitHub ↗
FAQ
Is Pi Web itself a coding agent?
Does it cost anything or require an account?
Can I expose it directly to the internet?
Do idle sessions get shut down, and can I change that?
Can Pi Web read any file on my machine?
Which port does Pi Web use?
Is Pi Web open source?
Is Pi Web safe to use?
Is Pi Web still maintained?
Who makes Pi Web?
Thanks — we use this to improve the page.