-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
219 lines (208 loc) · 5.88 KB
/
openapi.yaml
File metadata and controls
219 lines (208 loc) · 5.88 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
openapi: 3.1.0
info:
title: Agent Run Protocol
description: |
Open standard for agent observability. Any agent runtime can report runs
to any compliant server. Mission Control is the reference implementation.
version: 0.1.0
license:
name: MIT
url: https://opensource.org/licenses/MIT
contact:
name: Builderz Labs
url: https://github.com/builderz-labs/agent-run
servers:
- url: http://localhost:3000/api/v1
description: Local Mission Control instance
paths:
/runs:
post:
operationId: createRun
summary: Report a new agent run
description: |
Called by agent runtimes to report a completed (or in-progress) run.
The server validates the run against the AgentRun schema and stores it.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AgentRun'
responses:
'201':
description: Run created
content:
application/json:
schema:
type: object
properties:
id: { type: string }
run_hash: { type: string }
'400':
description: Invalid run data
'401':
description: Unauthorized
get:
operationId: listRuns
summary: List agent runs
parameters:
- name: agent_id
in: query
schema: { type: string }
- name: status
in: query
schema: { type: string, enum: [pending, running, completed, failed, cancelled, timeout] }
- name: since
in: query
schema: { type: string, format: date-time }
- name: limit
in: query
schema: { type: integer, default: 50, maximum: 200 }
- name: offset
in: query
schema: { type: integer, default: 0 }
responses:
'200':
description: List of runs
content:
application/json:
schema:
type: object
properties:
runs:
type: array
items:
$ref: '#/components/schemas/AgentRun'
total: { type: integer }
/runs/{run_id}:
get:
operationId: getRun
summary: Get a single run by ID
parameters:
- name: run_id
in: path
required: true
schema: { type: string }
responses:
'200':
description: The run
content:
application/json:
schema:
$ref: '#/components/schemas/AgentRun'
'404':
description: Run not found
/runs/{run_id}/provenance:
get:
operationId: getRunProvenance
summary: Get the provenance record for a run
description: |
Returns the cryptographic provenance chain for a run, including
lineage hashes and optional signature. Used for audit trails.
parameters:
- name: run_id
in: path
required: true
schema: { type: string }
responses:
'200':
description: Provenance record
content:
application/json:
schema:
$ref: '#/components/schemas/Provenance'
'404':
description: Run not found
/runs/{run_id}/eval:
put:
operationId: setRunEval
summary: Attach or update an eval result for a run
description: |
Eval results can be attached after the run completes. This allows
separate eval pipelines to score runs independently.
parameters:
- name: run_id
in: path
required: true
schema: { type: string }
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EvalResult'
responses:
'200':
description: Eval attached
'404':
description: Run not found
/runs/stream:
get:
operationId: streamRuns
summary: Server-Sent Events stream of new runs
description: |
Real-time stream of AgentRun events as they are created or updated.
Useful for dashboards and monitoring.
responses:
'200':
description: SSE stream
content:
text/event-stream:
schema:
type: string
/evals/leaderboard:
get:
operationId: getLeaderboard
summary: Get eval leaderboard
parameters:
- name: benchmark_id
in: query
schema: { type: string }
- name: limit
in: query
schema: { type: integer, default: 50 }
responses:
'200':
description: Leaderboard entries
content:
application/json:
schema:
type: object
properties:
entries:
type: array
items:
type: object
properties:
agent_name: { type: string }
model: { type: string }
runtime: { type: string }
avg_score: { type: number }
pass_rate: { type: number }
avg_cost_usd: { type: number }
run_count: { type: integer }
components:
schemas:
AgentRun:
$ref: 'agent-run.json'
Step:
$ref: 'step.json'
Cost:
$ref: 'cost.json'
Provenance:
$ref: 'provenance.json'
EvalResult:
$ref: 'eval.json'
securitySchemes:
apiKey:
type: apiKey
in: header
name: X-API-Key
description: API key issued by the agent-run server
bearer:
type: http
scheme: bearer
description: Bearer token authentication
security:
- apiKey: []
- bearer: []