Gateway Status Protocol • AI Agent SDK
GatewayStatusProtocol: Protocol for agent-facing, read-only live status/health reporting.
GatewayStatusProtocol
Defined in the protocols module.
AI Agent
Protocol for agent-facing, read-only live status/health reporting.
A concrete implementation is provided by the running gateway/bot (in the praisonai wrapper) and registered into the per-turn context so the built-in `gateway_status tool can resolve it. It reads the same live objects the HTTP endpoints already serve (health() / metrics_snapshot() / the session registry) and returns a redaction-aware, visibility-scoped :class:GatewayStatus`.
Example usage (implementation in praisonai_bot.gateway)::
status = BotGatewayStatus(gateway) token = register_gateway_status(status) try: … # agent runs; gateway_status tool resolves the source finally: clear_gateway_status(token)
Methods
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 3994