Skip to main content

ACP bridge for a Telegram userbot backed chat

Project description

Telegram ACP

telegram-acp exposes a small ACP relay package for a Kurigram userbot.

Flow:

  1. An ACP client sends a prompt turn with text and/or media blocks.
  2. The relay sends those blocks to a configured Telegram chat.
  3. Incoming messages from that Telegram chat are streamed back to ACP as session/update events.

Supported directions:

  • ACP -> Telegram: text, image, video, gif, file
  • Telegram -> ACP: text, image, video, gif, file

Notes:

  • The relay is designed for one target chat and one active ACP conversation at a time.
  • Telegram videos/gifs/files are returned to ACP as embedded binary resources.
  • Telegram photos are returned as ACP image blocks.
  • Incoming Telegram messages are acknowledged with raw MTProto ReadHistory.

Credentials

The runtime reads credentials from .env:

TELEGRAM_API_ID=...
TELEGRAM_API_HASH=...

You can create a Telegram app from here to obtain an API id and hash.

CLI

uv run telegram-acp --target-chat @target_bot --session-name telegram_acp

Useful flags:

  • --target-chat @bot_or_chat_id
  • --session-name telegram_acp
  • --first-response-timeout 120
  • --idle-timeout 4
  • --dotenv-path .env
  • --workdir .

The command runs over ACP stdio, so an ACP-capable client should spawn it directly.

SDK

Programmatic use lives under src/telegram_acp:

  • telegram_acp.build_bridge(...)
  • telegram_acp.build_agent(...)
  • telegram_acp.run_telegram_acp_agent(...)

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

telegram_acp-0.1.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

telegram_acp-0.1.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for telegram_acp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc042b1bcb3437ac39b5b7478c511417a7f928f7c7114dc862e1722ef62753b7
MD5 9d0746508ba182b719a646d5e7c24f65
BLAKE2b-256 7c13d4a000a2da535032210d8d73f4d90c504c06653ce9d8be449a87997692fc

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on vcoderun/telegram-acp

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

File details

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

File metadata

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

File hashes

Hashes for telegram_acp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 295fa5767a862724d130e1cebd6cc1be69fba423a334d726cc4d021c3ace66e5
MD5 202445fe04d1499e920254eb1cb85c0b
BLAKE2b-256 32659c04320b06235e597b595b73f841069a72fc4b0ada889708bf3e48907edc

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on vcoderun/telegram-acp

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