Skip to content

Python: Add Telegram hosting helpers and local samples #6588

Description

Parent: #6265

Build the Telegram protocol conversion seam for app-owned Agent Framework hosting without restoring the deleted channel/host runtime.

Scope

  • Add python/packages/hosting-telegram/** with side-effect-free Telegram Bot API update parsing and AF conversion helpers.
  • Add final and streaming AF response rendering to Telegram Bot API operations.
  • Add python/samples/04-hosting/af-hosting/local_telegram/** with self-contained aiogram polling and FastAPI webhook entry points.
  • Keep polling, webhook registration, authentication, commands, media download, delivery, retries, throttling, and state policy in application code.
  • Update package metadata, sample indexes, and the helper-first hosting design documentation.

Done when

  • Text, captions, supported media, callback data, commands, session isolation, final rendering, and streaming rendering are covered by focused tests.
  • Tests use tests/hosting_telegram/ with no tests/__init__.py.
  • The local polling and webhook samples use an actual Agent Framework agent and native aiogram/FastAPI constructs.
  • Package and sample validation pass.

The Foundry-hosted Telegram + Invocations sample is deferred to the separate Invocations protocol work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

pythonUsage: [Issues, PRs], Target: Python

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions