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 Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
I |
AgentInput |
O |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
A2AServerOptions<I, O> |
Returns
Section titled “Returns”card: (version) => Promise<A2AAgentCard>;Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
version |
A2AVersion |
"1.0" |
Returns
Section titled “Returns”Promise<A2AAgentCard>
close()
Section titled “close()”close(): Promise<void>;Detaches this handler’s observers, never cancels work held by runs.
Returns
Section titled “Returns”Promise<void>
fetch()
Section titled “fetch()”fetch(request): Promise<Response>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request |
Request |
Returns
Section titled “Returns”Promise<Response>
refresh()
Section titled “refresh()”refresh(principal, id): Promise<A2ATask>;Explicit host reconciliation/read, also useful after an out-of-band segment completes.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
principal |
A2APrincipal |
id |
string |
Returns
Section titled “Returns”Promise<A2ATask>