[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73CJTGBAJKY3FN047Q39S8M":3,"skill-same:01M73CJTGBAJKY3FN047Q39S8M":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M73CJTGBAJKY3FN047Q39S8M","test-a2a-interop",null,"Test A2A interoperability between agents by validating Agent Card conformance, exercising all task lifecycle states, and verifying streaming and error handling. Use when verifying a new A2A server implementation before deployment, validating interoperability between two or more A2A agents, running conformance tests in CI\u002FCD for A2A services, debugging failures in multi-agent A2A workflows, or certifying that an agent meets A2A protocol requirements for a registry.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Ftest-a2a-interop\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: test-a2a-interop\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-05-03\"\ndescription: >\n  Test A2A interoperability between agents by validating Agent Card conformance,\n  exercising all task lifecycle states, and verifying streaming and error handling.\n  Use when verifying a new A2A server implementation before deployment, validating\n  interoperability between two or more A2A agents, running conformance tests in\n  CI\u002FCD for A2A services, debugging failures in multi-agent A2A workflows, or\n  certifying that an agent meets A2A protocol requirements for a registry.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob WebFetch\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: a2a-protocol\n  complexity: advanced\n  language: multi\n  tags: a2a, testing, interoperability, conformance, integration\n---\n\n# Test A2A Interoperability\n\nValidate that an A2A agent implementation conforms to the protocol specification by testing Agent Card discovery, task lifecycle management, SSE streaming, error handling, and multi-agent communication patterns.\n\n## When to Use\n\n- Verifying a new A2A server implementation before deployment\n- Validating interoperability between two or more A2A agents\n- Running conformance tests as part of CI\u002FCD for A2A services\n- Debugging failures in multi-agent A2A workflows\n- Certifying that an agent meets A2A protocol requirements for a registry\n\n## Inputs\n\n- **Required**: Base URL of the A2A agent under test\n- **Required**: Authentication credentials (if the agent requires them)\n- **Optional**: Second agent URL for bidirectional interop testing\n- **Optional**: Specific skills to test (default: all skills in the Agent Card)\n- **Optional**: Test timeout per task (default: 60 seconds)\n- **Optional**: Output format for the conformance report (`json`, `markdown`, `junit`)\n\n## Procedure\n\n### Step 1: Fetch and Validate Agent Cards\n\n1.1. Retrieve the Agent Card from the well-known endpoint:\n\n```bash\ncurl -s https:\u002F\u002Fagent.example.com\u002F.well-known\u002Fagent.json -o agent-card.json\n```\n\n1.2. Validate required top-level fields:\n\n```typescript\nconst requiredFields = [\"name\", \"description\", \"url\", \"skills\"];\nfor (const field of requiredFields) {\n  assert(agentCard[field] !== undefined, `Missing required field: ${field}`);\n}\n```\n\n1.3. Validate each skill entry:\n\n```typescript\nfor (const skill of agentCard.skills) {\n  assert(skill.id, \"Skill missing id\");\n  assert(skill.name, \"Skill missing name\");\n  assert(skill.description, \"Skill missing description\");\n  assert(\n    Array.isArray(skill.inputModes) && skill.inputModes.length > 0,\n    `Skill ${skill.id} missing inputModes`\n  );\n  assert(\n    Array.isArray(skill.outputModes) && skill.outputModes.length > 0,\n    `Skill ${skill.id} missing outputModes`\n  );\n}\n```\n\n1.4. Validate authentication configuration:\n   - If `authentication.schemes` includes `oauth2`, verify `credentials.oauth2` has `tokenUrl`\n   - If `authentication.schemes` includes `apiKey`, verify `credentials.apiKey` has `headerName`\n\n1.5. Validate capability flags are boolean values.\n\n1.6. Record validation results in the conformance report:\n\n```typescript\ninterface ConformanceResult {\n  test: string;\n  category: \"agent-card\" | \"lifecycle\" | \"streaming\" | \"error-handling\" | \"interop\";\n  status: \"pass\" | \"fail\" | \"skip\";\n  message?: string;\n  duration_ms?: number;\n}\n```\n\n**Got:** Agent Card passes all structural validation checks.\n\n**If fail:** Record each validation failure with the specific field and reason. Do not abort; continue testing other aspects. An invalid Agent Card is itself a test result.\n\n### Step 2: Send Test Tasks Covering All Lifecycle States\n\n2.1. **Test: Task submission (submitted -> working -> completed)**\n\nSend a task that the agent should be able to handle based on its declared skills:\n\n```typescript\nconst submitResult = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 1,\n  method: \"tasks\u002Fsend\",\n  params: {\n    id: `test-${uuid()}`,\n    sessionId: `session-${uuid()}`,\n    message: {\n      role: \"user\",\n      parts: [{ type: \"text\", text: skillExamples[0] }],\n    },\n  },\n});\n\nassert(submitResult.result, \"tasks\u002Fsend should return a result\");\nassert(submitResult.result.id, \"Result should include task ID\");\nassert(\n  [\"submitted\", \"working\", \"completed\"].includes(submitResult.result.status.state),\n  `Unexpected initial state: ${submitResult.result.status.state}`\n);\n```\n\n2.2. **Test: Task polling (tasks\u002Fget)**\n\nPoll until the task reaches a terminal state:\n\n```typescript\nlet task = submitResult.result;\nconst startTime = Date.now();\nwhile (![\"completed\", \"failed\", \"canceled\"].includes(task.status.state)) {\n  if (Date.now() - startTime > TEST_TIMEOUT_MS) {\n    fail(`Task ${task.id} did not complete within ${TEST_TIMEOUT_MS}ms`);\n    break;\n  }\n  await sleep(1000);\n  const getResult = await sendJsonRpc(agentUrl, {\n    jsonrpc: \"2.0\",\n    id: 2,\n    method: \"tasks\u002Fget\",\n    params: { id: task.id },\n  });\n  task = getResult.result;\n}\n\nassert(task.status.state === \"completed\", `Task should complete, got: ${task.status.state}`);\n```\n\n2.3. **Test: Task cancellation**\n\nSubmit a task and immediately cancel it:\n\n```typescript\nconst cancelTask = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 3,\n  method: \"tasks\u002Fsend\",\n  params: { id: `test-cancel-${uuid()}`, sessionId: `session-${uuid()}`, message: { ... } },\n});\n\nconst cancelResult = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 4,\n  method: \"tasks\u002Fcancel\",\n  params: { id: cancelTask.result.id },\n});\n\nassert(\n  cancelResult.result.status.state === \"canceled\",\n  \"Canceled task should be in canceled state\"\n);\n```\n\n2.4. **Test: Input-required state (multi-turn)**\n\nIf any skill supports multi-turn interaction, send an ambiguous request that should trigger `input-required`, then provide the follow-up:\n\n```typescript\n\u002F\u002F Send ambiguous request\nconst multiTurnTask = await sendJsonRpc(agentUrl, { ... });\n\n\u002F\u002F Poll until input-required or completed\n\u002F\u002F If input-required, send follow-up\nif (task.status.state === \"input-required\") {\n  const followUp = await sendJsonRpc(agentUrl, {\n    jsonrpc: \"2.0\",\n    id: 6,\n    method: \"tasks\u002Fsend\",\n    params: {\n      id: task.id,\n      sessionId: task.sessionId,\n      message: { role: \"user\", parts: [{ type: \"text\", text: \"Column A and Column B\" }] },\n    },\n  });\n  assert(\n    [\"working\", \"completed\"].includes(followUp.result.status.state),\n    \"Follow-up should resume task\"\n  );\n}\n```\n\n2.5. **Test: State transition history**\n\nIf the Agent Card declares `stateTransitionHistory: true`:\n\n```typescript\nconst getWithHistory = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 7,\n  method: \"tasks\u002Fget\",\n  params: { id: completedTaskId, historyLength: 100 },\n});\n\nassert(\n  Array.isArray(getWithHistory.result.history),\n  \"Task should include history array\"\n);\nassert(\n  getWithHistory.result.history.length >= 2,\n  \"History should have at least 2 entries (submitted and completed)\"\n);\n```\n\n**Got:** All lifecycle state transitions work correctly. Tasks complete successfully, cancel cleanly, and multi-turn interaction functions when supported.\n\n**If fail:** Record the specific state transition that failed, the expected state, and the actual state. Include the full JSON-RPC response in the report for debugging.\n\n### Step 3: Validate SSE Streaming Responses\n\n3.1. Skip this step if the Agent Card declares `streaming: false`.\n\n3.2. Send a `tasks\u002FsendSubscribe` request and validate the SSE stream:\n\n```typescript\nconst response = await fetch(`${agentUrl}\u002Fsubscribe`, {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({\n    jsonrpc: \"2.0\",\n    id: 10,\n    method: \"tasks\u002FsendSubscribe\",\n    params: {\n      id: `test-stream-${uuid()}`,\n      sessionId: `session-${uuid()}`,\n      message: { role: \"user\", parts: [{ type: \"text\", text: \"Stream test task\" }] },\n    },\n  }),\n});\n\nassert(\n  response.headers.get(\"content-type\")?.includes(\"text\u002Fevent-stream\"),\n  \"Response must be text\u002Fevent-stream\"\n);\n```\n\n3.3. Parse SSE events and validate structure:\n\n```typescript\nconst events: SSEEvent[] = [];\nconst reader = response.body.getReader();\nconst decoder = new TextDecoder();\nlet buffer = \"\";\n\nwhile (true) {\n  const { done, value } = await reader.read();\n  if (done) break;\n  buffer += decoder.decode(value, { stream: true });\n\n  \u002F\u002F Parse SSE events from buffer\n  const lines = buffer.split(\"\\n\");\n  for (const line of lines) {\n    if (line.startsWith(\"event: \")) {\n      currentEvent.type = line.slice(7);\n    } else if (line.startsWith(\"data: \")) {\n      currentEvent.data = JSON.parse(line.slice(6));\n      events.push(currentEvent);\n    }\n  }\n}\n```\n\n3.4. Validate the event sequence:\n   - First event should be a `status` event with state `submitted` or `working`\n   - Intermediate events may include `status` updates and `artifact` deliveries\n   - Final event should have `final: true` with a terminal state\n   - No events should arrive after the final event\n\n3.5. Validate that SSE connection cleanup works:\n   - Close the connection mid-stream\n   - Verify the task can still be retrieved via `tasks\u002Fget`\n   - Verify no server errors from the premature disconnect\n\n**Got:** SSE stream delivers correctly formatted events in the right sequence, ending with a final terminal event.\n\n**If fail:** If SSE is advertised but the endpoint returns a non-SSE response, record as a conformance failure. If events arrive out of order, record the sequence. If the stream never terminates, record a timeout.\n\n### Step 4: Test Error Handling and Edge Cases\n\n4.1. **Test: Unknown method**\n\n```typescript\nconst unknownMethod = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 20,\n  method: \"tasks\u002Fnonexistent\",\n  params: {},\n});\nassert(unknownMethod.error?.code === -32601, \"Should return method not found\");\n```\n\n4.2. **Test: Malformed JSON-RPC request**\n\n```typescript\nconst malformed = await fetch(agentUrl, {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: '{\"not\": \"valid jsonrpc\"}',\n});\nconst response = await malformed.json();\nassert(response.error?.code === -32600, \"Should return invalid request\");\n```\n\n4.3. **Test: Get nonexistent task**\n\n```typescript\nconst notFound = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 22,\n  method: \"tasks\u002Fget\",\n  params: { id: \"nonexistent-task-id\" },\n});\nassert(notFound.error, \"Should return error for nonexistent task\");\n```\n\n4.4. **Test: Cancel already completed task**\n\n```typescript\nconst cancelCompleted = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 23,\n  method: \"tasks\u002Fcancel\",\n  params: { id: completedTaskId },\n});\nassert(cancelCompleted.error, \"Should error when canceling completed task\");\n```\n\n4.5. **Test: Authentication enforcement**\n\nIf authentication is configured, send a request without credentials:\n\n```typescript\nconst unauthResponse = await fetch(agentUrl, {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({ jsonrpc: \"2.0\", id: 24, method: \"tasks\u002Fget\", params: { id: \"x\" } }),\n});\nassert(unauthResponse.status === 401, \"Should reject unauthenticated requests\");\n```\n\n4.6. **Test: Agent Card is publicly accessible without auth**\n\n```typescript\nconst publicCard = await fetch(`${agentUrl}\u002F.well-known\u002Fagent.json`);\nassert(publicCard.status === 200, \"Agent Card should be publicly accessible\");\n```\n\n**Got:** All error conditions return appropriate JSON-RPC error codes without crashing the server.\n\n**If fail:** Record each error handling test that fails. Server crashes during error testing are critical failures that must be fixed before deployment.\n\n### Step 5: Generate Interoperability Conformance Report\n\n5.1. Aggregate all test results into a structured report:\n\n```typescript\ninterface ConformanceReport {\n  agentUrl: string;\n  agentName: string;\n  agentVersion: string;\n  testDate: string;\n  summary: {\n    total: number;\n    passed: number;\n    failed: number;\n    skipped: number;\n  };\n  categories: {\n    agentCard: ConformanceResult[];\n    lifecycle: ConformanceResult[];\n    streaming: ConformanceResult[];\n    errorHandling: ConformanceResult[];\n    interop: ConformanceResult[];\n  };\n  conformanceLevel: \"full\" | \"partial\" | \"minimal\" | \"non-conformant\";\n}\n```\n\n5.2. Calculate the conformance level:\n   - **full**: All tests pass, including streaming and push notifications\n   - **partial**: Core lifecycle tests pass, some optional features fail\n   - **minimal**: Agent Card valid and basic task send\u002Fget works\n   - **non-conformant**: Agent Card invalid or basic lifecycle broken\n\n5.3. Generate the report in the requested format:\n   - **json**: Machine-readable for CI\u002FCD integration\n   - **markdown**: Human-readable with pass\u002Ffail tables\n   - **junit**: XML format for test framework integration\n\n5.4. Include recommendations for fixing failures:\n\n```markdown\n## Failed Tests\n\n| Test | Category | Message | Recommendation |\n|------|----------|---------|----------------|\n| cancel-completed-task | error-handling | Server returned 500 | Add guard for terminal state transitions |\n| sse-final-event | streaming | No final event received | Ensure SSE sends event with final:true |\n```\n\n5.5. If bidirectional testing was requested (two agents), validate:\n   - Agent A can discover Agent B's Agent Card\n   - Agent A can send a task to Agent B\n   - Agent B can send a task to Agent A\n   - Both agents handle concurrent tasks without interference\n\n**Got:** A complete conformance report with pass\u002Ffail results, conformance level, and actionable recommendations.\n\n**If fail:** If the report generation itself fails, output raw test results to stdout as a fallback. The test data should never be lost due to a reporting error.\n\n## Validation\n\n- [ ] Agent Card is fetched and structurally validated\n- [ ] At least one task completes the full lifecycle (submitted -> working -> completed)\n- [ ] Task cancellation works correctly\n- [ ] Error responses use correct JSON-RPC error codes\n- [ ] SSE streaming is tested if advertised in capabilities\n- [ ] Authentication is enforced on task endpoints but not on Agent Card\n- [ ] Conformance report is generated in the requested format\n- [ ] Failed tests include actionable remediation guidance\n- [ ] Test suite can run in CI\u002FCD without manual intervention\n\n## Pitfalls\n\n- **Testing against a cold server**: Some agents take time to initialize. Add a health check or warmup request before running tests.\n- **Hardcoded test data**: Use dynamic task and session IDs (UUIDs) to avoid collisions when running tests repeatedly. Never assume a specific task ID is available.\n- **Ignoring timing**: Task transitions are asynchronous. Always poll with backoff rather than asserting immediate state changes.\n- **SSE parsing complexity**: SSE events may span multiple chunks. Buffer incoming data and parse complete events, not raw chunks.\n- **Testing only the happy path**: Error handling tests are as important as success tests. Malformed requests, invalid transitions, and auth failures must all be covered.\n- **Network dependency**: Tests should be runnable against localhost for development and remote URLs for production. Parameterize the agent URL.\n- **Assuming skill behavior**: The test suite validates protocol conformance, not skill correctness. Use example phrases from the Agent Card to trigger skills, but do not assert specific output content.\n\n## Related Skills\n\n- `design-a2a-agent-card` - design the Agent Card being tested\n- `implement-a2a-server` - implement the server being tested\n- `build-ci-cd-pipeline` - integrate conformance tests into CI\u002FCD\n- `troubleshoot-mcp-connection` - debugging patterns applicable to A2A connectivity\n- `review-software-architecture` - architecture review for multi-agent systems\n","# Test A2A Interoperability\n\nValidate that an A2A agent implementation conforms to the protocol specification by testing Agent Card discovery, task lifecycle management, SSE streaming, error handling, and multi-agent communication patterns.\n\n## When to Use\n\n- Verifying a new A2A server implementation before deployment\n- Validating interoperability between two or more A2A agents\n- Running conformance tests as part of CI\u002FCD for A2A services\n- Debugging failures in multi-agent A2A workflows\n- Certifying that an agent meets A2A protocol requirements for a registry\n\n## Inputs\n\n- **Required**: Base URL of the A2A agent under test\n- **Required**: Authentication credentials (if the agent requires them)\n- **Optional**: Second agent URL for bidirectional interop testing\n- **Optional**: Specific skills to test (default: all skills in the Agent Card)\n- **Optional**: Test timeout per task (default: 60 seconds)\n- **Optional**: Output format for the conformance report (`json`, `markdown`, `junit`)\n\n## Procedure\n\n### Step 1: Fetch and Validate Agent Cards\n\n1.1. Retrieve the Agent Card from the well-known endpoint:\n\n```bash\ncurl -s https:\u002F\u002Fagent.example.com\u002F.well-known\u002Fagent.json -o agent-card.json\n```\n\n1.2. Validate required top-level fields:\n\n```typescript\nconst requiredFields = [\"name\", \"description\", \"url\", \"skills\"];\nfor (const field of requiredFields) {\n  assert(agentCard[field] !== undefined, `Missing required field: ${field}`);\n}\n```\n\n1.3. Validate each skill entry:\n\n```typescript\nfor (const skill of agentCard.skills) {\n  assert(skill.id, \"Skill missing id\");\n  assert(skill.name, \"Skill missing name\");\n  assert(skill.description, \"Skill missing description\");\n  assert(\n    Array.isArray(skill.inputModes) && skill.inputModes.length > 0,\n    `Skill ${skill.id} missing inputModes`\n  );\n  assert(\n    Array.isArray(skill.outputModes) && skill.outputModes.length > 0,\n    `Skill ${skill.id} missing outputModes`\n  );\n}\n```\n\n1.4. Validate authentication configuration:\n   - If `authentication.schemes` includes `oauth2`, verify `credentials.oauth2` has `tokenUrl`\n   - If `authentication.schemes` includes `apiKey`, verify `credentials.apiKey` has `headerName`\n\n1.5. Validate capability flags are boolean values.\n\n1.6. Record validation results in the conformance report:\n\n```typescript\ninterface ConformanceResult {\n  test: string;\n  category: \"agent-card\" | \"lifecycle\" | \"streaming\" | \"error-handling\" | \"interop\";\n  status: \"pass\" | \"fail\" | \"skip\";\n  message?: string;\n  duration_ms?: number;\n}\n```\n\n**Got:** Agent Card passes all structural validation checks.\n\n**If fail:** Record each validation failure with the specific field and reason. Do not abort; continue testing other aspects. An invalid Agent Card is itself a test result.\n\n### Step 2: Send Test Tasks Covering All Lifecycle States\n\n2.1. **Test: Task submission (submitted -> working -> completed)**\n\nSend a task that the agent should be able to handle based on its declared skills:\n\n```typescript\nconst submitResult = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 1,\n  method: \"tasks\u002Fsend\",\n  params: {\n    id: `test-${uuid()}`,\n    sessionId: `session-${uuid()}`,\n    message: {\n      role: \"user\",\n      parts: [{ type: \"text\", text: skillExamples[0] }],\n    },\n  },\n});\n\nassert(submitResult.result, \"tasks\u002Fsend should return a result\");\nassert(submitResult.result.id, \"Result should include task ID\");\nassert(\n  [\"submitted\", \"working\", \"completed\"].includes(submitResult.result.status.state),\n  `Unexpected initial state: ${submitResult.result.status.state}`\n);\n```\n\n2.2. **Test: Task polling (tasks\u002Fget)**\n\nPoll until the task reaches a terminal state:\n\n```typescript\nlet task = submitResult.result;\nconst startTime = Date.now();\nwhile (![\"completed\", \"failed\", \"canceled\"].includes(task.status.state)) {\n  if (Date.now() - startTime > TEST_TIMEOUT_MS) {\n    fail(`Task ${task.id} did not complete within ${TEST_TIMEOUT_MS}ms`);\n    break;\n  }\n  await sleep(1000);\n  const getResult = await sendJsonRpc(agentUrl, {\n    jsonrpc: \"2.0\",\n    id: 2,\n    method: \"tasks\u002Fget\",\n    params: { id: task.id },\n  });\n  task = getResult.result;\n}\n\nassert(task.status.state === \"completed\", `Task should complete, got: ${task.status.state}`);\n```\n\n2.3. **Test: Task cancellation**\n\nSubmit a task and immediately cancel it:\n\n```typescript\nconst cancelTask = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 3,\n  method: \"tasks\u002Fsend\",\n  params: { id: `test-cancel-${uuid()}`, sessionId: `session-${uuid()}`, message: { ... } },\n});\n\nconst cancelResult = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 4,\n  method: \"tasks\u002Fcancel\",\n  params: { id: cancelTask.result.id },\n});\n\nassert(\n  cancelResult.result.status.state === \"canceled\",\n  \"Canceled task should be in canceled state\"\n);\n```\n\n2.4. **Test: Input-required state (multi-turn)**\n\nIf any skill supports multi-turn interaction, send an ambiguous request that should trigger `input-required`, then provide the follow-up:\n\n```typescript\n\u002F\u002F Send ambiguous request\nconst multiTurnTask = await sendJsonRpc(agentUrl, { ... });\n\n\u002F\u002F Poll until input-required or completed\n\u002F\u002F If input-required, send follow-up\nif (task.status.state === \"input-required\") {\n  const followUp = await sendJsonRpc(agentUrl, {\n    jsonrpc: \"2.0\",\n    id: 6,\n    method: \"tasks\u002Fsend\",\n    params: {\n      id: task.id,\n      sessionId: task.sessionId,\n      message: { role: \"user\", parts: [{ type: \"text\", text: \"Column A and Column B\" }] },\n    },\n  });\n  assert(\n    [\"working\", \"completed\"].includes(followUp.result.status.state),\n    \"Follow-up should resume task\"\n  );\n}\n```\n\n2.5. **Test: State transition history**\n\nIf the Agent Card declares `stateTransitionHistory: true`:\n\n```typescript\nconst getWithHistory = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 7,\n  method: \"tasks\u002Fget\",\n  params: { id: completedTaskId, historyLength: 100 },\n});\n\nassert(\n  Array.isArray(getWithHistory.result.history),\n  \"Task should include history array\"\n);\nassert(\n  getWithHistory.result.history.length >= 2,\n  \"History should have at least 2 entries (submitted and completed)\"\n);\n```\n\n**Got:** All lifecycle state transitions work correctly. Tasks complete successfully, cancel cleanly, and multi-turn interaction functions when supported.\n\n**If fail:** Record the specific state transition that failed, the expected state, and the actual state. Include the full JSON-RPC response in the report for debugging.\n\n### Step 3: Validate SSE Streaming Responses\n\n3.1. Skip this step if the Agent Card declares `streaming: false`.\n\n3.2. Send a `tasks\u002FsendSubscribe` request and validate the SSE stream:\n\n```typescript\nconst response = await fetch(`${agentUrl}\u002Fsubscribe`, {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({\n    jsonrpc: \"2.0\",\n    id: 10,\n    method: \"tasks\u002FsendSubscribe\",\n    params: {\n      id: `test-stream-${uuid()}`,\n      sessionId: `session-${uuid()}`,\n      message: { role: \"user\", parts: [{ type: \"text\", text: \"Stream test task\" }] },\n    },\n  }),\n});\n\nassert(\n  response.headers.get(\"content-type\")?.includes(\"text\u002Fevent-stream\"),\n  \"Response must be text\u002Fevent-stream\"\n);\n```\n\n3.3. Parse SSE events and validate structure:\n\n```typescript\nconst events: SSEEvent[] = [];\nconst reader = response.body.getReader();\nconst decoder = new TextDecoder();\nlet buffer = \"\";\n\nwhile (true) {\n  const { done, value } = await reader.read();\n  if (done) break;\n  buffer += decoder.decode(value, { stream: true });\n\n  \u002F\u002F Parse SSE events from buffer\n  const lines = buffer.split(\"\\n\");\n  for (const line of lines) {\n    if (line.startsWith(\"event: \")) {\n      currentEvent.type = line.slice(7);\n    } else if (line.startsWith(\"data: \")) {\n      currentEvent.data = JSON.parse(line.slice(6));\n      events.push(currentEvent);\n    }\n  }\n}\n```\n\n3.4. Validate the event sequence:\n   - First event should be a `status` event with state `submitted` or `working`\n   - Intermediate events may include `status` updates and `artifact` deliveries\n   - Final event should have `final: true` with a terminal state\n   - No events should arrive after the final event\n\n3.5. Validate that SSE connection cleanup works:\n   - Close the connection mid-stream\n   - Verify the task can still be retrieved via `tasks\u002Fget`\n   - Verify no server errors from the premature disconnect\n\n**Got:** SSE stream delivers correctly formatted events in the right sequence, ending with a final terminal event.\n\n**If fail:** If SSE is advertised but the endpoint returns a non-SSE response, record as a conformance failure. If events arrive out of order, record the sequence. If the stream never terminates, record a timeout.\n\n### Step 4: Test Error Handling and Edge Cases\n\n4.1. **Test: Unknown method**\n\n```typescript\nconst unknownMethod = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 20,\n  method: \"tasks\u002Fnonexistent\",\n  params: {},\n});\nassert(unknownMethod.error?.code === -32601, \"Should return method not found\");\n```\n\n4.2. **Test: Malformed JSON-RPC request**\n\n```typescript\nconst malformed = await fetch(agentUrl, {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: '{\"not\": \"valid jsonrpc\"}',\n});\nconst response = await malformed.json();\nassert(response.error?.code === -32600, \"Should return invalid request\");\n```\n\n4.3. **Test: Get nonexistent task**\n\n```typescript\nconst notFound = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 22,\n  method: \"tasks\u002Fget\",\n  params: { id: \"nonexistent-task-id\" },\n});\nassert(notFound.error, \"Should return error for nonexistent task\");\n```\n\n4.4. **Test: Cancel already completed task**\n\n```typescript\nconst cancelCompleted = await sendJsonRpc(agentUrl, {\n  jsonrpc: \"2.0\",\n  id: 23,\n  method: \"tasks\u002Fcancel\",\n  params: { id: completedTaskId },\n});\nassert(cancelCompleted.error, \"Should error when canceling completed task\");\n```\n\n4.5. **Test: Authentication enforcement**\n\nIf authentication is configured, send a request without credentials:\n\n```typescript\nconst unauthResponse = await fetch(agentUrl, {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({ jsonrpc: \"2.0\", id: 24, method: \"tasks\u002Fget\", params: { id: \"x\" } }),\n});\nassert(unauthResponse.status === 401, \"Should reject unauthenticated requests\");\n```\n\n4.6. **Test: Agent Card is publicly accessible without auth**\n\n```typescript\nconst publicCard = await fetch(`${agentUrl}\u002F.well-known\u002Fagent.json`);\nassert(publicCard.status === 200, \"Agent Card should be publicly accessible\");\n```\n\n**Got:** All error conditions return appropriate JSON-RPC error codes without crashing the server.\n\n**If fail:** Record each error handling test that fails. Server crashes during error testing are critical failures that must be fixed before deployment.\n\n### Step 5: Generate Interoperability Conformance Report\n\n5.1. Aggregate all test results into a structured report:\n\n```typescript\ninterface ConformanceReport {\n  agentUrl: string;\n  agentName: string;\n  agentVersion: string;\n  testDate: string;\n  summary: {\n    total: number;\n    passed: number;\n    failed: number;\n    skipped: number;\n  };\n  categories: {\n    agentCard: ConformanceResult[];\n    lifecycle: ConformanceResult[];\n    streaming: ConformanceResult[];\n    errorHandling: ConformanceResult[];\n    interop: ConformanceResult[];\n  };\n  conformanceLevel: \"full\" | \"partial\" | \"minimal\" | \"non-conformant\";\n}\n```\n\n5.2. Calculate the conformance level:\n   - **full**: All tests pass, including streaming and push notifications\n   - **partial**: Core lifecycle tests pass, some optional features fail\n   - **minimal**: Agent Card valid and basic task send\u002Fget works\n   - **non-conformant**: Agent Card invalid or basic lifecycle broken\n\n5.3. Generate the report in the requested format:\n   - **json**: Machine-readable for CI\u002FCD integration\n   - **markdown**: Human-readable with pass\u002Ffail tables\n   - **junit**: XML format for test framework integration\n\n5.4. Include recommendations for fixing failures:\n\n```markdown\n## Failed Tests\n\n| Test | Category | Message | Recommendation |\n|------|----------|---------|----------------|\n| cancel-completed-task | error-handling | Server returned 500 | Add guard for terminal state transitions |\n| sse-final-event | streaming | No final event received | Ensure SSE sends event with final:true |\n```\n\n5.5. If bidirectional testing was requested (two agents), validate:\n   - Agent A can discover Agent B's Agent Card\n   - Agent A can send a task to Agent B\n   - Agent B can send a task to Agent A\n   - Both agents handle concurrent tasks without interference\n\n**Got:** A complete conformance report with pass\u002Ffail results, conformance level, and actionable recommendations.\n\n**If fail:** If the report generation itself fails, output raw test results to stdout as a fallback. The test data should never be lost due to a reporting error.\n\n## Validation\n\n- [ ] Agent Card is fetched and structurally validated\n- [ ] At least one task completes the full lifecycle (submitted -> working -> completed)\n- [ ] Task cancellation works correctly\n- [ ] Error responses use correct JSON-RPC error codes\n- [ ] SSE streaming is tested if advertised in capabilities\n- [ ] Authentication is enforced on task endpoints but not on Agent Card\n- [ ] Conformance report is generated in the requested format\n- [ ] Failed tests include actionable remediation guidance\n- [ ] Test suite can run in CI\u002FCD without manual intervention\n\n## Pitfalls\n\n- **Testing against a cold server**: Some agents take time to initialize. Add a health check or warmup request before running tests.\n- **Hardcoded test data**: Use dynamic task and session IDs (UUIDs) to avoid collisions when running tests repeatedly. Never assume a specific task ID is available.\n- **Ignoring timing**: Task transitions are asynchronous. Always poll with backoff rather than asserting immediate state changes.\n- **SSE parsing complexity**: SSE events may span multiple chunks. Buffer incoming data and parse complete events, not raw chunks.\n- **Testing only the happy path**: Error handling tests are as important as success tests. Malformed requests, invalid transitions, and auth failures must all be covered.\n- **Network dependency**: Tests should be runnable against localhost for development and remote URLs for production. Parameterize the agent URL.\n- **Assuming skill behavior**: The test suite validates protocol conformance, not skill correctness. Use example phrases from the Agent Card to trigger skills, but do not assert specific output content.\n\n## Related Skills\n\n- `design-a2a-agent-card` - design the Agent Card being tested\n- `implement-a2a-server` - implement the server being tested\n- `build-ci-cd-pipeline` - integrate conformance tests into CI\u002FCD\n- `troubleshoot-mcp-connection` - debugging patterns applicable to A2A connectivity\n- `review-software-architecture` - architecture review for multi-agent systems\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"a2a, testing, interoperability, conformance, integration","Philipp Thoss","a2a-protocol","1.0","multi","advanced","Julius Brussee homage — caveman","Test A2A interoperability between agents by validating Agent Card conformance, exercising all task lifecycle states, and verifying streaming and error handling. Use when verifying a new A2A server implementation before deployment, validating interoperability between two or more A2A agents, running conformance tests in CI\u002FCD for A2A services, debugging failures in multi-agent A2A workflows, or certifying that an agent meets A2A protocol requirements for a registry.\n","Read Write Edit Bash Grep Glob WebFetch","82c77053","en","2026-05-03","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Ftest-a2a-interop",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill test-a2a-interop",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill test-a2a-interop",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill test-a2a-interop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Ftest-a2a-interop\u002FSKILL.md",true,[],[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]