Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

elizaOS Telegram Plugin (Python)

Telegram bot integration for elizaOS agents.

Features

  • Telegram bot message handling
  • Support for private chats, groups, and supergroups
  • Forum topic support for supergroups
  • Entity synchronization
  • Reaction handling
  • Button support (login and URL buttons)

Installation

pip install elizaos-plugin-telegram

Configuration

The plugin requires the following environment variables:

  • TELEGRAM_BOT_TOKEN (required): Your Telegram Bot API token
  • TELEGRAM_API_ROOT (optional): Custom API root URL (default: https://api.telegram.org)
  • TELEGRAM_ALLOWED_CHATS (optional): JSON array of allowed chat IDs

Usage

from elizaos_plugin_telegram import TelegramService, TelegramConfig

# Create configuration
config = TelegramConfig.from_env()

# Initialize service
service = TelegramService(config)

# Start the bot
await service.start()

Event Types

The plugin emits the following event types:

  • TELEGRAM_WORLD_JOINED - Bot joined a new chat
  • TELEGRAM_WORLD_CONNECTED - Bot connected to existing chat
  • TELEGRAM_WORLD_LEFT - Bot left a chat
  • TELEGRAM_ENTITY_JOINED - User joined a chat
  • TELEGRAM_ENTITY_LEFT - User left a chat
  • TELEGRAM_ENTITY_UPDATED - User information updated
  • TELEGRAM_MESSAGE_RECEIVED - Message received
  • TELEGRAM_MESSAGE_SENT - Message sent
  • TELEGRAM_REACTION_RECEIVED - Reaction received
  • TELEGRAM_SLASH_START - /start command received

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Type checking
mypy elizaos_plugin_telegram

# Linting
ruff check elizaos_plugin_telegram
ruff format elizaos_plugin_telegram

License

MIT

Download files

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

Source Distribution

elizaos_plugin_telegram-2.0.0a5.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

elizaos_plugin_telegram-2.0.0a5-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file elizaos_plugin_telegram-2.0.0a5.tar.gz.

File metadata

File hashes

Hashes for elizaos_plugin_telegram-2.0.0a5.tar.gz
Algorithm Hash digest
SHA256 a9bbd04dc82a30e1b2ec480d25ee7eb641f9bea2315b440a54fdb86903301a8d
MD5 914dfe322329784582c35e98b76e6f20
BLAKE2b-256 ed2b39f7ebfe2cdbb0f80d090cbb4cd5665e219839ba9c47f2a7fc4adbc3bb8a

See more details on using hashes here.

File details

Details for the file elizaos_plugin_telegram-2.0.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for elizaos_plugin_telegram-2.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 b4e1527ee0c2a6c7d733a8b4a930a56bdec9ce3ccec1562206024ef4e37a9d71
MD5 98f134c080c7c30ef6e589ef02319c33
BLAKE2b-256 8186876c3d1cb48210f5775ba662e6d2495783a993f07c1835da0cbcd16d77fb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0a5 This release

2 files

Supported by

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