dragon.ai.agent.communication.protocol.CommunicationProtocol

class CommunicationProtocol[source]

Bases: ABC

Abstract communication protocol used by Dragon agents.

receive — read from the agent’s own input queue. send — send a message to another agent’s queue (reserved for

future use; not called by dispatchers in the current implementation).

__init__()

Methods

__init__()

receive([timeout])

Await a message on the agent's own input queue.

send(message)

Send message to the recipient's queue.

abstractmethod send(message: Message) None [source]

Send message to the recipient’s queue.

The concrete implementation should deserialize the target queue from message.recipient_serialized_queue and put the serialized message onto it.

Note

Not used by the current dispatcher-based flow but kept for future development (e.g. direct agent-to-agent or A2A communication).

abstractmethod async receive(timeout: float | None = None) Message | None [source]

Await a message on the agent’s own input queue.

Parameters

timeout:

Maximum seconds to wait. None means block indefinitely.

Returns

Message or None

The deserialized message, or None if timeout was reached.