-
Notifications
You must be signed in to change notification settings - Fork 2k
docs: Server documentation example and template based on openapi and β¦ #586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
β¦openrpc standards
β¦openrpc standards
b1abc0a
to
b4a7bec
Compare
There was a problem hiding this 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 ?
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. |
β¦to openApiRpcExample
new words in the docs/community.md
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. |
with a help from gpt4o Checklist: Information Needed in openapi.yaml Beyond AgentCardThis document outlines all required and recommended fields in an OpenAPI 3.1 specification ( β
Checklist of Information NOT in AgentCard but Required/Recommended in
|
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 |
β No | Include if available | |
contact , license |
β 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 |
β 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 |
β No | Useful for codegen and interactive docs | |
tags |
β 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 |
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 |
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 |
β No | Useful for visual tools like Stoplight or Redoc | |
x-a2a-supported-version |
β No | Indicates compatibility with A2A protocol version β useful in multi-agent environments |
β
Summary β What You Must Provide Beyond the AgentCard
- API metadata:
info.title
,info.version
,info.description
,contact
- Agent base URL: e.g.,
https://your-agent.com
- Required security schemes per endpoint (e.g., Bearer only, or multiple)
- Expected HTTP status codes beyond 200:
401
,403
,500
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..."] ------
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. π¦