Skip to main content

Telegram channel for Kestrel agents — isolated-venv feature (Telegram Bot API).

Project description

kestrel-channel-telegram

Telegram channel for Kestrel agents — an isolated-venv feature where the agent talks over a Telegram bot it owns (a Bot API token), not a device grafted onto a personal account.

Unlike the WhatsApp channel (a companion device linked to a personal number), Telegram gives the agent its own identity with almost no friction:

  • Create a bot with @BotFather → you get a token. No phone number, no QR, no linked device.
  • You DM the bot; the agent replies as the bot.
  • Access is default-deny: with an empty allowed_senders the bot replies to no one. Send /start to the bot and it tells you your Telegram user id; add that id (or your @username) to allowed_senders to enable the conversation.

How it works

The package has two roles (same shape as kestrel-channel-whatsapp):

  • Discovery marker TelegramFeature (SDK-only) — installed into the host.
  • Transport service kestrel_channel_telegram.service — its only dep is httpx (the [service] extra), installed by the host loader into a per-agent isolated venv and run as the kestrel-telegram-service console script over the SDK stdio JSON-RPC contract.

The service:

  • registers telegram_send, telegram_status, telegram_link tools;
  • long-polls the Bot API (getUpdates) for inbound and emits channel.inbound for allowed senders (routed into ChannelFeature.handle_inbound);
  • sends via sendMessage.

Config

key meaning
enabled turn the channel on/off
token Bot API token from @BotFather (the agent's identity)
allowed_senders Telegram numeric user ids or @usernames allowed to DM the agent. Empty = deny all.

Development

uv run --no-project --with "kestrel-sovereign-sdk>=0.29.0" --with httpx \
  --with pytest --with pytest-asyncio python -m pytest -q

Release

Bump version in pyproject.toml (+ uv.lock), tag vX.Y.Z; publish.yml verifies the tag matches and publishes to PyPI via OIDC trusted publishing (environment: pypi).

License

MIT

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

kestrel_channel_telegram-0.1.0.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

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

kestrel_channel_telegram-0.1.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kestrel_channel_telegram-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47aaac568f5e8192ce1155894d1b8760fc9cf2d4efc1ecdfd0faba5a75e502b4
MD5 cc408a93dba36a796cebcf94074f78b3
BLAKE2b-256 3cc0f46eb8f23bf0248df23643ab5fd4a22df1406ac86ae4643ef31b39d8e9f0

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on KestrelSovereignAI/kestrel-channel-telegram

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

File details

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

File metadata

File hashes

Hashes for kestrel_channel_telegram-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b87835eea31819fbf7485f472bd23242869e09eb9352d9d285741093d204ea60
MD5 db89e63ddaf66808691db2950aec4c99
BLAKE2b-256 c3e612dafa59d11c8624af2a5a2beee76e63ea70f37fae805dd3f6f5b4dea32f

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on KestrelSovereignAI/kestrel-channel-telegram

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