PI-Desktop:本地优先的 AI 编程 Agent 桌面工作区
英文标题:🔥 vastsa/PI-Desktop
PI-Desktop 是一款处于 Early Preview 阶段的本地优先 AI 编程 Agent 桌面应用,采用 Electron、Rust Host Core 与 pi Agent Harness 架构。它支持 OpenAI、Anthropic、本地模型、模型网关及 OpenAI 兼容 API,并允许开发者按会话切换模型和推理配置。产品提供 Agent、Plan、Goal 三种工作模式,以及权限控制、代码审查、Subagent、MCP、Skills 和可安装插件等能力。其数据默认本地保存、无需 PI-Desktop 账户或平台代理,但远程模型请求仍会直接发送给用户配置的服务商。
224.5 KB
62.7 KB
178.5 KB
61.2 KB
183.9 KB
120.7 KB
中文
重要提示
PI-Desktop 目前处于 Early Preview 阶段。
该项目正在积极开发中,已经可用于真实的编码工作流,但 API、扩展接口及部分桌面端行为仍可能持续演进。
大多数编程 Agent 都运行在终端、编辑器扩展或托管服务中。
PI-Desktop 为它们提供了专属工作区。
| 可跨仓库、跨会话工作,而无需将 Agent 工作流绑定到单一编辑器或终端。项目、对话、审查、文件、预览、通知和扩展均集中于一个工作区。 | 可使用 OpenAI、Anthropic、本地模型、托管网关或任何 OpenAI 兼容 API。配置多个服务商和模型后,可在每个会话中切换。 |
|---|---|
| Agent 可以读取文件、编辑代码和运行命令,但特权操作均须通过 PI-Desktop 的权限层。你可以审查差异、检查命令输出,并决定每个会话可获得多大自主权。 | 添加 Skills、MCP 服务器、Subagent 和可安装插件。插件可提供工具、命令、面板、主题、服务、Skills 以及新的工作区体验。 |
只需几步即可开始:
-
连接模型:打开 设置 → 模型配置,选择服务商或兼容 API,并添加凭据。
-
打开项目:从侧边栏添加任意本地仓库或项目目录。
-
选择 Agent、Plan 或 Goal:Agent 会立即开始工作。Plan 会等待你批准一份冻结的实施计划。Goal 会等待你批准预期结果,之后由 Agent 自行选择实现路径。
-
审查结果:在 Review 面板检查编辑内容,查看命令输出,预览应用,并且无需离开 PI-Desktop 即可继续对话。
同一个 Agent,三道关卡。在每种模式中,特权工具仍须通过权限层。
| Agent | Plan | Goal
---|---|---|---
你批准的内容 | 无额外审批 | 实施计划 | 结果与验收标准
Agent 的行为 | 读取、编辑、运行命令、测试、迭代 | 研究仓库,编写冻结计划,然后等待 | 选择路径并持续工作,直至达成目标
适用场景 | 你希望它直接完成工作 | 变更规模较大或风险较高,希望先确认方案 | 你关心结果,而不关心实现路径
Agent 是默认循环:检查目录树、修改文件、运行命令,然后持续推进。
Plan 是审批边界。Agent 会先开展研究并产出不可变更的实施计划。只有在你签字批准后,才会开始执行。
Goal 以结果为先。你锁定目标与验收标准;Agent 自行决定实现方式。
将工作委派给 Subagent
大型任务很少能在一个上下文窗口中完成。
PI-Desktop 可以将独立工作委派给后台 Subagent,例如:
- 代码库探索
- 多文件实现
- 研究与调查
- 测试分析
- 对抗性审查
每个 Subagent 都在独立上下文中运行,并将结果汇报给父 Agent。
为长时间会话打造的工作区
PI-Desktop 的设计不止于一次提示词交互。
你可以管理多个项目和会话,置顶或归档对话,分支会话,在 Agent 运行时排队提示词,使用 @ 引用文件,使用斜杠命令,并在整个应用中搜索。
流式响应会被创建检查点,因此在可能的情况下,中断的工作可在应用重启或运行时故障后继续保留。
PI-Desktop 不会将 Agent 运行时锁定在硬编码的模型列表中。
可使用:
- OpenAI 和 Anthropic
- OpenAI 兼容 API
- 托管模型网关
- Ollama 和 LM Studio 等本地网关
- 同一服务商下的多个模型
- 支持时可使用服务商 OAuth 账户
模型配置可包含上下文窗口、输出限制、推理控制、温度及其他模型特定行为。
无需重新创建会话,即可直接从 Composer 切换模型。
审查工作,而不只是答案
Agent 工作区提供专门界面,用于处理编码过程中重要的事项:
长时间对话与对话记录导航 |
按会话切换服务商、模型与推理等级 |
|---|---|
通过插件市场扩展工作区 |
添加服务商并连接模型 |
无需重建应用即可扩展
PI-Desktop 提供多个扩展层级,可根据你希望定制 Agent 的深度进行选择。
为 Agent 提供可复用的指令和工作流。
Skills 可以全局安装,也可以为单独项目启用。
通过 Model Context Protocol 服务器连接外部工具和服务,而无需将它们内置到桌面应用中。
创建拥有各自指令、工具和模型选择的专用 Agent,再从其他 Agent 向其委派工作。
插件可通过以下方式扩展 PI-Desktop 本身:
- Agent 工具
- 命令
- 工作区面板
- 工作面板视图
- Skills
- MCP 服务器
- Subagent
- 主题
- 常驻服务
- 插件间消息传递
插件可在本地安装,也可通过市场使用 .piplug 包工作流安装。
提示
插件进程受到权限控制,并与渲染器隔离;但插件仍属于用户信任的代码,而非完整的操作系统沙箱。请仅安装你信任的插件。
PI-Desktop 是本地优先,而不是“绝不触及网络”。
| 数据 | 行为 |
|---|---|
| 对话 | 以 JSONL 格式本地存储,并使用 SQLite 索引 |
| 设置 | 存储在你的设备上 |
| API 凭据 | 存储在操作系统密钥链中 |
| 日志 | 本地存储 |
| PI-Desktop 遥测 | 无 |
| 模型请求 | 直接发送给你配置的服务商或端点 |
无需 PI-Desktop 账户,也不存在你的设备与模型服务商之间强制要求的 PI 托管中继。
如果使用远程模型服务商,该模型请求所需的上下文自然会根据该服务商自身的隐私政策发送给它。
从 GitHub Releases 下载最新构建版本。
| 平台 | 架构 | 软件包 |
|---|---|---|
| macOS | Apple Silicon | .dmg / .zip |
| macOS | Intel | .dmg / .zip |
| Windows | x64 | NSIS 安装程序 / 便携版 exe |
| Linux | x64 | .AppImage / .deb / .rpm / .asar |
打包版本可检查 GitHub Releases 更新,并在应用内提示新版本。Windows NSIS 和 Linux AppImage 可在应用内下载和安装;macOS、Linux deb/rpm 及 Windows 便携版 exe 会打开发布页面。Linux .asar 资源可用于使用系统 Electron 进行重新打包;在添加目标发行版所需的原生 Host 和打包资源后,使用 electron PI-Desktop-<version>-linux-x64.asar 启动。
Linux x64 软件包需要 glibc 2.35 或更新版本。以下发行版提供该库:
- Ubuntu 22.04 或更高版本
- Debian 12 或更高版本
- Fedora 36 或更高版本
Ubuntu 20.04、Debian 11、Fedora 35 及更早版本无法加载捆绑的 Host。可使用 ldd --version 检查。
带标签的发布工作流会在发布前,使用 Developer ID 凭据对 macOS 产物进行签名、公证和装订。
导入你现有的会话
已经在使用其他编程 Agent?
PI-Desktop 可从受支持工具导入本地会话,包括:
- Claude Code
- Codex
- OpenCode
- Pi
打开 设置 → 导入,即可将已有工作导入桌面工作区。
PI-Desktop 有意将用户界面与特权 Host 功能及 Agent 循环分离。
flowchart TB
UI["React Renderer<br/>Chat · Projects · Reviews · Settings"]
Electron["Electron Main<br/>Desktop orchestration"]
Rust["Rust Host Core<br/>Permissions · Filesystem · SQLite · Secrets"]
Agent["pi Agent Sidecar<br/>Agent loop · Models · Streaming"]
Provider["Model Provider<br/>Cloud or Local"]
UI --> Electron
Electron --> Rust
Electron --> Agent
Agent <--> Rust
Agent --> Provider
加载中
渲染器不具备 Node 集成能力。
Rust Host Core 负责特权工作区操作、权限、持久化和密钥。pi Agent Sidecar 负责模型交互与 Agent 循环。Electron 协调桌面生命周期,同时保持这些职责相互分离。
PI-Desktop 是一个正在积极开发的 Early Preview 项目。
当前 0.14.x 版本线包括桌面外壳、流式 Agent 运行时、Agent / Plan / Goal 工作流、具备权限感知能力的工作区工具、项目与会话、会话导入、MCP / Skills / Subagent、后台委派、多服务商模型配置、插件与市场支持、上下文检查点、通知、发行说明和跨平台打包。
当前优先事项包括:
- macOS 带标签发布资格认证
- 安装程序升级与回滚资格认证
- 持续强化运行时与会话恢复能力
- 更强的插件沙箱机制与发布者验证
- 更广泛的 UI 驱动端到端测试覆盖
- Node.js
>=22.19 - pnpm
>=10 - 稳定版 Rust 工具链
该仓库当前固定使用 pnpm 11,而 CI 和发布构建使用 Node 24。
git clone https://github.com/vastsa/PI-Desktop.git
cd PI-Desktop
pnpm install
cargo build -p host-core
pnpm build:js
pnpm dev
pnpm typecheck
pnpm lint
pnpm test
仓库规范中还记录了额外的协议、Plan、监督、Subagent 和 Electron E2E 测试套件。
pnpm docs:dev
pnpm docs:check
实用参考:
欢迎提交 Issue、Bug 报告、功能建议、文档改进和 Pull Request。
对于较大的变更,建议先创建 Issue,以便使实现方案与现有架构和产品契约保持一致。
PI-Desktop 建立在开源生态系统的卓越成果之上。
Agent 运行时使用来自 pi-mono 的 pi-ai 和 pi-agent-core。
桌面应用采用的技术包括 Electron、React、TypeScript、Rust、SQLite、Vite、Tailwind CSS、Shiki、Mermaid、KaTeX、TypeBox 和 i18next。
感谢每一个让 PI-Desktop 得以实现的项目和贡献者。
本项目由下列模型创建——并非出自某位孤独天才,而是一个由 token 驱动的施工团队。
| 服务商 | 模型 | Tokens |
|---|---|---|
| OpenAI | gpt-5.6-luna |
5,304,019,817 |
| OpenAI | gpt-5.6-sol |
4,825,458,273 |
| OpenAI | gpt-5.4 |
4,213,269,324 |
| Anthropic | claude-opus-5 |
3,909,952,653 |
| OpenAI | gpt-5.5 |
3,800,382,171 |
| xAI | grok-4.5 |
1,947,736,115 |
| xAI | grok-4.6 |
797,233,571 |
| DeepSeek | deepseek-v4-flash |
329,790,234 |
| OpenAI | gpt-5.2-codex |
320,983,170 |
| Xiaomi | mimo-v2.5-pro |
304,822,052 |
| Anthropic | claude-fable-5-1 |
302,580,552 |
| OpenAI | gpt-5.6-terra |
274,107,085 |
| OpenAI | gpt-5.3-codex |
255,366,945 |
| OpenAI | gpt-5.1-codex-max |
220,947,212 |
| OpenAI | gpt-5.1 |
142,533,699 |
| — | Unknown model |
69,801,632 |
| Anthropic | claude-opus-4.6 |
55,223,768 |
| Zhipu | stealth/ox-alpha |
22,954,876 |
| Anthropic | claude-fable-5 |
16,116,907 |
| OpenAI | gpt-5.1-codex-mini |
12,895,478 |
| Xiaohongshu | dots-3-note-prev |
10,166,895 |
| OpenAI | gpt-5.1-codex |
3,916,509 |
| Xiaomi | mimo-v2.5 |
3,785,071 |
**所列模型合计:**27,144,044,009 tokens。
社区链接
- Linux.Do — 一个用于分享和讨论技术的社区。
PI-Desktop 采用 GNU Lesser General Public License v3.0 许可。
详见 LICENSE。
使用你想要的模型构建。让工作流始终属于你。
macOS · Windows · Linux
English / 原文
Important
PI-Desktop is currently in Early Preview.
The project is actively developed and already usable for real coding workflows, but APIs, extension interfaces, and some desktop behaviors may continue to evolve.
Most coding agents live inside a terminal, an editor extension, or a hosted service.
PI-Desktop gives them a workspace of their own.
| Work across repositories and sessions without tying your agent workflow to one editor or terminal. Projects, conversations, reviews, files, previews, notifications, and extensions live in one workspace. | Use OpenAI, Anthropic, local models, hosted gateways, or any OpenAI-compatible API. Configure multiple providers and models, then switch between them per session. |
|---|---|
| Agents can read files, edit code, and run commands — but privileged actions pass through PI-Desktop's permission layer. Review diffs, inspect command output, and decide how much autonomy each session gets. | Add Skills, MCP servers, Subagents, and installable Plugins. Plugins can contribute tools, commands, panels, themes, services, skills, and new workspace experiences. |
Getting started only takes a few steps:
-
Connect a model Open Settings → Model configuration , choose a provider or compatible API, and add your credentials.
-
Open a project Add any local repository or project directory from the sidebar.
-
Pick Agent, Plan, or Goal Agent starts working. Plan waits until you approve a frozen implementation plan. Goal waits until you approve the outcome, then the agent chooses the path.
-
Review the result Inspect edits in the Review panel, check command output, preview the application, and continue the conversation without leaving PI-Desktop.
Same agent. Three gates. Privileged tools still go through the permission layer in every mode.
| Agent | Plan | Goal
---|---|---|---
You approve | Nothing extra | The implementation plan | The outcome and acceptance criteria
The agent does | Reads, edits, runs commands, tests, iterates | Studies the repo, writes a frozen plan, then waits | Picks the path and works until the goal is met
Use when | You want it to just do the work | The change is large or risky and you want the approach first | You care about the result, not the route
Agent is the default loop: inspect the tree, patch files, run commands, and keep going.
Plan is the approval boundary. The agent researches first and produces an immutable implementation plan. Execution does not start until you sign off.
Goal is outcome-first. You lock the objective and acceptance criteria; the agent decides how to get there.
Delegate work to Subagents
Large tasks rarely belong in one context window.
PI-Desktop can delegate independent work to background Subagents for things like:
- codebase exploration
- multi-file implementation
- research and investigation
- test analysis
- adversarial review
Each Subagent runs in its own context and reports its result back to the parent agent.
A workspace built for long sessions
PI-Desktop is designed for more than one prompt at a time.
You can manage multiple projects and sessions, pin or archive conversations, branch sessions, queue prompts while an agent is running, reference files with @, use slash commands, and search across the application.
Streaming responses are checkpointed so interrupted work can survive application restarts or runtime failures whenever possible.
PI-Desktop does not lock the agent runtime to a hardcoded model list.
Use:
- OpenAI and Anthropic
- OpenAI-compatible APIs
- hosted model gateways
- local gateways such as Ollama and LM Studio
- multiple models under the same provider
- provider OAuth accounts where supported
Model configuration can include context windows, output limits, reasoning controls, temperature, and other model-specific behavior.
Switch models directly from the Composer without recreating your session.
Review the work, not just the answer
The agent workspace includes dedicated surfaces for the things that matter while coding:
Long-running conversations with transcript navigation |
Switch providers, models, and reasoning levels per session |
|---|---|
Extend the workspace through the plugin marketplace |
Add a provider and connect a model |
Extensions without rebuilding the app
PI-Desktop has several extension layers depending on how deeply you want to customize the agent.
Give agents reusable instructions and workflows.
Skills can be installed globally or activated for individual projects.
Connect external tools and services through Model Context Protocol servers without baking them into the desktop application.
Create specialized agents with their own instructions, tools, and model choices, then delegate work to them from another agent.
Plugins can extend PI-Desktop itself with:
- agent tools
- commands
- workspace panels
- work-panel views
- Skills
- MCP servers
- Subagents
- themes
- resident services
- inter-plugin messaging
Plugins can be installed locally or through the marketplace using the .piplug package workflow.
Note
Plugin processes are permission-gated and isolated from the renderer, but plugins are still user-trusted code rather than a complete operating-system sandbox. Only install plugins you trust.
PI-Desktop is local-first , not “nothing ever touches the network.”
| Data | Behavior |
|---|---|
| Conversations | Stored locally as JSONL with a SQLite index |
| Settings | Stored on your machine |
| API credentials | Stored in the operating system keychain |
| Logs | Local |
| PI-Desktop telemetry | None |
| Model requests | Sent directly to the provider or endpoint you configure |
There is no required PI-Desktop account and no mandatory PI-hosted relay between your machine and your model provider.
If you use a remote model provider, the context required for that model request is naturally sent to that provider according to its own privacy policy.
Download the latest build from GitHub Releases.
| Platform | Architecture | Package |
|---|---|---|
| macOS | Apple Silicon | .dmg / .zip |
| macOS | Intel | .dmg / .zip |
| Windows | x64 | NSIS installer / portable exe |
| Linux | x64 | .AppImage / .deb / .rpm / .asar |
Packaged builds can check GitHub Releases for updates and surface new versions inside the application. Windows NSIS and Linux AppImage can download and install in-app; macOS, Linux deb/rpm, and the Windows portable exe open the releases page. The Linux .asar asset is available for repackaging with a system Electron; launch it with electron PI-Desktop-<version>-linux-x64.asar after adding the native host and packaged resources required by the target distribution.
Linux x64 packages need glibc 2.35 or newer. That is the library shipped with:
- Ubuntu 22.04 or later
- Debian 12 or later
- Fedora 36 or later
Ubuntu 20.04, Debian 11, Fedora 35, and older releases cannot load the bundled host. Check with ldd --version.
The tagged-release workflow signs, notarizes, and staples macOS artifacts with Developer ID credentials before publication.
Import your existing sessions
Already using another coding agent?
PI-Desktop can import local sessions from supported tools including:
- Claude Code
- Codex
- OpenCode
- Pi
Open Settings → Import to bring existing work into the desktop workspace.
PI-Desktop deliberately separates the user interface from privileged host capabilities and the agent loop.
flowchart TB
UI["React Renderer<br/>Chat · Projects · Reviews · Settings"]
Electron["Electron Main<br/>Desktop orchestration"]
Rust["Rust Host Core<br/>Permissions · Filesystem · SQLite · Secrets"]
Agent["pi Agent Sidecar<br/>Agent loop · Models · Streaming"]
Provider["Model Provider<br/>Cloud or Local"]
UI --> Electron
Electron --> Rust
Electron --> Agent
Agent <--> Rust
Agent --> Provider
Loading
The renderer has no Node integration.
The Rust Host Core owns privileged workspace operations, permissions, persistence, and secrets. The pi Agent Sidecar owns model interaction and the agent loop. Electron coordinates the desktop lifecycle while keeping those responsibilities separated.
Read the architecture specification →
PI-Desktop is an early preview under active development.
The current 0.14.x line includes the desktop shell, streaming agent runtime, Agent / Plan / Goal workflows, permission-aware workspace tools, projects and sessions, session imports, MCP / Skills / Subagents, background delegation, multi-provider model configuration, plugins and marketplace support, context checkpoints, notifications, release notes, and cross-platform packaging.
Current priorities include:
- macOS tagged-release qualification
- installer upgrade and rollback qualification
- continued runtime and session-recovery hardening
- stronger plugin sandboxing and publisher verification
- broader UI-driven end-to-end coverage
Follow development through the project board and milestones.
- Node.js
>=22.19 - pnpm
>=10 - stable Rust toolchain
The repository currently pins pnpm 11, while CI and release builds use Node 24.
git clone https://github.com/vastsa/PI-Desktop.git
cd PI-Desktop
pnpm install
cargo build -p host-core
pnpm build:js
pnpm dev
pnpm typecheck
pnpm lint
pnpm test
Additional protocol, Plan, supervision, Subagent, and Electron E2E suites are documented in the repository specification.
pnpm docs:dev
pnpm docs:check
Useful references:
Issues, bug reports, feature proposals, documentation improvements, and pull requests are welcome.
For larger changes, opening an issue first makes it easier to align the implementation with the existing architecture and product contracts.
When working in the repository, start with AGENTS.md and the specification index.
Report an issue · View open issues
PI-Desktop builds on the excellent work of the open-source ecosystem.
The agent runtime uses pi-ai and pi-agent-core from pi-mono.
The desktop application is built with technologies including Electron, React, TypeScript, Rust, SQLite, Vite, Tailwind CSS, Shiki, Mermaid, KaTeX, TypeBox, and i18next.
Thank you to every project and contributor that makes PI-Desktop possible.
This project was created by the models below — not by a lone genius, but by a token-powered construction crew.
| Provider | Model | Tokens |
|---|---|---|
| OpenAI | gpt-5.6-luna |
5,304,019,817 |
| OpenAI | gpt-5.6-sol |
4,825,458,273 |
| OpenAI | gpt-5.4 |
4,213,269,324 |
| Anthropic | claude-opus-5 |
3,909,952,653 |
| OpenAI | gpt-5.5 |
3,800,382,171 |
| xAI | grok-4.5 |
1,947,736,115 |
| xAI | grok-4.6 |
797,233,571 |
| DeepSeek | deepseek-v4-flash |
329,790,234 |
| OpenAI | gpt-5.2-codex |
320,983,170 |
| Xiaomi | mimo-v2.5-pro |
304,822,052 |
| Anthropic | claude-fable-5-1 |
302,580,552 |
| OpenAI | gpt-5.6-terra |
274,107,085 |
| OpenAI | gpt-5.3-codex |
255,366,945 |
| OpenAI | gpt-5.1-codex-max |
220,947,212 |
| OpenAI | gpt-5.1 |
142,533,699 |
| — | Unknown model |
69,801,632 |
| Anthropic | claude-opus-4.6 |
55,223,768 |
| Zhipu | stealth/ox-alpha |
22,954,876 |
| Anthropic | claude-fable-5 |
16,116,907 |
| OpenAI | gpt-5.1-codex-mini |
12,895,478 |
| Xiaohongshu | dots-3-note-prev |
10,166,895 |
| OpenAI | gpt-5.1-codex |
3,916,509 |
| Xiaomi | mimo-v2.5 |
3,785,071 |
Total for listed models: 27,144,044,009 tokens.
Community Links
- Linux.Do — A community for sharing and discussing technology.
PI-Desktop is licensed under the GNU Lesser General Public License v3.0.
See LICENSE for details.
Build with the model you want. Keep the workflow yours.
macOS · Windows · Linux



