Skip to main content

Bridge Feishu to ACP-compatible agents with automatic session management for non-developers.

Project description

ACP Bridge

ACP Bridge is a bridge service that connects Feishu (Lark) group chats to ACP-compatible AI agents (such as Kiro CLI).

Core features:

  • Auto session creation — @mention the bot in group chats, or just send a message in DM
  • Message threading via reply chains — reply to any message in a thread to continue the conversation
  • LRU + TTL session management — automatic eviction of idle sessions to control resource usage
  • Message buffering — messages sent while the agent is busy are queued and delivered in order

Installation

Prerequisites

  • Python 3.11+
  • uv package manager

Feishu App Setup

  1. Go to the Feishu Open Platform and create a new app.
  2. Under Credentials, copy the App ID and App Secret.
  3. Under Event Subscriptions, enable WebSocket (long connection) mode, then add the im.message.receive_v1 event.
  4. Under Permissions, enable:
    • im:message — send and update messages
    • im:message:send_as_bot — send messages as bot
    • im:message.group_at_msg:readonly — receive group chat messages with @mention
    • im:message.group_msg — receive all group messages (required for reply-chain routing)
    • im:message.p2p_msg:readonly — receive P2P messages
    • im:resource — download file resources from messages
    • im:chat:readonly — read chat info

Steps

  1. Install dependencies:

    uv sync
    
  2. Generate a config file:

    uv run python -m acp_bridge.main init
    
  3. Edit bridge.toml with your Feishu app credentials:

    [feishu]
    app_id = "your_app_id"
    app_secret = "your_app_secret"
    
    [bridge]
    default_workspace = "~"
    auto_approve = false
    max_sessions = 10
    session_ttl_minutes = 60
    show_thinking = false
    show_intermediate = false
    
    [agent]
    name = "kiro"
    description = "Kiro CLI - https://kiro.dev/cli/"
    command = "kiro-cli"
    args = ["acp"]
    auto_approve = false
    
  4. Start the service:

    uv run python -m acp_bridge.main run
    

Tip: It's recommended to run in tmux so it persists in the background:

tmux new -s acp-bridge "uv run python -m acp_bridge.main run"

Commands

Command Description
#mode Show available modes and current mode
#mode <value> Switch to a different mode
#model Show available models and current model
#model <value> Switch to a different model
#cancel Cancel ongoing agent operation
#end End current agent session
#read <file_path> Read local file content
#diff [args] Show git diff
#session Show current agent session info
#sessions Show all active sessions
#help Show help message

License

MIT License. See LICENSE for details.

This project is derived from Juan by DiscreteTom.

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

acp_bridge-1.0.0.tar.gz (110.8 kB view details)

Uploaded Source

Built Distribution

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

acp_bridge-1.0.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file acp_bridge-1.0.0.tar.gz.

File metadata

  • Download URL: acp_bridge-1.0.0.tar.gz
  • Upload date:
  • Size: 110.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acp_bridge-1.0.0.tar.gz
Algorithm Hash digest
SHA256 30337c8a06fff368da2498cc34ad6b12af218665aed0991ca368c3f57c6f398c
MD5 493e66dc29937956e0ce14700c414ba1
BLAKE2b-256 10ab788bcb5b4a653e44ac99928d49b38f9dd90d212aa1e490a89466f34158b1

See more details on using hashes here.

File details

Details for the file acp_bridge-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: acp_bridge-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for acp_bridge-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dc36b0c0a7c8f05189dd818ded8d4ed5f81f99659e67533ad9358d3376e238c
MD5 f437a92c80c60536068671fb13282bf0
BLAKE2b-256 ebdf5d2890c324610fc734d21f32e11b5df4ab38993d19719bca0d05420507d8

See more details on using hashes here.

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