Skip to content

Passport

autogen.beta.network.identity.Passport dataclass #

Passport(name, owner='', provider=None, model=None, cost=None, region=None, auth=AuthBlock(), kind=None, hub_id=None, version=1, agent_id=None, created_at='')

Immutable identity + billing record for one registration.

agent_id is hub-stamped at registration. Mutating any field requires unregister + re-register, which yields a fresh agent_id.

kind discriminates participant types — "agent" (default LLM participant), "human" (out-of-band non-LLM participant driven by an external UI), or "remote_agent" (a participant that lives on another hub; the local hub holds the passport as a cache and dispatches to it via a registered RemoteAgentProxy). None is treated as "agent" for back-compat with passports persisted before this field existed.

hub_id is None for every locally-registered participant. For remote participants the local hub caches, it carries the originating hub's identifier so the canonical URN form is f"hub://{hub_id}/{agent_id}".

name instance-attribute #

name

owner class-attribute instance-attribute #

owner = ''

provider class-attribute instance-attribute #

provider = None

model class-attribute instance-attribute #

model = None

cost class-attribute instance-attribute #

cost = None

region class-attribute instance-attribute #

region = None

auth class-attribute instance-attribute #

auth = field(default_factory=AuthBlock)

kind class-attribute instance-attribute #

kind = None

hub_id class-attribute instance-attribute #

hub_id = None

version class-attribute instance-attribute #

version = 1

agent_id class-attribute instance-attribute #

agent_id = None

created_at class-attribute instance-attribute #

created_at = ''

effective_kind property #

effective_kind

Resolved kindNone falls through to "agent".

to_dict #

to_dict()
Source code in autogen/beta/network/identity.py
def to_dict(self) -> dict[str, Any]:
    return asdict(self)

from_dict classmethod #

from_dict(data)
Source code in autogen/beta/network/identity.py
@classmethod
def from_dict(cls, data: dict[str, Any]) -> "Passport":
    payload = dict(data)
    if isinstance(payload.get("auth"), dict):
        payload["auth"] = AuthBlock(**payload["auth"])
    if isinstance(payload.get("cost"), dict):
        payload["cost"] = CostProfile(**payload["cost"])
    return cls(**payload)