Skip to main content

ConversationRequestProtocol

Defined in the protocols module.
AI Agent Protocol for agent-facing cross-conversation request/reply. 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 ask_conversation tool can resolve it. It sends the prompt via the same delivery stack send_message uses, then correlates the next inbound reply from that target (via the existing correlation_id) with a bounded timeout, returning a typed :class:ConversationReply. Example usage (implementation in praisonai_bot.gateway):: requester = BotConversationRequester(router, origin=origin) token = register_conversation_requester(requester) try: … # agent runs; ask_conversation tool resolves the requester finally: clear_conversation_requester(token)

Methods

ask()

Send text to target and await the next correlated reply.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 2664