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:
| Outcome | A2A task state |
|---|---|
| unknown skill | rejected |
| input fails the capability schema | rejected |
| current principal is unauthorized | rejected |
| capability is unavailable in the current Model | rejected |
| declared failure Message arrives | failed |
| completion times out after dispatch | failed |
| invocation is cancelled | canceled |
| validated dispatch, with no completion contract | completed |
| correlated success Message arrives | completed |
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: falsepushNotifications: falsemessage/streamis refused- multi-turn
input-required/auth-requiredflows 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 runs | Adapter |
|---|---|
| In the page, beside the user | foldkit-agent-webmcp |
| An external MCP client, over stdio or HTTP | foldkit-agent-mcp |
| Another agent, over A2A | foldkit-agent-a2a |
| An Agent Native host | foldkit-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.