Skip to content
providerkit
GitHub

createA2AServer

function createA2AServer<I, O>(options): object;

Defined in: agents/src/a2a/server.ts:252

Web-standard handler. Work belongs to runs, not to the request or a stream reader. The host must retain the process for memory runs; production uses a durable run-service binding.

Type Parameter Default type
I AgentInput
O unknown
Parameter Type
options A2AServerOptions<I, O>
card: (version) => Promise<A2AAgentCard>;
Parameter Type Default value
version A2AVersion "1.0"

Promise<A2AAgentCard>

close(): Promise<void>;

Detaches this handler’s observers, never cancels work held by runs.

Promise<void>

fetch(request): Promise<Response>;
Parameter Type
request Request

Promise<Response>

refresh(principal, id): Promise<A2ATask>;

Explicit host reconciliation/read, also useful after an out-of-band segment completes.

Parameter Type
principal A2APrincipal
id string

Promise<A2ATask>