Skip to main content

Crypto.com Agent Plugin – Telegram

The Crypto.com Agent Plugin – Telegram adds support for Telegram bots to the Crypto.com Agent Client ecosystem. This plugin enables conversational agents to operate directly within Telegram chats using the standard Agent SDK lifecycle and plugin system.

Features

Telegram Integration

  • Create conversational agents that respond directly to Telegram messages.
  • Handles /start and free-text message commands.
  • Automatically splits long messages (>4096 characters).
  • Uses Telegram’s polling API.

Plugin Architecture

  • Packaged as a standalone Python plugin.
  • Uses Python entry points and PEP 621 standards (pyproject.toml).
  • Implements the standard AgentPlugin interface with setup() and run() lifecycle hooks.
  • Declares its role as a primary plugin — meaning it can control the main execution loop (only one such plugin is allowed at a time).

Easy to Install and Extend

  • Fully decoupled from the core agent client.
  • Compatible with other plugins (e.g., storage, LangFuse, CLI).
  • Automatically discovered and initialized by the SDK.

Installation

Install the plugin into your environment:

pip install cryptocom-agent-plugin-telegram

Usage

Importing the Plugin

from crypto_com_agent_plugin_telegram import TelegramPlugin

Using with the Agent SDK

from crypto_com_agent_client import Agent

telegram_plugin = TelegramPlugin(bot_token="YOUR_TELEGRAM_BOT_TOKEN")

agent = Agent.init(
    llm_config={...},
    blockchain_config={...},
    plugins={...},
    plugin_instances=[telegram_plugin],
)

agent.start()

Plugin Lifecycle

This plugin defines:

  • mode = "primary" — only one primary plugin is started with agent.start().
  • setup(handler) — sets up Telegram handlers for messages and commands.
  • run() — starts the Telegram polling loop.
  • Optional on_ready(handler) for support-mode plugins (not used here).

Example

from crypto_com_agent_client import Agent
from crypto_com_agent_plugin_telegram import TelegramPlugin

telegram = TelegramPlugin(bot_token="123:abc...")

agent = Agent.init(
    llm_config={
        "provider": "OpenAI",
        "model": "gpt-4",
        "provider-api-key": "sk-...",
    },
    blockchain_config={
        "api-key": "YOUR_SDK_API_KEY",
    },
    plugins={
        "personality": {
            "tone": "friendly",
            "language": "English",
            "verbosity": "high",
        },
        "instructions": "Be helpful and concise.",
    },
    plugin_instances=[telegram],
)

agent.start()

Entry Point Declaration

This plugin is auto-discoverable via pyproject.toml:

[tool.poetry.plugins."crypto_com_agent.plugins"]
telegram = "crypto_com_agent_plugin_telegram:TelegramPlugin"

The Agent SDK uses this to dynamically discover and load plugins.

File Structure

crypto_com_agent_plugin_telegram/
├── __init__.py
└── telegram.py  # Main plugin implementation

Contributing

We welcome contributions! Please ensure your plugin follows the AgentPlugin interface and includes proper setup and lifecycle hooks.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Let me know if you’d like a pyproject.toml snippet included too, or a quickstart test script.

Metadata

Release files for cryptocom-agent-plugin-telegram 1.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cryptocom-agent-plugin-telegram 1.1.6
File Interpreter ABI Platform
cryptocom_agent_plugin_telegram-1.1.6-py3-none-any.whl Python 3 none any Details

Release files / cryptocom_agent_plugin_telegram-1.1.6-py3-none-any.whl

Download URL cryptocom_agent_plugin_telegram-1.1.6-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e28891e24612a96253aca3370ed836608cc19ce807439d9efb56cde696285f7
BLAKE2b-256 checksum
How to use checksums
f511c6e3b431a846bb3b2ccdb9c9a40398c76fb12bf888110b5e964202ed74db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for cryptocom-agent-plugin-telegram 1.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.6 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page