Overview
Kun is a local-first workbench built around finishing work rather than answering questions. It organises tasks under two primary modes: Code, for software delivery, with a Design canvas available inside the same task; and Work, for writing, research, document analysis and presentation output. In either mode the agent reads workspace context, drafts a plan, calls tools, edits files, runs verification and leaves the evidence attached to the task.
The desktop GUI and the terminal TUI are two front ends over a single local `kun serve` runtime, so threads, goals, plans, approvals and background tasks are shared rather than duplicated across two disconnected sessions. The GUI suits watching, reviewing and controlling a run; the TUI suits keyboard-focused work. Requirements and plans can be saved inside the project by default, which puts them under version control and code review alongside the code they describe.
Sessions, preferences, logs and runtime data stay on the machine; when you pick a cloud model, prompts, attachments and task context go to that provider, and tool permissions, sensitive operations and extension permissions are surfaced in the UI for you to authorise. Kun is not tied to one model — provider presets cover ChatGPT/Codex, Claude, Gemini, Cursor, Ollama, DeepSeek, Kimi, GLM, Qwen, MiniMax and Xiaomi MiMo, configured through the Provider settings. The code is published under the PolyForm Noncommercial License 1.0.0: free for study, research and non-commercial use, with commercial use, SaaS hosting, resale or integration into a commercial product requiring a separate written licence.
What it does
- One local kun serve runtime shared by the desktop GUI and the terminal TUI — same threads, plans, approvals and background tasks
- Code mode with project context, file editing, terminal, Git and worktrees, diffs, tests and review
- Design canvas inside the same Code task for prototypes, design systems and design-to-code context
- Work mode for Markdown drafting, PDF/Office preview, citation and analysis, spreadsheet analysis and outline-to-deck generation (Office files stay read-only)
- Automation surface: scheduled tasks, loops, hooks, MCP servers, skills and installable extensions
- Plans, todos, tool calls, file changes, browser/terminal results and approvals all attached to the task as evidence
- Local-first storage for sessions, preferences, logs and runtime data, with explicit permission prompts for tools and extensions
- Provider presets across subscriptions, plans, APIs, OpenAI/Anthropic-compatible services and self-hosted models
Getting started
Kun ships installers for macOS (.dmg / .zip, Apple Silicon and Intel), Windows (.exe, x64) and Linux (.AppImage / .deb, x64) on its GitHub releases page. Since 0.3.8 the TUI is no longer distributed separately — it is the terminal command bundled with the desktop app.
Install and configure a model
Download the current release for your platform, launch it, choose a language, then configure one model subscription, plan, API or custom provider in Provider settings.
Open a workspace and send a task
Open a local project or create a workspace, then send one goal that is clearly scoped and verifiable. The agent fills in scope, risks and acceptance criteria from the project contents before it starts.
Use the TUI on the same runtime
From a project directory, start the terminal client. It connects to the same local runtime as the desktop app, so a task started in one is visible in the other.
kunRun from source
Requires Node.js 22.19 or newer, npm, and at least one working model connection.
git clone https://github.com/KunAgent/Kun.git
cd Kun
npm ci
npm run dev # build the runtime and start the Electron dev environment
npm run dev:tui # build the runtime and start the terminal TUIBuild installers
Production builds and per-platform packages are npm scripts.
npm run typecheck
npm run test
npm run build
npm run dist:mac # or dist:win / dist:linuxCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Reach for it when you want one agent runtime driving both a desktop UI and a terminal client without two separate session histories
- Reach for it when plans, approvals and verification evidence need to live next to the task and inside the repository
- Reach for it to mix software delivery and document work — code, design canvas, Markdown, spreadsheets and decks — in one workspace
- Reach for it when the agent's data should stay on your machine and every tool permission should be granted explicitly
How Kun compares
Kun alongside other open-source assistants & chatbots tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| OpenClaw | ★ 390k | OpenClaw is a self-hosted personal AI assistant that answers you on WhatsApp, Telegram, Slack, Discord, and many other channels, with voice and a live visual canvas. |
| Hermes Agent | ★ 247k | A self-improving personal AI agent from Nous Research that builds skills from experience, remembers across sessions, and reaches you on Telegram, Discord, Slack, and more. |
| Odysseus | ★ 87.4k | A self-hosted AI workspace that puts chat, agents, deep research, documents, email, notes, tasks and calendar behind one Docker Compose stack, over local or API models. |
| CowAgent | ★ 47.1k | A self-hosted assistant that plans and executes tasks with built-in file, terminal, browser and search tools, and answers across a web console plus a dozen messaging platforms. |
| AstrBot | ★ 40.7k | An all-in-one agent chatbot platform that puts LLM conversations, tools, knowledge bases and a plugin marketplace inside messaging apps like Telegram, Slack, Discord, QQ and Feishu. |
| OpenHuman | ★ 39.9k | A local-first desktop personal AI for macOS, Windows and Linux that keeps a compressed memory tree on your machine and orchestrates checkpointed research and automation workflows. |
| MindsHub | ★ 39.8k | An agent workspace for knowledge work and software development that runs swappable open-source agent harnesses against your choice of frontier or open models. |
| Kun | ★ 6.3k | Local-first agent workbench with a desktop GUI and a terminal TUI on one runtime |