Skip to content

RemoteAgentProxy

autogen.beta.network.remote.RemoteAgentProxy #

Bases: Protocol

Dispatches envelopes from the local hub to a remote participant.

Implementations encode :class:Envelope into the target wire protocol (A2A, gRPC, raw HTTP, message bus, …), perform any transport-side retries, and return when the envelope has been handed off. Any exception raised propagates back to the hub and is surfaced through :meth:HubListener.on_dispatch_failed; the proxy does not need to fan out observability itself.

scheme is the registry key. The hub looks up proxies via the recipient passport's auth.scheme, so a remote agent whose passport carries AuthBlock(scheme="a2a", ...) routes through the proxy registered with scheme = "a2a".

close() is called by :meth:Hub.close (and may be called explicitly by tenants) to release any persistent transport resources — connection pools, background tasks, etc.

scheme instance-attribute #

scheme

dispatch async #

dispatch(envelope, recipient)

Deliver envelope to recipient over the proxy's transport.

Source code in autogen/beta/network/remote.py
async def dispatch(self, envelope: Envelope, recipient: Passport) -> None:
    """Deliver ``envelope`` to ``recipient`` over the proxy's transport."""
    ...

close async #

close()

Release transport resources held by the proxy. Idempotent.

Source code in autogen/beta/network/remote.py
async def close(self) -> None:
    """Release transport resources held by the proxy. Idempotent."""
    ...