Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
A local-first, cross-platform Electron desktop workspace for Pi Coding Agent, with sessions, project files, browser tools, skills, plugins, and messaging integrations.
Jump to setup instructionsFetched from the repository for this visit.
主工作区与主要设置界面,点击图片可查看原图。
模型与自动路由:快模型、强模型和决策模型 |
MCP 服务:配置、连接测试与登录 |
浏览器设置:Profile、标签页与网络访问 |
Herdr:连接状态与 Agent CLI 诊断 |
技能管理:启用开关与 SKILL.md 编辑 |
系统工具发现与托管运行时管理 |
@ 文件引用tool_history_get 查询原文WebContentsView 承载真实 Chromium 页面,支持多 Tab、临时/持久 Profile、登录态、下载、上传和代理process_* tools 持续运行 Vite、React、Three.js、Storybook、Flask、Spring Boot、mock API 和 watch build;普通短命令继续走 Bash&、nohup 或外部终端受管后台进程支持 macOS、Linux 和 Windows 11 x64;Windows ARM64、Windows Server 和 32 位 Windows 暂不支持。
agent.stop,因此 Agent close 会明确关闭其所在 pane,不会静默伪造停止语义.docx)文档max 推理级别开发分支的模型配置可先运行 npm run check:models-config 只读预检;无效字段会使整份自定义配置暂不生效,设置页保留原内容以便修正。OpenRouter 的个性化目录与 Pi CLI 共享缓存,不按 key 或 endpoint 分区;不同凭据交替使用、特别是离线启动时,列表可能来自另一个运行环境,不能将缓存目录视为当前 key 已获授权。
新会话使用 Pi 选择的默认模型,遇到已退役的历史型号时,在模型菜单明确重选后继续。搜索 src/*.ts 只匹配搜索根直属的 src。要同时搜索各个子项目,使用 **/src/*.ts。
“设置 → 通用 → 全局聊天提示”分别控制缓存未命中、预热费用、压缩费用和推理丢弃。已信任项目的 .pi/settings.json 可以逐项覆盖。若与旧 CLI 共用 ~/.pi/agent/settings.json,建议先备份并升级 CLI。1.6.1 保存全局 Pi 设置时会迁移旧总开关,仍使用 1.5.2 或 1.6.0 的 CLI 重读后会按旧版默认关闭提示。
扩展的 render() 应把上游返回的行当作只读数据。要追加一行,可返回 [...super.render(width), footer]。对需要 developer 角色的自建 Chat Completions 推理模型,按模型设置 compat.supportsDeveloperRole: true。非推理模型仍使用 system。
在“设置 → 模型 → 自动路由”启用 Auto,选择快模型、强模型及各自的思考级别,保存后在聊天模型菜单中选择 Auto。
high 及以上使用强模型,其余使用快模型;也可配置决策模型,根据每次新提问的复杂度选择模型路由配置在新建、重新加载会话或重新选择 Auto 后生效。
通过会话工具菜单启用 Codemode(“完全访问”预设已包含),让 Agent 按需生成图片,或调用决策模型进行分类、是非判断和评分。支持图片输入的分类器也可判断截图和图片。模型按提供商的现有凭据发现,分类器作为辅助能力使用,不进入聊天主模型选择器。
每次模型调用都遵循 Codemode 权限,支持停止,并保存原始输入、结果和执行状态;用量计入会话统计,可在已有工具记录中查看。OpenAI 决策接口需要 API key,ChatGPT 订阅登录不提供该能力。TypeSafe Jev 可在“设置 → 模型 → 添加服务商”中搜索 TypeSafe 或 Jev,填写 API key 后使用;详情页会列出 jev-latest。可以让 Agent“使用可用的决策模型给这些条目分类”。
生成的图片可在最终回复及重开的会话历史中查看。服务商详情页列出可用的图片与决策模型,并提供测试请求;测试使用所配置的服务商凭据,可能产生用量费用。
/help、/status、/new、/compact 和 /reloadsandbox: true、严格 CSP 与类型化 IPC 契约最新稳定版为 v0.6.0,提供 macOS Apple Silicon / Intel、Windows x64 和 Linux x64 安装包。
v0.6.0 内置 Pi Coding Agent 1.6.1。现在可以按回答正文找回会话,切回会话处理待确认的权限请求,并在 Auto 重试时查看换模原因和去向。也可按下方步骤从源码运行。
普通用户使用 Agent 本身无需单独安装 Pi CLI、Pi Coding Agent、Node.js 或 npm;安装桌面应用并配置模型提供商后即可使用。Skills、Plugins 或 Agent 脚本需要额外开发工具时,应用会优先复用健康的系统安装,也可以在用户确认后安装应用私有运行时。
应用会读取 ~/.pi/agent/ 中的会话与配置。如果你已经使用 Pi CLI,可以直接复用现有数据,无需迁移;此前没有使用过 Pi CLI 也不影响使用。
Pi Desktop 会先发现并验证用户已经安装的 Node.js/npm、Python、Git、Bash、uv、jq 和 Bun;内置的 rg/fd 保证离线搜索可用。
>=22.19.0 <23)git clone https://github.com/DLYZZT/pi-desktop.git
cd pi-desktop
npm ci
npm run dev
Pi Agent Desktop 使用 Electron 三进程模型,将高权限桌面能力、Agent 运行时和 UI 隔离开来。
flowchart LR
Main["Electron Main<br/>窗口 · 托盘 · 协议 · Host 监督"]
Host["Agent Host / utilityProcess<br/>Pi Agent · 会话 · 文件 · 配置"]
UI["Renderer<br/>React 19 · Vite"]
Browser["Main-owned WebContentsView<br/>远程网页 · Profile · 网络策略"]
Processes["受管项目进程<br/>dev server · watcher · mock API"]
Data["~/.pi/agent/<br/>会话 · 模型 · 配置"]
Main --> Host
Main --> UI
Main --> Browser
Host -->|"revisioned Browser RPC"| Main
Host -->|"POSIX worker / Windows Job helper"| Processes
Main -.->|"crash reaper"| Processes
Browser -->|"独立授权的 localhost 访问"| Processes
UI <-->|"Typed MessagePort IPC"| Host
Host <--> Data
utilityProcess 中运行 Pi Coding Agent,处理会话、文件、配置与扩展WebContentsView,不获得应用 preload、Node 或主 Renderer bridge~/.pi/agent/tool-executions 日志及内容文件| 命令 | 说明 |
|---|---|
npm run dev | 启动 Vite、主进程构建监听与 Electron |
npm run typecheck | 执行 TypeScript 类型检查 |
npm run test | 运行自动化测试套件 |
npm run check:contract | 检查 API 方法与 Host handler 覆盖关系 |
npm run check:architecture | 检查进程架构边界与代码结构约束 |
npm run smoke | 运行 Electron 冒烟测试 |
npm run test:execution-recovery | 验证 Host 崩溃后的工具执行历史恢复 |
npm run test:browser-electron | 运行本地 Browser Electron 集成测试 |
npm run test:managed-process-workflows | 运行受管进程生命周期与清理测试 |
npm run test:herdr-e2e | 使用指定官方 binary 运行隔离 Herdr E2E |
npm run test:herdr-desktop-e2e | 运行 production Electron/Renderer Herdr 集成 E2E |
npm run test:windows-managed-helper | 在 Windows x64 验收 Rust helper 与 Job Object |
npm run test:windows-nsis-upgrade -- <旧安装包> <新安装包> | 在 Windows x64 验证安装、升级、回滚和卸载 |
npm run verify | 执行提交前的完整质量检查 |
npm run build | 构建 main、preload 与 renderer |
npm run pack | 生成未封装的应用目录 |
npm run dist | 生成当前平台配置的全部架构安装包 |
npm run dist:mac:signed | 生成当前 Mac 架构的 Developer ID 签名包 |
npm run dist:mac:notarized | 生成签名并经 Apple 公证的 macOS 包 |
src/
├── contract/ # IPC 类型契约与 RPC 层
├── main/ # Electron 主进程与 crash reaper
├── preload/ # 安全桥接接口
├── agent-host/ # Agent、会话、文件、配置与受管进程
├── renderer/ # React 桌面界面
└── shared/ # 可测试的纯函数与共享模块
native/
└── windows-managed-process-helper/ # Windows x64 Rust / Job Object helper
欢迎通过 Issues 提交问题或建议,也欢迎直接发起 Pull Request。提交代码前请至少运行:
npm run verify
max 推理级别v* tag release workflowv* tag 双架构签名、公证与正式 Release 端到端验收Pi Agent Desktop 是 Pi Coding Agent 的桌面工作台,继续使用 ~/.pi/agent/ 中的会话和配置,因此可以与 CLI 配合使用。
Plugins 继续通过 Pi 的包管理器与运行时加载。仅适用于终端 TUI 的扩展接口(例如自定义终端组件或原始按键监听)无法在桌面 Renderer 中等价呈现;应用会显示明确的兼容性提示,不会静默忽略。
GitHub checked 400h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.