OptionalagentOptional pre-built AgentCard object or path to agent card JSON
OptionalallowExplicit escape hatch to mount the A2A surface WITHOUT authentication.
This is intentionally insecure and must only be used for local, trusted
development where the surface is not network reachable. When set to
true (and no ToA2aOptions.authentication is provided), a loud
warning is logged and the handlers are mounted with no authentication.
Defaults to false, which makes toA2a fail closed.
OptionalappOptional existing express application
OptionalartifactOptional artifact service
OptionalauthenticationAuthenticator used to validate incoming A2A requests.
A2A is the production-intended inter-agent surface: any network-reachable
caller that can reach it can invoke the agent and its tools with arbitrary
input and read the output. Provide a UserBuilder (from
@a2a-js/sdk/server/express) that validates the request's credentials —
for example a bearer token or an OIDC ID token — and it will be wired into
both the REST and JSON-RPC handlers.
When omitted, toA2a fails closed and throws unless
ToA2aOptions.allowUnauthenticated is explicitly set to true.
OptionalbaseThe base path for the A2A RPC URL (default: "a2a")
OptionalhostThe host for the A2A RPC URL (default: "localhost")
OptionalmemoryOptional memory service
OptionalportThe port for the A2A RPC URL (default: 8000)
OptionalprotocolThe protocol for the A2A RPC URL (default: "http")
OptionalrunnerOptional pre-built Runner object
OptionalsessionOptional session service
Options for the
toA2afunction.