Loading repository data…
Loading repository data…
dcellison / repository
Kai is a local, Telegram-first personal engineering system: a persistent AI collaborator with repo-aware coding, memory, scheduling, PR review, and multi-backend resilience. Your machine, your data, your rules.
Kai is a local, Telegram-first personal engineering system: a persistent AI collaborator with repo-aware coding, memory, scheduling, PR review, and multi-backend resilience.
Run Kai on your own machine, reach it from Telegram, and give it real access to your local workspaces. Kai can inspect repositories, run shell commands, write code, review pull requests, triage issues, remember durable context, handle files, and run scheduled jobs while staying under your control. Your machine, your data, your rules.
For full setup and operations guides, see the Kai Wiki.
Most AI coding tools are either interactive terminals or hosted chat surfaces. Kai is built for a different operating model: a long-running local service that keeps an agent available wherever Telegram works.
| Capability | What Kai Does |
|---|---|
| Repo-aware coding | Runs an agent inside local workspaces with shell, filesystem, git, and web access. |
| Workspaces | Switches between projects by name and keeps per-workspace settings. |
| Memory | Maintains identity, durable user memory, semantic recall, and searchable conversation history. |
| Scheduling | Runs reminders, recurring jobs, and condition monitors from Telegram or HTTP. |
| GitHub automation | Reviews PRs, triages issues, routes notifications, and reacts to webhook events. |
| File exchange | Accepts files from Telegram, exposes their local paths to the agent, and can send files back. |
| Voice | Supports local voice transcription and optional text-to-speech responses. |
| Multi-user operation | Isolates users by chat ID, workspace, files, history, jobs, settings, and optionally OS account. |
Telegram
-> Kai service
-> per-user agent backend
-> local workspace, shell, git, files, web, services
Kai has two layers. The outer Python service handles Telegram, HTTP, scheduling, authentication, persistence, webhooks, file exchange, and per-user routing. The inner agent backend does the thinking and acting inside a local workspace. Backend subprocesses are created lazily per user and evicted after an idle timeout, so resource use follows active users rather than registered users.
This is not an API relay bot. The inner backend is a full coding-agent runtime with local tools and project context. Kai gives that runtime a durable home, a Telegram control surface, scheduled execution, event-driven inputs, memory, and a security model designed around the fact that it can take real action.
In Kai, a backend is more than a model provider. Each backend is a full coding harness with its own protocol, tool behavior, authentication path, context handling, model surface, and failure modes. Kai normalizes lifecycle and routing around those harnesses while preserving the differences that matter.
| Backend | Runtime | Model Selection Shape | Notes |
|---|---|---|---|
| Claude Code | claude CLI | Claude aliases and full model IDs | Default backend. |
| OpenAI Codex CLI | codex CLI | Codex CLI model IDs | Uses Codex's own model catalog, separate from OpenAI API model lists. |
| Goose | goose acp | Provider-native model IDs | ACP backend with provider selected through Goose configuration or env. |
| OpenCode | opencode acp | provider/model IDs | ACP backend with model resolution owned by OpenCode. |
Only the backend you use needs to be installed and authenticated. Kai does not require every supported backend to exist on every machine.
Requirements:
Install Kai for local development:
git clone git@github.com:dcellison/kai.git
cd kai
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
make config
make run
make config writes the runtime env file and mandatory users.yaml for the deployment mode you select. Pick single_user for a local repo checkout under your own account. Pick protected when you want source, data, and secrets split across protected system directories.
For full installation details, see Getting Started, Multi-User Setup, and System Architecture.
Kai has real local authority, so the security model is part of the product rather than an afterthought.
See TOTP Authentication, GitHub Notification Routing, and Exposing Kai to the Internet for the detailed operational docs.
/workspace <name> or /workspaces to move between projects./models or /model <name> to change the active model./memory, /memory search <query>, and /memory stats to inspect durable memory./help in Telegram for the current command reference.Most operational documentation lives in the wiki so it can grow without turning the README into a control panel manual.
make setup # Install in editable mode with dev tools
make lint # Run ruff
make format # Format with ruff
make check # Lint and format check
make test # Run pytest
make run # Start Kai locally
Pull requests are currently restricted to collaborators while the architecture is moving quickly. Issues, bug reports, design feedback, and focused proposals are welcome. See CONTRIBUTING.md.
Kai is released under the Apache License 2.0. See LICENSE for details.