Skip to content

Python: Channels #6265

@eavanvalkenburg

Description

@eavanvalkenburg

Tracking issue for the Python hosting core + pluggable channels work.

Design: docs/specs/002-python-hosting-channels.md
Overall PR: #6031 (feature/python-hostingmain)

Hosting core (agent-framework-hosting)

  • AgentFrameworkHost(target=..., channels=[...]) — one Starlette app, agent or Workflow target
  • Channel protocol + ChannelContribution (routes/middleware/commands/lifecycle)
  • Host-neutral ChannelRequest envelope + per-request run_hook
  • Session control per request (session_mode auto/required/disabled)
  • Channel-neutral session identity via ChannelSession.isolation_key
  • IdentityResolver seam (channel-native id → isolation_key)
  • IdentityLinker seam (begin/complete link ceremony)
  • ResponseTarget (originating / active / channel / channels / identities / all_linked / none)
  • ChannelPush capability for proactive/cross-channel delivery
  • Background runs (run_in_backgroundContinuationToken, poll routes)
  • Active-channel tracking per isolation_key
  • Host-level Starlette middleware + host.serve(...) / host.app
  • File-based HostStateStore default (survives restart); in-memory for tests
  • Runtime modes (long_running vs ephemeral) + durable task runner seam

Channels

  • ResponsesChannel (agent-framework-hosting-responses) — HTTP+SSE (+ WebSocket transport)
  • InvocationsChannel (agent-framework-hosting-invocations)
  • TelegramChannel (agent-framework-hosting-telegram) — polling + webhook, ChannelCommand catalog, silent attributed echoes
  • ActivityChannel (agent-framework-hosting-activity-protocol) — Azure Bot Service / Teams, push via ConversationReference, slash commands, markdown rendering
  • DiscordChannel (agent-framework-hosting-discord) — interactions + slash commands (Python: add agent-framework-hosting-discord channel #6081)
  • TeamsChannel (agent-framework-hosting-teams) — Teams-native via microsoft/teams.py (Python: add agent-framework-hosting-teams channel (microsoft-teams-apps SDK) #5642)
  • A2AChannel (agent-framework-hosting-a2a)
  • MCPToolChannel (agent-framework-hosting-mcp)

Identity, linking & policy

  • Entra identity linker helper (agent-framework-hosting-entra)
  • One-time-code cross-channel linking ceremony
  • Cross-channel continuity (same isolation_key across channels on one host)
  • LinkPolicy + confidentiality_tier (AllowAll / SameTier / ExplicitAllowList / DenyAll)
  • Authorization profiles (open / forced-link / allowlist) + IdentityAllowlist seam

Cross-channel delivery

  • all_linked fan-out + input replay (echo_input) with per-channel attribution
  • Per-channel response formatting variants (single structured-output call) — sample
  • Unlink eviction hardening (stop delivery after unlink)
  • Identity registry persistence (Cosmos-backed write-through; on-disk fallback)

Samples & docs

  • Hosting Channels sample apps (Python: add hosting Channels sample apps #5645)
  • Self-contained multi-channel Personal Assistant container sample (Telegram + Discord + Activity/Teams + Responses, Entra auth, disk/Cosmos storage, web search + Monty CodeAct)
  • Spec 002-python-hosting-channels.md + hosting channels ADR

Fast-follow / stretch

  • Generic auth helpers (HMAC signature, bearer token middleware)
  • Pluggable cross-host state store (Cosmos / SQL HostStateStore)
  • WhatsApp channel package
  • Direct-to-Teams channel (speculative — Bot-Service-free transport)

Metadata

Metadata

Labels

No fields configured for Feature.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions