-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschema.json
More file actions
108 lines (108 loc) · 3.26 KB
/
schema.json
File metadata and controls
108 lines (108 loc) · 3.26 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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/hashtrust/acds/spec/schema.json",
"title": "Agent Capability Declaration",
"description": "Schema for declaring AI agent capabilities in a machine-readable format.",
"type": "object",
"required": ["agent_id", "version", "capabilities"],
"additionalProperties": false,
"properties": {
"agent_id": {
"type": "string",
"minLength": 1,
"description": "Unique identifier for the agent."
},
"version": {
"type": "string",
"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-]+)*))?$",
"description": "Semantic version of the capability manifest."
},
"capabilities": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/capability"
},
"description": "List of capabilities the agent declares."
}
},
"definitions": {
"capability": {
"type": "object",
"required": [
"name",
"description",
"inputs",
"outputs",
"pricing",
"latency_class",
"requires_payment"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"pattern": "^[a-z][a-z0-9]*(_[a-z0-9]+)*$",
"description": "Snake_case name of the capability."
},
"description": {
"type": "string",
"minLength": 1,
"description": "Human-readable description of what this capability does."
},
"inputs": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/primitive_type"
},
"description": "Input parameters as key-type pairs."
},
"outputs": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/primitive_type"
},
"description": "Output values as key-type pairs."
},
"pricing": {
"$ref": "#/definitions/pricing",
"description": "Pricing information for this capability."
},
"latency_class": {
"type": "string",
"enum": ["fast", "medium", "slow"],
"description": "Expected latency class."
},
"requires_payment": {
"type": "boolean",
"description": "Whether this capability requires payment before execution."
}
}
},
"primitive_type": {
"type": "string",
"enum": ["string", "number", "boolean", "object", "array"]
},
"pricing": {
"type": "object",
"required": ["type", "cost", "currency"],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"description": "Pricing model type (e.g. per_call, per_token, flat)."
},
"cost": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$",
"description": "Cost as a decimal string."
},
"currency": {
"type": "string",
"minLength": 1,
"description": "Currency code (e.g. USD, EUR)."
}
}
}
}
}