Skip to content

NetworkClient

autogen.beta.network.client.network_client.NetworkClient #

Bases: Protocol

A participant in a network.

The Protocol surface covers identity, inbound delivery, and disconnect. Session-opening lives on AgentClient rather than the Protocol so non-agent participants (UI bridges, admin tools) can refuse to initiate sessions if that doesn't make sense for them.

agent_id property #

agent_id

passport property #

passport

resume property #

resume

receive async #

receive(envelope)

Hub delivers an envelope to this participant.

Implementations translate it into the local execution model — Agent.ask for AgentClient, queue push for HumanClient, etc.

Source code in autogen/beta/network/client/network_client.py
async def receive(self, envelope: Envelope) -> None:
    """Hub delivers an envelope to this participant.

    Implementations translate it into the local execution model —
    ``Agent.ask`` for ``AgentClient``, queue push for
    ``HumanClient``, etc.
    """
    ...

disconnect async #

disconnect()

Tear down resources. Idempotent.

Source code in autogen/beta/network/client/network_client.py
async def disconnect(self) -> None:
    """Tear down resources. Idempotent."""
    ...