← Back to AgentBin

A2A Acceptance Test Descriptions

Each test is run against both the JSON-RPC and HTTP+JSON (REST) bindings. Full test specifications are in acceptance.yaml.

Tests

Discovery
Echo Agent
Spec Agent
Error Handling
Streaming
Multi-Turn
GetTask
v0.3 Backward Compatibility

Echo Agent Card

agent-card-echo · acceptance.yaml
Fetch the Echo agent card via GET /echo/.well-known/agent-card.json with the A2A-Version: 1.0 header. Verify it conforms to the v1.0 AgentCard schema.
Agent: Echo discoveryagent-cardv1.0

Verifies

Spec Agent Card

agent-card-spec · acceptance.yaml
Fetch the Spec agent card. Verify it advertises streaming capability and all 8 skills.
Agent: Spec discoveryagent-cardv1.0

Verifies

Echo Send Message

echo-send-message · acceptance.yaml
Send a text message to the Echo agent. The agent MUST respond with a direct Message (not a Task) containing the echoed text. This is the simplest possible A2A interaction.
Agent: Echo echomessagev1.0

Verifies

Message Only

spec-message-only · acceptance.yaml
Send a message prefixed with "message-only". The agent MUST respond with a direct Message (not a Task). Tests the simplest spec agent interaction pattern where no task state machine is involved.
Agent: Spec specmessage-onlyv1.0

Verifies

Task Lifecycle

spec-task-lifecycle · acceptance.yaml
Send a "task-lifecycle" message. The agent creates a task that transitions through SUBMITTED → WORKING → COMPLETED and returns the final task with at least one artifact. Because returnImmediately defaults to false, the response blocks until the task reaches a terminal state.
Agent: Spec spectask-lifecyclev1.0

Verifies

GetTask

spec-get-task · acceptance.yaml
Create a task via the task-lifecycle skill, then retrieve it using GetTask with the task ID. Tests that task state is persisted and can be queried after creation. Also exercises historyLength control — historyLength=0 should omit history.
Agent: Spec get-taskhistoryv1.0

Verifies

Task Failure

spec-task-failure · acceptance.yaml
Send a "task-failure" message. The agent creates a task that transitions to TASK_STATE_FAILED with an error message in status.message. Tests proper error state handling.
Agent: Spec spectask-failureerrorv1.0

Verifies

Data Types

spec-data-types · acceptance.yaml
Send a "data-types" message. The agent returns a completed task with multiple artifacts containing different Part types: text, data (structured JSON), and file (binary content with mediaType). Tests that all part types serialize and deserialize correctly across languages.
Agent: Spec specdata-typespartsv1.0

Verifies

Streaming

spec-streaming · acceptance.yaml
Send a streaming request via SendStreamingMessage. The agent responds with text/event-stream containing JSON-RPC wrapped SSE events: status updates, artifact updates, and a final task in terminal state. Tests the full SSE streaming lifecycle.
Agent: Spec specstreamingssev1.0

Verifies

Multi-Turn

spec-multi-turn · acceptance.yaml
Start a multi-turn conversation. The agent returns a task in INPUT_REQUIRED state. The client sends follow-up messages referencing the taskId. Sending "done" completes the task. Tests the stateful multi-turn conversation pattern with task context preservation.
Agent: Spec specmulti-turninput-requiredv1.0

Verifies

Task Cancel (via streaming)

spec-task-cancel · acceptance.yaml
Start a cancellable task using returnImmediately: true so the agent returns immediately with a WORKING task. Then cancel it with CancelTask. Tests the task cancellation lifecycle.
Agent: Spec spectask-cancelcancelv1.0

Verifies

Cancel With Metadata

spec-cancel-with-metadata
Start a cancellable task (via task-cancel skill), then cancel it with metadata attached to the CancelTask request. The metadata includes {"reason": "test-cancel-reason", "requestedBy": "<sdk-name>"}. The server echoes the metadata back on the cancelled task. Tests that SDKs can send metadata with cancel requests and that metadata round-trips correctly.
Agent: Spec cancelmetadatav1.0

Verifies

ListTasks

spec-list-tasks
After creating one or more tasks, call ListTasks to retrieve them. Tests that the server correctly tracks and returns previously created tasks. The response should contain at least one task from the current session.
Agent: Spec speclist-tasksv1.0

Verifies

Return Immediately

spec-return-immediately · acceptance.yaml
Same as task-lifecycle, but with returnImmediately: true. The agent MUST return immediately with a task in a non-terminal state (SUBMITTED or WORKING). The client then polls with GetTask until the task reaches COMPLETED. Tests the async polling pattern.
Agent: Spec specreturn-immediatelypollingv1.0

Verifies

Task Not Found Error

error-task-not-found · acceptance.yaml
Call GetTask with a non-existent task ID. The agent MUST return a JSON-RPC error with code -32001 (TaskNotFoundError). Tests proper error handling for missing resources.
Agent: Spec errortask-not-foundv1.0

Verifies

Cancel Not Found

error-cancel-not-found
Call CancelTask with a non-existent task ID. The agent MUST return a TaskNotFoundError (code -32001).
Agent: Spec errorcancelnot-found

Verifies

Cancel Terminal Task

error-cancel-terminal
Complete a task (via task-lifecycle), then attempt to cancel it. The agent SHOULD return an error since the task is already in a terminal state.
Agent: Spec errorcancelterminal

Verifies

Send To Terminal Task

error-send-terminal
Complete a task, then send a new message with the same taskId. The agent SHOULD return an error because the task is already in a terminal state.
Agent: Spec errorsendterminal

Verifies

Send Invalid TaskId

error-send-invalid-task
Send a message with a taskId that doesn't exist. The agent MUST return a TaskNotFoundError.
Agent: Spec errorsendinvalid-task

Verifies

Push Not Supported

error-push-not-supported
Call SetPushNotificationConfig on an agent that does not advertise push notification support. The agent MUST return a PushNotificationsNotSupportedError (code -32003).
Agent: Spec errorpushnot-supported

Verifies

Subscribe Not Found

error-subscribe-not-found
Call SubscribeToTask with a non-existent task ID. The agent MUST return a TaskNotFoundError.
Agent: Spec errorsubscribenot-found

Verifies

SubscribeToTask

subscribe-to-task
Create a task via SendMessage (with task-lifecycle skill), then call SubscribeToTask with the returned taskId. Verifies that the agent returns the current task state via SSE.
Agent: Spec streamingsubscribesse

Verifies

Stream Message Only

stream-message-only
Stream a message-only request. The agent returns a message event (no task created) via SSE.
Agent: Spec streamingmessage-only

Verifies

Stream Task Lifecycle

stream-task-lifecycle
Stream a task-lifecycle request. The agent streams status updates and artifact chunks as the task progresses through submitted → working → completed.
Agent: Spec streamingtask-lifecyclesse

Verifies

Context Preserved

multi-turn-context-preserved
Start a multi-turn conversation, then send a follow-up message with the same taskId. Verify the task context (taskId) is preserved across turns.
Agent: Spec multi-turncontext

Verifies

GetTask With History

get-task-with-history
Complete a task, then call GetTask with historyLength to retrieve the task with its message history.
Agent: Spec get-taskhistory

Verifies

GetTask After Failure

get-task-after-failure
Trigger a task failure (via task-failure skill), then call GetTask. The task MUST be in the failed state.
Agent: Spec get-taskfailure

Verifies

v0.3 Agent Card

spec03-agent-card
Fetch the agent card at /spec03/.well-known/agent-card.json. This endpoint serves a native v0.3-format card with url and protocolVersion: "0.3.0" fields instead of supportedInterfaces. Verifies that the card format is correct v0.3.
Agent: Spec (v0.3) v0.3discoverybackward-compat

Verifies

v0.3 Send Message

spec03-send-message
Use the SDK client to discover the /spec03 agent (which serves a v0.3 card) and send a message-only hello message. Tests whether the SDK can detect a v0.3 agent and fall back to the v0.3 protocol automatically.
Agent: Spec (v0.3) v0.3send-messagefallback

Verifies

v0.3 Task Lifecycle

spec03-task-lifecycle
Send task-lifecycle process to the v0.3 agent via the SDK. Tests whether the SDK can complete a full task lifecycle (submitted → working → completed) when talking to a v0.3 agent.
Agent: Spec (v0.3) v0.3task-lifecyclefallback

Verifies

v0.3 Streaming

spec03-streaming
Stream streaming generate to the v0.3 agent via the SDK. Tests whether the SDK can handle SSE streaming with v0.3 protocol (method name message/stream, v0.3 state names).
Agent: Spec (v0.3) v0.3streamingssefallback

Verifies