a2a.server.context module

Defines the ServerCallContext class.

class a2a.server.context.ServerCallContext(*, state: MutableMapping[str, ~typing.Any]=<factory>, user: User = <factory>, tenant: str = '', requested_extensions: set[str] = <factory>)

Bases: BaseModel

A context passed when calling a server method.

This class allows storing arbitrary user data in the state attribute.

model_config = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

requested_extensions: set[str]
state: MutableMapping[str, Any]
tenant: str
user: User