The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Kun
Local-first AI agent workspace for coding, writing, design, research, and automation — one runtime for desktop GUI and TUI.
Install
git clone https://github.com/KunAgent/KunInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →Kun
本地优先的 AI 工作台:写代码、做文档、和 Agent 一起推进事情。
下载 · 文档 · 更新日志 · English
Kun 能做什么
Kun 是跑在你电脑上的桌面应用。代码、文档和 Agent 对话共用一个本地运行时;会话、记忆和设置都留在本机,模型由你自己接入。
还有:插件与技能市场(MCP / Skills)、提醒与定时任务、终端 TUI、手机远程、Kun 账号与衣橱。完整列表见 0.4.0 更新日志。
三步开始
- 下载安装。 从 Releases 选择对应平台的安装包。
- 连接一个模型。 首次启动的引导里填 API Key,或登录已有订阅。支持 OpenAI / Anthropic 兼容接口与本地模型,见 Provider 文档。
- 给一件具体的事。 打开一个项目文件夹交给 Code,或把资料拖进 Work。Agent 动手前会先请你确认。
| 平台 | 安装包 | 架构 |
|---|---|---|
| macOS | .dmg / .zip |
Apple Silicon / Intel |
| Windows | .exe |
x64 |
| Linux | .AppImage / .deb |
x64 |
看一眼
本地优先,权限在你
- 数据在本机。 会话、记忆、日志存在本地;用云端模型时,只有本次请求的上下文发给你选的 Provider。
- 动手先确认。 工具、目录和工作台权限默认需要批准;记忆和群聊不会扩大权限。
- 模型随你换。 DeepSeek、Kimi、GLM、Qwen、Ollama 等预设,也可自定义 Provider。
- GUI 与 TUI 共用。 同一个
kun serve运行时,线程、计划和审批两边都能接着用。
从源码运行
需要 Node.js 22.19+。
git clone --branch develop https://github.com/KunAgent/Kun.git
cd Kun && npm ci && npm run dev
常用命令
| 命令 | 用途 |
|---|---|
npm run dev |
构建运行时并启动 Electron 开发环境 |
npm run dev:tui |
构建运行时并启动终端 TUI |
npm run typecheck |
TypeScript 类型检查 |
npm run lint |
ESLint 与文件大小检查 |
npm run test |
运行测试 |
npm run build |
生产构建 |
npm run dist:mac / dist:win / dist:linux |
构建对应平台安装包 |
中国大陆网络较慢时可加 --registry=https://registry.npmmirror.com。
终端 TUI 的两种用法
保持桌面应用运行,在项目目录连接它的运行时,与 GUI 共用线程和审批:
kun --no-start
单独使用时先退出桌面应用,再运行 kun;TUI 会启动自己的运行时,退出时一并停止。更多见 Kun TUI 文档。
文档
| 上手 | 模型 Provider · 个人 Agent 与记忆 · 终端 TUI |
| 工作台 | Code 中的 Agent 对话 · Design 画布 · 论文与证据 |
| 扩展 | MCP 与 Skills · Loops · Extension 平台 · 本地网关 |
| 开发 | 本地开发 · 运行时架构 · 贡献指南 |
参与贡献
欢迎提交 bug 修复、UI、运行时、Provider 和文档改进。PR 请以 develop 为目标分支,开始前读一下 贡献指南;外部贡献需要签署 CLA。
许可证
PolyForm Noncommercial 1.0.0,仅限学习、研究和非商业用途。商业使用、托管服务或集成进商业产品,需要作者单独书面授权。
记忆架构参考了 Nowledge Mem 公开文档中的 Thread / Memory 分离与来源追踪理念,实现保持独立。
觉得有用?点个 Star,让更多人看到 Kun。
Similar plugs
Reverse engineer anything with agents, from app behavior down to native binaries.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io