-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
231 lines (231 loc) · 8.68 KB
/
Copy pathschema.json
File metadata and controls
231 lines (231 loc) · 8.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/aevum-network/agentcard-spec/schema.json",
"title": "AgentCard",
"description": "AgentCard v1.0 — the self-declaration of an agent's identity, capabilities, and terms. Pure data schema, zero execution logic. AgentCard is to A2A what HTTP headers are to the web.",
"type": "object",
"required": ["agent_id", "name", "version", "capabilities", "endpoint"],
"additionalProperties": false,
"properties": {
"agent_id": {
"type": "string",
"description": "Globally unique agent identifier. 128-bit ULID encoded as Crockford Base32 (26 characters, characters 0-9 and A-HJKMNP-TV-Z).",
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
"examples": ["01HZQK3P8EMXR9V7T5N2W4J6C0"]
},
"name": {
"type": "string",
"description": "Human-readable display name of this agent.",
"minLength": 1,
"maxLength": 128,
"examples": ["Mistral-7B Language Agent"]
},
"version": {
"type": "string",
"description": "Semantic version of this agent's card format (semver 2.0).",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"examples": ["1.0.0", "0.3.2-beta.1"]
},
"capabilities": {
"type": "array",
"description": "List of capabilities this agent offers. At least one capability is required.",
"minItems": 1,
"items": { "$ref": "#/$defs/Capability" }
},
"endpoint": {
"$ref": "#/$defs/Endpoint",
"description": "How to reach this agent."
},
"pricing": {
"oneOf": [
{ "$ref": "#/$defs/PricingModel" },
{ "type": "null" }
],
"description": "Optional cost model for interacting with this agent."
},
"metadata": {
"$ref": "#/$defs/Metadata",
"description": "Interaction statistics derived from PACR causal history (π projection). These fields are computed from the ledger, not self-declared."
}
},
"$defs": {
"Capability": {
"title": "Capability",
"description": "A single capability that the agent can perform.",
"type": "object",
"required": ["id", "description"],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "Machine-readable capability identifier. Dot-namespaced recommended: domain.verb",
"pattern": "^[a-z0-9][a-z0-9._-]*$",
"maxLength": 128,
"examples": ["text.generate", "code.review", "data.transform"]
},
"description": {
"type": "string",
"description": "Human-readable description of what this capability does.",
"minLength": 1,
"maxLength": 512
},
"tags": {
"type": "array",
"description": "Optional semantic tags for discovery and routing.",
"items": {
"type": "string",
"maxLength": 64
},
"uniqueItems": true
},
"input_schema": {
"description": "JSON Schema describing the input this capability accepts. Null means the input is unstructured.",
"oneOf": [
{ "type": "object" },
{ "type": "null" }
]
},
"output_schema": {
"description": "JSON Schema describing the output this capability produces. Null means the output is unstructured.",
"oneOf": [
{ "type": "object" },
{ "type": "null" }
]
}
}
},
"Endpoint": {
"title": "Endpoint",
"description": "How to reach this agent.",
"type": "object",
"required": ["protocol", "url"],
"additionalProperties": false,
"properties": {
"protocol": {
"$ref": "#/$defs/Protocol"
},
"url": {
"type": "string",
"description": "URL or address of the endpoint.",
"format": "uri",
"examples": ["https://agent.example.com/api", "wss://stream.example.com/events"]
},
"health_url": {
"type": "string",
"description": "Optional health-check endpoint.",
"format": "uri"
},
"auth": {
"description": "Authentication configuration. Null means no authentication required.",
"oneOf": [
{ "$ref": "#/$defs/AuthConfig" },
{ "type": "null" }
]
}
}
},
"Protocol": {
"title": "Protocol",
"description": "Transport protocol used to communicate with the agent.",
"type": "string",
"enum": ["http", "websocket", "sse", "grpc", "mcp", "google_a2a", "native"],
"examples": ["http"]
},
"AuthConfig": {
"title": "AuthConfig",
"description": "Authentication configuration for reaching this agent.",
"type": "object",
"required": ["scheme"],
"additionalProperties": true,
"properties": {
"scheme": {
"type": "string",
"description": "Authentication scheme name.",
"enum": ["none", "bearer", "api_key", "oauth2", "mtls"],
"examples": ["bearer"]
},
"token_url": {
"type": "string",
"description": "Token endpoint URL (for oauth2 scheme).",
"format": "uri"
},
"header": {
"type": "string",
"description": "Header name where the credential is sent (for api_key scheme).",
"examples": ["X-API-Key"]
}
}
},
"PricingModel": {
"title": "PricingModel",
"description": "Cost model for interacting with this agent. Thermodynamic settlement is in Joules; fiat settlement is optional.",
"type": "object",
"additionalProperties": false,
"properties": {
"base_cost_joules": {
"type": ["number", "null"],
"description": "Base cost per request in Joules (Landauer thermodynamic unit). This is the canonical unit of account for agent-to-agent settlement. Must be >= 2.854e-21 (Landauer floor at 300K).",
"minimum": 0,
"examples": [2.854e-21, 1.0e-18]
},
"estimated_latency_ms": {
"type": ["number", "null"],
"description": "Estimated end-to-end latency in milliseconds. Derived from PACR Omega (Ω) history when populated via π projection.",
"minimum": 0,
"examples": [120.0, 30.5]
},
"currency": {
"type": ["string", "null"],
"description": "ISO 4217 currency code or token symbol for fiat/token settlement (optional complement to Joule pricing).",
"pattern": "^[A-Z]{3,10}$",
"examples": ["USD", "USDC"]
},
"cost_per_request": {
"type": ["number", "null"],
"description": "Cost per request in the specified fiat/token currency. Only meaningful when 'currency' is also set.",
"minimum": 0,
"examples": [0.001]
}
}
},
"Metadata": {
"title": "Metadata",
"description": "Metadata derived from PACR causal history via the π projection function. All fields with prefix 'pacr:' are computed from the causal ledger, not self-declared. Custom fields without the 'pacr:' prefix may be set by the agent operator.",
"type": "object",
"additionalProperties": true,
"properties": {
"pacr:interaction_count": {
"type": "integer",
"description": "Count of PACR records involving this agent_id.",
"minimum": 0
},
"pacr:avg_latency_ms": {
"type": "number",
"description": "Time-decay-weighted average latency in milliseconds: Σ(Ω.time × exp(-λΔt)) / Σ(exp(-λΔt)).",
"minimum": 0
},
"pacr:avg_cost_joules": {
"type": "number",
"description": "Time-decay-weighted average energy cost in Joules: Σ(Ω.energy × exp(-λΔt)) / Σ(exp(-λΔt)).",
"minimum": 0
},
"pacr:reputation_score": {
"type": "number",
"description": "Reputation score in [0.0, 1.0]: f(success_rate, latency, Sτ/Hτ ratio). Higher is better.",
"minimum": 0.0,
"maximum": 1.0
},
"pacr:influence_rank": {
"type": "number",
"description": "PageRank variant on causal interaction graph. Measures how central this agent is to overall system flow.",
"minimum": 0.0
},
"pacr:critical_score": {
"type": "number",
"description": "Betweenness centrality score. Higher means more other agents depend on routing through this agent.",
"minimum": 0.0
}
}
}
}
}