{"id":48926977,"url":"https://github.com/legionio/kai-desktop","last_synced_at":"2026-04-30T23:01:11.945Z","repository":{"id":351823097,"uuid":"1211839280","full_name":"LegionIO/kai-desktop","owner":"LegionIO","description":"Electron GUI Kai application","archived":false,"fork":false,"pushed_at":"2026-04-29T23:27:06.000Z","size":19409,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-29T23:30:36.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LegionIO.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-15T19:56:22.000Z","updated_at":"2026-04-29T23:27:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/LegionIO/kai-desktop","commit_stats":null,"previous_names":["legionio/kai-desktop"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/LegionIO/kai-desktop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-desktop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-desktop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-desktop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-desktop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LegionIO","download_url":"https://codeload.github.com/LegionIO/kai-desktop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LegionIO%2Fkai-desktop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32479448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-17T07:04:32.858Z","updated_at":"2026-04-30T23:01:11.926Z","avatar_url":"https://github.com/LegionIO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kai\n\nKai is an Electron-based local AI assistant for coding and operator workflows. It pairs a React desktop UI with a local Electron runtime that can manage conversations, switch models, call tools, load skills, connect to MCP servers, and delegate work to sub-agents.\n\n## What It Does\n\n- Runs a desktop chat experience with persistent local conversations\n- Supports multiple model providers, including OpenAI-compatible endpoints, Anthropic, Google, and Amazon Bedrock\n- Exposes local tools for shell execution, file access, search, and settings management\n- Loads user-installed skills as tools\n- Connects to external MCP servers and adds their tools to the assistant\n- Supports memory, context compaction, title generation, and sub-agent delegation\n- Stores app data locally under `~/.kai`\n\n## Stack\n\n- Electron\n- React 19\n- TypeScript\n- Vite via `electron-vite`\n- Tailwind CSS 4\n- Mastra for agent orchestration and memory integration\n\n## Project Layout\n\n```text\n.\n├── electron/              # Electron main process, IPC handlers, tool registry, agent runtime\n├── src/                   # React renderer app and settings UI\n├── build/                 # App icons and packaging assets\n├── scripts/               # Utility scripts\n├── electron-builder.yml   # Packaging configuration\n└── package.json           # Scripts and dependencies\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 22+\n- `pnpm` 10+\n\n### Install\n\nFrom the repository root:\n\n```bash\npnpm install\n```\n\n### Run In Development\n\n```bash\npnpm dev\n```\n\nThis starts the Electron app with the renderer and main process in watch mode.\n\n### Useful Commands\n\n```bash\npnpm lint\npnpm type-check\npnpm build\npnpm preview\npnpm rebuild\n```\n\n### Packaging\n\n```bash\npnpm build:mac\n```\n\nThe current builder config is set up for macOS output in `dist/`.\n\n### Testing the Auto-Updater\n\nThe auto-updater is disabled in dev mode by default. Set `KAI_UPDATE_TEST_VERSION` to a fake old version to enable it:\n\n```bash\n# Test against GitHub releases (default):\nKAI_UPDATE_TEST_VERSION=0.0.1 pnpm dev\n\n# Test against a different GitHub repo:\nKAI_UPDATE_TEST_VERSION=0.0.1 KAI_UPDATE_REPO=owner/repo pnpm dev\n\n# Test against a generic server (e.g. on-prem S3):\nKAI_UPDATE_TEST_VERSION=0.0.1 KAI_UPDATE_URL=https://example.com/releases/latest pnpm dev\n```\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `KAI_UPDATE_TEST_VERSION` | *(unset — updater disabled in dev)* | Fake current version (e.g. `0.0.1`) |\n| `KAI_UPDATE_REPO` | `legionio/kai-desktop` | GitHub `owner/repo` for release lookup |\n| `KAI_UPDATE_URL` | *(unset)* | Generic server URL (takes priority over `KAI_UPDATE_REPO`). Server must host `latest-mac.yml` + zip at this URL. |\n\nThe full check/download/UI-notification flow can be verified in dev. The actual install step will fail (Squirrel expects a signed app bundle).\n\n## Configuration\n\nKai creates and reads its local state from `~/.kai`.\n\nImportant paths:\n\n- `~/.kai/config.json` - primary desktop configuration\n- `~/.kai/data/` - local app data\n- `~/.kai/skills/` - installed skills\n- `~/.kai/certs/` - certificates used by integrations\n- `~/.kai/settings/llm.json` - imported provider/model settings\n\nOn first run, the app falls back to built-in defaults and will create the required directories automatically.\n\n## Key Features\n\n### Models\n\nThe app maintains a model catalog plus provider settings. The current implementation supports:\n\n- OpenAI-compatible providers\n- Anthropic\n- Google\n- Amazon Bedrock\n\nUsers can choose a default model and switch models per conversation.\n\n### Tools\n\nThe local tool registry can include:\n\n- Shell execution\n- File read, write, and edit\n- File search and directory listing\n- MCP management\n- Memory and compaction settings management\n- Model switching\n- Sub-agent spawning\n- Skill management\n\nTool availability is controlled by config.\n\n### Skills\n\nSkills are loaded from disk and can be enabled or disabled in the app. Enabled skills are exposed to the assistant as tools.\n\n### MCP\n\nMCP servers can be configured in settings or in `~/.kai/config.json`. On config changes, Kai rebuilds the active MCP tool set.\n\n### Memory And Compaction\n\nThe desktop runtime includes:\n\n- Working memory\n- Observational memory\n- Semantic recall\n- Tool output compaction\n- Conversation compaction\n\nThese settings are configurable from the in-app settings panel.\n\n### Sub-Agents\n\nKai can spawn child agents for delegated work. Limits such as nesting depth and concurrency are configurable.\n\n## Architecture Notes\n\n- `electron/main.ts` bootstraps the app window, menus, local directories, and IPC registration.\n- `electron/ipc/` contains the bridge layer between the renderer and the main process.\n- `electron/tools/registry.ts` builds the active tool set from config, skills, MCP servers, and built-in tools.\n- `electron/agent/` contains model resolution, orchestration, memory helpers, and sub-agent execution.\n- `src/App.tsx` defines the desktop shell, sidebar, conversation switching, and settings entry points.\n- `src/components/settings/` contains the in-app configuration UI.\n\n## Development Notes\n\n- The app uses a preload bridge and keeps `contextIsolation` enabled.\n- Renderer code talks to Electron through the `window.app` API exposed in `electron/preload.ts`.\n- Conversations and settings are persisted locally instead of relying on a hosted backend.\n- External links are opened in the system browser.\n\n## Current Status\n\nThis README reflects the app as currently wired in the repository:\n\n- local-first desktop assistant\n- configurable model catalog\n- tool-enabled chat runtime\n- skill loading\n- MCP integration\n- macOS packaging configuration\n\nIf you expand the packaging targets or add onboarding flows, this README should be updated alongside those changes.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegionio%2Fkai-desktop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegionio%2Fkai-desktop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegionio%2Fkai-desktop/lists"}