-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
563 lines (518 loc) · 13.4 KB
/
openapi.yaml
File metadata and controls
563 lines (518 loc) · 13.4 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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
openapi: "3.1.0"
info:
title: Yaad API
description: |
Yaad (याद) — model-agnostic, graph-native memory for coding agents.
Yaad is a **memory layer** — it does NOT call LLM APIs.
The coding agent (Hawk, Claude Code, Cursor, etc.) handles LLM calls.
Yaad stores, retrieves, and organizes memories via MCP, REST, or gRPC.
version: "0.1.0"
license:
name: MIT
url: https://github.com/GrayCodeAI/yaad/blob/main/LICENSE
contact:
url: https://github.com/GrayCodeAI/yaad
servers:
- url: http://localhost:3456
description: Local development server
tags:
- name: memory
description: Core memory operations
- name: graph
description: Graph traversal and analysis
- name: sessions
description: Session management
- name: search
description: Hybrid search
- name: system
description: Health and stats
- name: export
description: Import/export operations
- name: team
description: Team memory sharing
- name: skills
description: Procedural memory
paths:
/yaad/health:
get:
tags: [system]
summary: Health check
responses:
"200":
description: Server is healthy
content:
application/json:
schema:
type: object
properties:
status: { type: string, example: ok }
version: { type: string, example: "0.1.0" }
/yaad/graph/stats:
get:
tags: [system]
summary: Graph statistics
parameters:
- name: project
in: query
schema: { type: string }
responses:
"200":
description: Graph stats
content:
application/json:
schema:
$ref: '#/components/schemas/Stats'
/yaad/remember:
post:
tags: [memory]
summary: Store a memory node
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RememberInput'
responses:
"201":
description: Node created
content:
application/json:
schema:
$ref: '#/components/schemas/Node'
/yaad/recall:
post:
tags: [search]
summary: Graph-aware search (BM25 + graph + vector + temporal)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RecallInput'
responses:
"200":
description: Search results
content:
application/json:
schema:
$ref: '#/components/schemas/RecallResult'
/yaad/hybrid-recall:
post:
tags: [search]
summary: 4-path hybrid search with RRF fusion
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RecallInput'
responses:
"200":
description: Ranked results
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ScoredNode'
/yaad/context:
get:
tags: [memory]
summary: Get hot-tier context for session start (~2K tokens)
parameters:
- name: project
in: query
schema: { type: string }
responses:
"200":
description: Hot-tier subgraph
content:
application/json:
schema:
$ref: '#/components/schemas/RecallResult'
/yaad/node/{id}:
get:
tags: [graph]
summary: Get node and its neighbors
parameters:
- name: id
in: path
required: true
schema: { type: string }
responses:
"200":
description: Node with neighbors
/yaad/forget/{id}:
delete:
tags: [memory]
summary: Archive a memory node
parameters:
- name: id
in: path
required: true
schema: { type: string }
responses:
"200":
description: Node archived
/yaad/link:
post:
tags: [graph]
summary: Create edge between nodes
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LinkInput'
responses:
"201":
description: Edge created
/yaad/link/{id}:
delete:
tags: [graph]
summary: Remove edge
parameters:
- name: id
in: path
required: true
schema: { type: string }
responses:
"200":
description: Edge removed
/yaad/subgraph/{id}:
get:
tags: [graph]
summary: Get BFS subgraph around a node
parameters:
- name: id
in: path
required: true
schema: { type: string }
- name: depth
in: query
schema: { type: integer, default: 2 }
responses:
"200":
description: Subgraph
/yaad/impact/{file}:
get:
tags: [graph]
summary: Impact analysis — what memories are affected if this file changes?
parameters:
- name: file
in: path
required: true
schema: { type: string }
- name: depth
in: query
schema: { type: integer, default: 3 }
responses:
"200":
description: Affected nodes
/yaad/proactive:
get:
tags: [search]
summary: Proactive context prediction
parameters:
- name: project
in: query
schema: { type: string }
responses:
"200":
description: Predicted context
/yaad/session/start:
post:
tags: [sessions]
summary: Start a session and get context
requestBody:
content:
application/json:
schema:
type: object
properties:
project: { type: string }
agent: { type: string }
responses:
"201":
description: Session started with context
/yaad/session/end:
post:
tags: [sessions]
summary: End a session
requestBody:
content:
application/json:
schema:
type: object
properties:
id: { type: string }
summary: { type: string }
responses:
"200":
description: Session ended
/yaad/sessions:
get:
tags: [sessions]
summary: List recent sessions
parameters:
- name: project
in: query
schema: { type: string }
- name: limit
in: query
schema: { type: integer, default: 10 }
responses:
"200":
description: Sessions list
/yaad/stale:
get:
tags: [memory]
summary: Show stale memory subgraphs (git-aware)
responses:
"200":
description: Stale report
/yaad/events:
get:
tags: [system]
summary: SSE stream of real-time memory events
responses:
"200":
description: Server-Sent Events stream
content:
text/event-stream:
schema:
type: string
/yaad/replay/{session_id}:
get:
tags: [sessions]
summary: Get session replay timeline
parameters:
- name: session_id
in: path
required: true
schema: { type: string }
responses:
"200":
description: Replay events
/yaad/feedback:
post:
tags: [memory]
summary: Approve, edit, or discard a memory
requestBody:
content:
application/json:
schema:
type: object
properties:
id: { type: string }
action: { type: string, enum: [approve, edit, discard] }
new_content: { type: string }
responses:
"200":
description: Feedback applied
/yaad/decay:
post:
tags: [memory]
summary: Apply confidence decay to all nodes
responses:
"200":
description: Decay applied
/yaad/gc:
post:
tags: [memory]
summary: Garbage collect low-confidence nodes
responses:
"200":
description: GC result
/yaad/export/json:
post:
tags: [export]
summary: Export graph as JSON
parameters:
- name: project
in: query
schema: { type: string }
responses:
"200":
description: Graph JSON export
/yaad/export/markdown:
post:
tags: [export]
summary: Export memories as Markdown
responses:
"200":
description: Markdown export
/yaad/import/json:
post:
tags: [export]
summary: Import graph from JSON
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GraphExport'
responses:
"200":
description: Import result
/yaad/bridge/import:
post:
tags: [export]
summary: Import from CLAUDE.md / .cursorrules / AGENTS.md
requestBody:
content:
application/json:
schema:
type: object
properties:
dir: { type: string }
project: { type: string }
responses:
"200":
description: Import result
/yaad/bridge/export:
post:
tags: [export]
summary: Export hot-tier conventions to CLAUDE.md
responses:
"200":
description: Export result
/yaad/team/share:
post:
tags: [team]
summary: Share a memory with the team
responses:
"201":
description: Shared node
/yaad/team/memories:
get:
tags: [team]
summary: List team memories
parameters:
- name: team_id
in: query
schema: { type: string }
responses:
"200":
description: Team memories
/yaad/skill/store:
post:
tags: [skills]
summary: Store a skill (procedural memory)
responses:
"201":
description: Skill stored
/yaad/skill/list:
get:
tags: [skills]
summary: List all skills
responses:
"200":
description: Skills list
/yaad/bench:
post:
tags: [system]
summary: Run retrieval benchmark
responses:
"200":
description: Benchmark results
/yaad/ui:
get:
tags: [system]
summary: Web dashboard (D3.js graph visualization)
responses:
"200":
description: HTML dashboard
content:
text/html:
schema:
type: string
components:
schemas:
Node:
type: object
properties:
id: { type: string }
type: { type: string, enum: [convention, decision, bug, spec, task, preference, session, file, entity, skill] }
content: { type: string }
summary: { type: string }
scope: { type: string, enum: [global, project] }
project: { type: string }
tier: { type: integer, enum: [1, 2, 3] }
tags: { type: string }
confidence: { type: number, minimum: 0, maximum: 1 }
access_count: { type: integer }
created_at: { type: string, format: date-time }
Edge:
type: object
properties:
id: { type: string }
from_id: { type: string }
to_id: { type: string }
type: { type: string, enum: [caused_by, led_to, supersedes, relates_to, depends_on, touches, learned_in, part_of] }
acyclic: { type: boolean }
weight: { type: number }
RememberInput:
type: object
required: [content]
properties:
content: { type: string }
type: { type: string, default: decision }
summary: { type: string }
tags: { type: string }
project: { type: string }
scope: { type: string, default: project }
session: { type: string }
agent: { type: string }
RecallInput:
type: object
required: [query]
properties:
query: { type: string }
depth: { type: integer, default: 2 }
limit: { type: integer, default: 10 }
type: { type: string }
project: { type: string }
RecallResult:
type: object
properties:
nodes:
type: array
items:
$ref: '#/components/schemas/Node'
edges:
type: array
items:
$ref: '#/components/schemas/Edge'
ScoredNode:
type: object
properties:
node:
$ref: '#/components/schemas/Node'
score: { type: number }
LinkInput:
type: object
required: [from_id, to_id, type]
properties:
from_id: { type: string }
to_id: { type: string }
type: { type: string }
weight: { type: number, default: 1.0 }
Stats:
type: object
properties:
Nodes: { type: integer }
Edges: { type: integer }
Sessions: { type: integer }
GraphExport:
type: object
properties:
version: { type: string }
exported_at: { type: string, format: date-time }
nodes:
type: array
items:
$ref: '#/components/schemas/Node'
edges:
type: array
items:
$ref: '#/components/schemas/Edge'