Skip to main content

Control a local Kimi Code agent from Feishu or Telegram

Project description

kimi-bridge

Control a local Kimi Code agent from an instant-messaging conversation.

kimi-bridge supervises Kimi Code's local server, keeps chat-to-session bindings across restarts, streams editable replies, and brings approvals, questions, steering, files, thinking output, and session controls into your chat client.

Support

Surface Status Validation
Feishu direct messages Supported Live-validated end to end
Telegram private chats Experimental Fake Bot API tests only; not live-validated
Linux, Python ≥3.11 Supported Hosted tests on 3.11 and 3.13
macOS and Windows Not currently supported

Only one adapter runs in each bridge process. Feishu uses the official lark-oapi WebSocket client. Telegram uses a small handwritten httpx Bot API transport without a Telegram framework.

Features

  • Durable Kimi session creation, listing, switching, renaming, inspection, compaction, and undo.
  • Edit-in-place answer streaming, router-side chunking, and optional separate thinking output.
  • Interactive approvals and questions with timeout handling and stale-action protection.
  • Busy-turn prompt steering, cancellation, permission modes, model/effort/plan controls, goals, tasks, skills, and read-only MCP inspection.
  • Inbound images and files plus workspace-contained outbound /send.
  • Private-chat allowlists, loopback-only Kimi server supervision, and a secret-safe non-starting doctor command.

Quick start

Install and authenticate official Kimi Code, then install uv and kimi-bridge.

For Feishu:

uv tool install 'kimi-bridge[feishu]'

For the experimental Telegram adapter:

uv tool install kimi-bridge

Create ~/.kimi-bridge/config.toml for one adapter, protect it with chmod 600, and validate the installation without starting the server or connecting to chat:

kimi-bridge doctor

Then run:

kimi-bridge

Start with the installation runbook, especially when asking a coding agent to configure the bridge. The configuration reference contains complete Feishu and Telegram examples.

Commands

Commands cover:

  • sessions: /new, /sessions, /switch, /status, /title, /usage, /compact, /undo;
  • control: /mode, /model, /effort, /plan, /goal, /stop;
  • tasks and tools: /tasks, /skills, /mcp;
  • output: /send, /render-thinking.

Use /help in chat or read the command reference for exact grammar, busy-session behavior, and platform media semantics.

Architecture and security

Feishu or experimental Telegram
              │
              ▼
       semantic chat router
              │
              ▼
  supervised local `kimi web`

The Kimi client owns all REST, WebSocket, version, and process-lifecycle details. The router owns platform-neutral session and interaction behavior. Each adapter owns its native transport and UI payloads. See Architecture for the full boundary.

The managed Kimi server binds to loopback and uses its generated bearer token. Chat access is restricted by the selected adapter's allowlist, but kimi-bridge is designed for one trusted operator, not mutually untrusted tenants. A permitted Kimi agent can read, write, and execute within the authority of the host account, so protect both the host and chat credentials.

Tested Kimi Code versions are recorded in a packaged compatibility manifest. An unlisted official version emits a loud warning and is attempted against the live contract; legacy Python kimi-cli, an unrecognized product, or an executable/server version mismatch fails. Run kimi-bridge doctor after every Kimi or bridge upgrade.

Documentation

Development

uv sync --all-extras --dev
uv run pytest -q
uv run ruff check .
uv run python scripts/check_docs.py
uv run python scripts/smoke_server.py

Unit tests use fake Kimi, Feishu, Telegram, WebSocket, state, and process boundaries. The smoke script is the explicit authenticated local-server check; hosted checks use no credentials or inference.

License

MIT © 2026 Mtrya

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kimi_bridge-0.1.0.tar.gz (200.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kimi_bridge-0.1.0-py3-none-any.whl (106.7 kB view details)

Uploaded Python 3

File details

Details for the file kimi_bridge-0.1.0.tar.gz.

File metadata

  • Download URL: kimi_bridge-0.1.0.tar.gz
  • Upload date:
  • Size: 200.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for kimi_bridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9bf9fb729ebb64c4920fdaced8642b5904b8dda2fe8278047d3fc5e214688dc1
MD5 6c4b2eb8799d22000630134e3fcc464a
BLAKE2b-256 bfa4e76c078e96e9b4f305d03cc9343b5c56a62c8ca8ad488ad127fa0fefb561

See more details on using hashes here.

Provenance

The following attestation bundles were made for kimi_bridge-0.1.0.tar.gz:

Publisher: release.yml on Mtrya/kimi-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kimi_bridge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kimi_bridge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 106.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for kimi_bridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b48287c384332d18e8f270ed3524f17e771c8b053249ef1ae4abf9dd8b3f9328
MD5 ef4bb5968873b9fa9adf2d8a00a57251
BLAKE2b-256 ce03fbd1e1ade61dfa7b05c0af42b7be0e1a6c04e3f659c971ee7cefc46120e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for kimi_bridge-0.1.0-py3-none-any.whl:

Publisher: release.yml on Mtrya/kimi-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page