Skip to content

Conversation

c-mysec
Copy link

@c-mysec c-mysec commented May 19, 2025

Address the need for an OpenAPI and OpenRPC specification of the protocol for a server specification,
This can be used as a template for creating server documentation and model intefaces. πŸ¦•

@c-mysec c-mysec force-pushed the openApiRpcExample branch from b1abc0a to b4a7bec Compare May 21, 2025 18:38
@c-mysec c-mysec marked this pull request as ready for review May 21, 2025 18:38
@c-mysec c-mysec requested a review from a team as a code owner May 21, 2025 18:38
Copy link
Member

@holtskinner holtskinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the openai.yaml and openrpc.json be auto-generated from the existing a2a.json ?

@holtskinner holtskinner requested a review from a team as a code owner June 23, 2025 19:50
@c-mysec
Copy link
Author

c-mysec commented Jun 25, 2025

Can the openai.yaml and openrpc.json be auto-generated from the existing a2a.json ?

Not a complete or accurate specification. There are some "SHOULD" clauses in the specification and the agent card doesn't have the information if the agent endpoint supports it, uses it or not. For instance:

The agent card has no information what status code is used and the openapi spec has the field to specify the behavior.
I wonder if a tool that auto-generate a partial/incomplete interface spec would be misleading or used in a wrong way.

@c-mysec
Copy link
Author

c-mysec commented Jun 26, 2025

I see the openapi and openrpc more as a complimentary spec with transport details to a server specification and not as an alternative that can be inferred from the agent card and a2a standard.

@c-mysec
Copy link
Author

c-mysec commented Jun 26, 2025

with a help from gpt4o

Checklist: Information Needed in openapi.yaml Beyond AgentCard

This document outlines all required and recommended fields in an OpenAPI 3.1 specification (openapi.yaml) for an A2A-compliant agent, that cannot be inferred directly from the AgentCard.


βœ… Checklist of Information NOT in AgentCard but Required/Recommended in openapi.yaml

1. πŸ”΅ info Section (API Metadata)

Field Required? Inferred from AgentCard? Notes
title βœ… Yes ❌ No The name of the API, not the agent. E.g., "A2A Agent Discovery API"
version βœ… Yes ❌ No The API spec version, not the agent version
description βœ… Yes ❌ No Explains the purpose of the API, not the agent’s function
termsOfService ⚠️ Optional ❌ No Include if available
contact, license ⚠️ Recommended ❌ No Recommended for public/corporate APIs for governance/compliance

2. πŸ”΅ servers Section (Deployment Info)

Field Required? Inferred from AgentCard? Notes
url βœ… Yes ❌ No Must specify where the agent is hosted
variables ⚠️ Optional ❌ No Helps support multi-environment configs (e.g., staging/prod)

3. πŸ”΅ paths Section (REST Endpoints)

Field Required? Inferred from AgentCard? Notes
/well-known/agent.json βœ… Yes ❌ No But it is specified in the standard
operationId ⚠️ Recommended ❌ No Useful for codegen and interactive docs
tags ⚠️ Recommended ❌ No Helps group endpoints in tools like Swagger UI

4. πŸ”΅ responses (Beyond 200)

Status Inferred from AgentCard? Notes
401 ❌ No Missing or invalid credentials
403 ❌ No Authenticated but lacks permission
500 ❌ No Unexpected internal errors

5. πŸ”΅ security (at the Operation Level)

Field Inferred from AgentCard? Notes
security ⚠️ Partially AgentCard lists available schemes, but not which ones are required per endpoint β€” this must be explicitly stated in the spec

6. πŸ”΅ Error Schemas and Examples

Field Inferred? Notes
components.schemas.ErrorResponse ❌ No Recommended for public APIs
examples ⚠️ Partially If skills[].examples are present, they can be reused β€” but more full usage examples may be needed for context

7. πŸ”΅ Vendor Extensions (If Applicable)

Extension Needed? Inferred? Notes
x-logo, x-agent-id, x-runtime ⚠️ Optional ❌ No Useful for visual tools like Stoplight or Redoc
x-a2a-supported-version ⚠️ Recommended ❌ No Indicates compatibility with A2A protocol version β€” useful in multi-agent environments

βœ… Summary β€” What You Must Provide Beyond the AgentCard

  1. API metadata: info.title, info.version, info.description, contact
  2. Agent base URL: e.g., https://your-agent.com
  3. Required security schemes per endpoint (e.g., Bearer only, or multiple)
  4. Expected HTTP status codes beyond 200: 401, 403, 500

c-mysec added 4 commits June 27, 2025 16:07
corrected
/github/workspace/docs/index.md:126:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 4]
/github/workspace/docs/index.md:127 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
------
/github/workspace/docs/index.md:125 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "[:octicons-arrow-right-24: A2A..."]
------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants