A2A Agent Card Schema Update - Official v1.0
Overview
Updated Agent Shaker to comply with the official A2A Agent Card Schema v1.0 as specified at: https://gist.githubusercontent.com/SecureAgentTools/0815a2de9cc31c71468afd3d2eef260a/raw/agent-card-schema.md
Major Changes
1. Agent Card Structure
Old (Custom) Schema:
{
"name": "Agent Shaker",
"version": "1.0.0",
"capabilities": [
{"type": "task", "description": "..."}
],
"endpoints": [...]
}
New (Official v1.0) Schema:
{
"schemaVersion": "1.0",
"humanReadableId": "techbuzzz/agent-shaker",
"agentVersion": "1.0.0",
"name": "Agent Shaker",
"description": "...",
"url": "http://localhost:8080/a2a/v1",
"provider": {
"name": "techbuzzz",
"url": "https://github.com/techbuzzz/agent-shaker"
},
"capabilities": {
"a2aVersion": "1.0",
"mcpVersion": "0.6",
"supportedMessageParts": ["text", "file", "data"]
},
"authSchemes": [
{"scheme": "none", "description": "..."}
],
"skills": [
{"id": "task_execution", "name": "...", "description": "..."}
]
}
2. Required Fields (Per Official Schema)
| Field | Type | Description |
|---|---|---|
schemaVersion |
string | Schema version (e.g., "1.0") |
humanReadableId |
string | Unique identifier (e.g., "org/agent-name") |
agentVersion |
string | Agent software version (semantic) |
name |
string | Display name |
description |
string | Detailed description |
url |
string | Primary A2A endpoint URL |
provider |
object | Provider information |
provider.name |
string | Provider name |
capabilities |
object | Protocol capabilities |
capabilities.a2aVersion |
string | A2A protocol version |
authSchemes |
array | Authentication schemes (min 1) |
3. Capabilities Structure Change
Old: Array of capability objects
"capabilities": [
{"type": "task", "description": "Task execution"},
{"type": "streaming", "description": "SSE"}
]
New: Structured object with specific fields
"capabilities": {
"a2aVersion": "1.0",
"mcpVersion": "0.6",
"supportedMessageParts": ["text", "file", "data"],
"supportsPushNotifications": true,
"teeDetails": {...} // Optional TEE information
}
4. Skills vs Endpoints
Old: endpoints array (custom)
"endpoints": [
{"path": "/a2a/v1/message", "method": "POST", "protocol": "A2A"}
]
New: skills array (official)
"skills": [
{
"id": "task_execution",
"name": "Asynchronous Task Execution",
"description": "Execute tasks asynchronously...",
"input_schema": {...}, // JSON Schema
"output_schema": {...} // JSON Schema
}
]
5. Authentication Schemes (New Required Field)
"authSchemes": [
{
"scheme": "apiKey",
"description": "API key in Authorization header",
"service_identifier": "myservice"
},
{
"scheme": "oauth2",
"tokenUrl": "https://auth.example.com/oauth/token",
"scopes": ["read", "write"]
},
{
"scheme": "bearer",
"description": "Pre-shared bearer token"
},
{
"scheme": "none",
"description": "No authentication required"
}
]
Code Changes
Files Modified
-
internal/a2a/models/agent_card.go- Complete restructure- Added new official schema types
- Kept legacy types for backward compatibility
- Enhanced
UnmarshalJSONfor legacy format support
-
internal/a2a/server/agent_card.go- Updated generator- Now outputs official schema v1.0 format
- Includes all required fields
- Maintains legacy fields for compatibility
-
internal/a2a/client/discovery.go- Updated helpersValidateAgentCard()checks all required fieldsHasSkill()replaces capability checkingHas Capability()maintained for backward compatibility- Added
SupportsAuth()for auth scheme checking
New Types
type AgentCard struct {
// Required
SchemaVersion string
HumanReadableID string
AgentVersion string
Name string
Description string
URL string
Provider Provider
Capabilities Capabilities
AuthSchemes []AuthScheme
// Optional
Skills []Skill
Tags []string
PrivacyPolicyURL string
TermsOfServiceURL string
IconURL string
LastUpdated string
// Legacy (deprecated)
Version string
Endpoints []Endpoint
Metadata map[string]any
}
type Provider struct {
Name string
URL string
SupportContact string
}
type Capabilities struct {
A2AVersion string
MCPVersion string
SupportedMessageParts []string
SupportsPushNotifications bool
TEEDetails *TEEDetails
}
type TEEDetails struct {
Type string
AttestationEndpoint string
PublicKey string
Description string
}
type AuthScheme struct {
Scheme string
Description string
TokenURL string
Scopes []string
ServiceIdentifier string
}
type Skill struct {
ID string
Name string
Description string
InputSchema map[string]interface{}
OutputSchema map[string]interface{}
}
Backward Compatibility
Legacy Format Support
The UnmarshalJSON method handles:
- New official schema - Primary format
- Legacy array capabilities - Stored in
metadata.legacyCapabilities - Legacy object capabilities - Converted and stored in metadata
Migration Path
For Agent Shaker (as a server):
- ✅ Now outputs official schema v1.0
- ✅ Includes all required fields
- ✅ Maintains legacy fields for old clients
For External Agents (as clients):
- ✅ Can discover agents using old format
- ✅ Can discover agents using new format
- ✅ Legacy capabilities accessible via metadata
Breaking Changes
API Changes
-
card.Capabilitiesis now a struct, not an array- Old:
for _, cap := range card.Capabilities - New:
card.Capabilities.A2AVersion
- Old:
-
card.Versiondeprecated in favor ofcard.AgentVersion- Old:
card.Version - New:
card.AgentVersion(orcard.Versionfor legacy)
- Old:
-
HasCapability()behavior changed- Now checks legacy capabilities in metadata
- Maps to new schema features where possible
Required Updates
Client Code:
// Old
for _, cap := range card.Capabilities {
fmt.Println(cap.Type)
}
// New
for _, skill := range card.Skills {
fmt.Println(skill.ID)
}
Validation:
// Old
if card.Version == "" {
return fmt.Errorf("missing version")
}
// New
if card.AgentVersion == "" && card.Version == "" {
return fmt.Errorf("missing agentVersion")
}
TODO
- ⏳ Update test files for new schema
- ⏳ Update documentation
- ⏳ Add schema validation
- ⏳ Implement proper authentication schemes (currently only "none")
- ⏳ Add TEE support if needed
- ⏳ Update MCP integration to use new schema
Testing
Before updating tests:
# Currently failing due to schema changes
go test ./tests/a2a -v
After test updates:
- Tests should validate official schema compliance
- Tests should verify backward compatibility
- Tests should check all required fields
Agent Shaker's Current Agent Card
{
"schemaVersion": "1.0",
"humanReadableId": "techbuzzz/agent-shaker",
"agentVersion": "1.0.0",
"name": "Agent Shaker",
"description": "MCP-compatible context management server with A2A support...",
"url": "http://localhost:8080/a2a/v1",
"provider": {
"name": "techbuzzz",
"url": "https://github.com/techbuzzz/agent-shaker",
"support_contact": "https://github.com/techbuzzz/agent-shaker/issues"
},
"capabilities": {
"a2aVersion": "1.0",
"mcpVersion": "0.6",
"supportedMessageParts": ["text", "file", "data"],
"supportsPushNotifications": true
},
"authSchemes": [
{
"scheme": "none",
"description": "Public endpoints require no authentication..."
}
],
"skills": [
{
"id": "task_execution",
"name": "Asynchronous Task Execution",
"description": "Execute tasks asynchronously..."
},
{
"id": "sse_streaming",
"name": "Server-Sent Events Streaming",
"description": "Real-time task updates..."
},
{
"id": "artifact_sharing",
"name": "Artifact Sharing",
"description": "Share markdown contexts..."
},
{
"id": "mcp_integration",
"name": "MCP Protocol Support",
"description": "Model Context Protocol support..."
}
],
"tags": ["agent-coordination", "task-management", "mcp", "a2a", ...]
}
References
- Official Schema: https://gist.githubusercontent.com/SecureAgentTools/0815a2de9cc31c71468afd3d2eef260a/raw/agent-card-schema.md
- A2A Protocol: https://a2a-protocol.org/
- Agent Shaker Docs: See
docs/A2A_INTEGRATION.md
Status
✅ Schema compliance implemented
✅ Code compiles successfully
⏳ Tests need updating
⏳ Documentation needs updating
⏳ Production auth schemes need implementation
Next Steps:
- Update test files to work with new schema
- Test with external agents (Hello World Agent)
- Update all documentation references
- Consider implementing proper authentication