Agent / foldkit-agent-a2a

Tasks and completion

A message/send produces a task. tasks/get reads it later and tasks/cancel aborts one that is still running. Tasks are kept in a bounded buffer.

The important distinction is rejected vs failed:

OutcomeA2A task state
unknown skillrejected
input fails the capability schemarejected
current principal is unauthorizedrejected
capability is unavailable in the current Modelrejected
declared failure Message arrivesfailed
completion times out after dispatchfailed
invocation is cancelledcanceled
validated dispatch, with no completion contractcompleted
correlated success Message arrivescompleted

rejected means the runtime declined to start the requested operation. failed means the operation was accepted but did not successfully complete. A client can make different retry or fallback decisions from that distinction.

A capability without a completion contract is complete at validated dispatch. A capability with one stays in flight until its correlated success/failure Message, timeout, or cancellation settles the task.

What is deliberately not implemented

The adapter advertises only the A2A features it actually supports:

  • streaming: false
  • pushNotifications: false
  • message/stream is refused
  • multi-turn input-required / auth-required flows are out of scope
  • file parts and artifacts are out of scope

It is better for the card to describe a smaller truthful surface than to expose protocol features the underlying application adapter does not implement.

Choosing an adapter

All four adapters serve the same AssistantAgent contract through a bound runtime.

Where the agent runsAdapter
In the page, beside the userfoldkit-agent-webmcp
An external MCP client, over stdio or HTTPfoldkit-agent-mcp
Another agent, over A2Afoldkit-agent-a2a
An Agent Native hostfoldkit-agent-native

See also

  • Agents guide — builder → contract → runtime and the authority model.
  • foldkit-agent — the protocol-neutral contract and runtime.
  • examples/todo — a focused contract served through adapters.