a2a_pack.frontend
FrontendConfig (class)
FrontendConfig(path: 'str' = 'frontend', dist: 'str' = 'dist', mount: 'str' = '/app', build: 'str | None' = None, auth: 'str' = 'inherit', kind: 'str' = 'static', docs_url: 'str' = 'https://docs.a2acloud.io/') -> NoneManifest declaration for a static frontend packed with an agent.
__init__ (method)
__init__(self, path: 'str' = 'frontend', dist: 'str' = 'dist', mount: 'str' = '/app', build: 'str | None' = None, auth: 'str' = 'inherit', kind: 'str' = 'static', docs_url: 'str' = 'https://docs.a2acloud.io/') -> NoneInitialize self. See help(type(self)) for accurate signature.
dist_dir (method)
dist_dir(self, project: 'Path') -> 'Path'(no docstring)
source_dir (method)
source_dir(self, project: 'Path') -> 'Path'(no docstring)
PackedFrontend (class)
PackedFrontend(dist_dir: 'Path', mount: 'str' = '/app', auth: 'str' = 'inherit', docs_url: 'str' = 'https://docs.a2acloud.io/') -> NoneResolved frontend assets ready to serve from the agent process.
__init__ (method)
__init__(self, dist_dir: 'Path', mount: 'str' = '/app', auth: 'str' = 'inherit', docs_url: 'str' = 'https://docs.a2acloud.io/') -> NoneInitialize self. See help(type(self)) for accurate signature.
export_frontend_env (function)
export_frontend_env(frontend: 'PackedFrontend | None') -> 'None'Expose a resolved frontend to build_app across uvicorn reloads.
frontend_config_payload (function)
frontend_config_payload(agent: 'A2AAgent', frontend: 'PackedFrontend', request: 'Request') -> 'dict[str, Any]'(no docstring)
frontend_requires_session (function)
frontend_requires_session(frontend: 'PackedFrontend | FrontendConfig') -> 'bool'(no docstring)
frontend_ui_metadata (function)
frontend_ui_metadata(frontend: 'PackedFrontend', request: 'Request | None' = None) -> 'dict[str, Any]'(no docstring)
load_frontend_config (function)
load_frontend_config(project: 'Path', config: 'dict[str, Any] | None' = None) -> 'FrontendConfig | None'Read the optional frontend section from a2a.yaml.
mount_packed_frontend (function)
mount_packed_frontend(app: 'FastAPI', agent: 'A2AAgent', frontend: 'PackedFrontend', *, require_session: 'Callable[[Request], Awaitable[Response | None]] | None' = None) -> 'None'(no docstring)
packed_frontend_from_env (function)
packed_frontend_from_env() -> 'PackedFrontend | None'(no docstring)
resolve_packed_frontend (function)
resolve_packed_frontend(project: 'Path', config: 'dict[str, Any] | None' = None, *, require_dist: 'bool' = True) -> 'PackedFrontend | None'(no docstring)
skills_payload (function)
skills_payload(agent: 'A2AAgent', request: 'Request | None' = None) -> 'dict[str, Any]'(no docstring)
Source: apps/a2a/a2a_pack/frontend.py