Skip to main content

Control a local Kimi Code agent from Feishu, QQ, 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
Feishu direct messages Supported
WeChat bot Not currently supported
Telegram private chats Experimental
QQ C2C (private chats) Supported
Linux, Python ≥3.11 Supported
macOS and Windows Experimental
Voice messages Not currently supported

Only one adapter runs in each bridge process. Feishu uses the official lark-oapi WebSocket client. Telegram and QQ use small handwritten httpx/websockets transports without a platform SDK dependency.

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

The easiest path: open any CLI agent and say — "Read https://github.com/Mtrya/kimi-bridge/blob/main/INSTALL_AI.md and help me configure kimi-bridge." The agent interviews you and runs the setup end to end.

Manual skeleton — requires authenticated Kimi Code and uv:

uv tool install 'kimi-bridge'     # install
# create ~/.kimi-bridge/config.toml for one adapter, chmod 600
kimi-bridge doctor                # validate without starting anything
kimi-bridge                       # run

Full walkthrough in INSTALL.md; complete adapter examples in the configuration reference.

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. Send /<command> ? for detailed in-chat usage, including sub-forms such as /tasks show ?.

Architecture and security

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

The managed Kimi server binds to loopback with a generated bearer token, and chat access is restricted by the adapter's allowlist. kimi-bridge is designed for one trusted operator, not mutually untrusted tenants: a permitted Kimi agent can read, write, and execute with the host account's authority, so protect both the host and chat credentials. Component boundaries and the Kimi Code compatibility policy (kimi-bridge compat) live in Architecture.

Documentation

Development

uv sync --dev
uv run pytest -q
uv run ruff check .

Unit tests use fake Kimi, Feishu, Telegram, QQ, WebSocket, state, and process boundaries; 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.4.2.tar.gz (257.7 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.4.2-py3-none-any.whl (127.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kimi_bridge-0.4.2.tar.gz
  • Upload date:
  • Size: 257.7 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.4.2.tar.gz
Algorithm Hash digest
SHA256 1f704a41e27fca58fdf5db6651544292e5eb036b99c0f421b67c9dbb6507e499
MD5 4afbf01b482209cecf8f9afffdd55436
BLAKE2b-256 d17fe7f67e89e32f701be4576ec00f85e4e960757f574694c0b677ca74957f61

See more details on using hashes here.

Provenance

The following attestation bundles were made for kimi_bridge-0.4.2.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.4.2-py3-none-any.whl.

File metadata

  • Download URL: kimi_bridge-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 127.1 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.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fda06613c2ec0a982b80e7b2f3d90ec16203162517c4a1d91492a339cf04a5b4
MD5 845e1104bae3c736038dea04fbb9aa18
BLAKE2b-256 1b3d32126b9d183b87695b3fdf312863ddb0b596d8c278a5f5ebe6a8ca54e9f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for kimi_bridge-0.4.2-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