Skip to content

SessionManifest

autogen.beta.network.session.SessionManifest dataclass #

SessionManifest(type, version=1, participants=(lambda: ParticipantSchema(min=2))(), knobs_schema=dict(), default_view_policy='full_transcript', expectations=list())

Adapter dispatch key + protocol-shape declaration.

The manifest is data only — adapters live in code (see adapters/base.py). The hub looks up the adapter by (type, version) at session create time and snapshots the manifest into SessionMetadata.manifest.

type instance-attribute #

type

version class-attribute instance-attribute #

version = 1

participants class-attribute instance-attribute #

participants = field(default_factory=lambda: ParticipantSchema(min=2))

knobs_schema class-attribute instance-attribute #

knobs_schema = field(default_factory=dict)

default_view_policy class-attribute instance-attribute #

default_view_policy = 'full_transcript'

expectations class-attribute instance-attribute #

expectations = field(default_factory=list)

to_dict #

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

from_dict classmethod #

from_dict(data)
Source code in autogen/beta/network/session.py
@classmethod
def from_dict(cls, data: dict[str, Any]) -> "SessionManifest":
    payload = dict(data)
    if isinstance(payload.get("participants"), dict):
        payload["participants"] = ParticipantSchema(**payload["participants"])
    if "expectations" in payload:
        payload["expectations"] = [Expectation(**e) if isinstance(e, dict) else e for e in payload["expectations"]]
    return cls(**payload)