Gateway Runtime Seams • AI Agent SDK
GatewayRuntimeSeams: The gateway reliability seams handed to a channel adapter at build time.
GatewayRuntimeSeams
Defined in the protocols module.
AI Agent
The gateway reliability seams handed to a channel adapter at build time.
A single, typed carrier for the four runtime seams the gateway injects so an adapter wires them up in one place instead of via four duck-typed private-attribute splices:
Attributes: identity_resolver: Cross-platform identity resolver; unifies the same human across platforms onto one session key. identity_canonicalizer: Identity-canonicalization seam (Issue #4661) — an :class:IdentityCanonicalizerProtocol (`canonicalize(platform, raw_user_id) -> str) applied before the resolver, e.g. an adapter itself (see :meth:BasePlatformAdapter.canonicalize). Stabilises a volatile platform id (WhatsApp JID→LID, a number↔UUID alias flip) so the same human keeps one session instead of silently forking. delivery_router: Backing router for the built-in send_message` tool, so an agent turn can proactively reach the user mid-task. admission_gate: Gateway-wide admission control (concurrency ceiling / fair queue / backpressure) applied to inbound runs. turn_lock_map: Shared per-turn lock map for cross-platform turn serialisation on the resolved session id.
A seam left `None` means the gateway has nothing to inject for it and the adapter should keep whatever it already has.
Properties
OptionalNo description available.
OptionalNo description available.
OptionalNo description available.
OptionalNo description available.
OptionalNo description available.
Source
View on GitHubpraisonaiagents/bots/protocols.py at line 353