Kai is a Telegram bot that wraps a persistent Claude Code process. You send messages in Telegram, and Claude responds with full tool access: it can read and edit files, run commands, manage git branches, search the web, and work across multiple projects. Responses stream back in real time. Everything runs on your own machine.
*How I actually use it:* I point Kai at a project workspace and use it as a dev assistant. It has the full context of whatever repo it's looking at - it can read and write code, check git status, run tests, make commits. Switching between projects is a Telegram command. I can be away from my desk and tell it "fix the failing CI on the web repo" or "add input validation to the signup form" and it just does it.
*Background:* I originally ran an instance of an open-source bot framework, but shut it down after a few days due to security concerns. I rebuilt from scratch on top of Claude Code's CLI, which handles sandboxing and tool execution properly.
*No AI API keys required:* Kai doesn't call the Anthropic API directly - it wraps a logged-in Claude Code session, so there are no API keys to manage and no per-token costs beyond your existing Claude Code subscription. The original design eliminated all API keys after security problems with another bot framework that managed them insecurely. Now that Kai runs on a trustworthy local foundation, optional service integrations are safe.
*Privacy angle:* Kai runs locally - on a Mac mini in my case. Conversations, credentials, and project files never leave the machine. There's no server component, no cloud relay. Your Telegram messages go to your machine, and Claude Code handles the rest through Anthropic's API directly.
*External services without MCP:* Kai has a declarative HTTP service layer for connecting to any REST API. You define services in a YAML config - URL, method, auth type - and Kai makes the HTTP calls directly. No plugins, no third-party server processes, no executable code. API keys stay in your `.env` and are never touched by intermediary code. Ships with a Perplexity config for web search, but the same pattern works for weather APIs, notification services (Pushover, ntfy), home automation, translation, or anything else with a REST endpoint. Entirely optional - Kai works fine without it.
*Some things it can do:*
- Connect to external REST APIs via declarative config (search, weather, notifications, etc.) - Transcribe voice messages locally (whisper.cpp) and respond with voice (Piper TTS) - Run scheduled jobs and reminders - Receive GitHub webhooks (push, PR, issue notifications) - Stream responses in real time (message updates every 2s) - Switch between workspaces and models via Telegram commands
It's a single Python package, about 1700 lines across 11 modules. Runs as a launchd/systemd service. Setup is: clone, pip install, set two env vars (Telegram token + your user ID), and `make run`.
Repo: https://github.com/dcellison/kai
Happy to answer any questions about the setup or architecture.