@almadar/std 3.12.2 → 3.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  2. package/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  3. package/behaviors/exports/atoms/std-agent-classifier.orb +871 -0
  4. package/behaviors/exports/atoms/std-agent-completion.orb +933 -0
  5. package/behaviors/exports/atoms/std-agent-context-window.orb +2294 -0
  6. package/behaviors/exports/atoms/std-agent-conversation.orb +1020 -0
  7. package/behaviors/exports/atoms/std-agent-memory.orb +879 -0
  8. package/behaviors/exports/atoms/std-agent-provider.orb +898 -0
  9. package/behaviors/exports/atoms/std-agent-search.orb +448 -0
  10. package/behaviors/exports/atoms/std-agent-session.orb +835 -0
  11. package/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  12. package/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  13. package/behaviors/exports/atoms/std-agent-tool-call.orb +1237 -0
  14. package/behaviors/exports/molecules/std-agent-fix-loop.orb +3177 -0
  15. package/behaviors/exports/molecules/std-agent-learner.orb +2950 -0
  16. package/behaviors/exports/molecules/std-agent-planner.orb +2655 -0
  17. package/behaviors/exports/molecules/std-agent-rag.orb +1871 -0
  18. package/behaviors/exports/molecules/std-agent-tool-loop.orb +4857 -0
  19. package/behaviors/exports/organisms/std-agent-assistant.orb +6440 -0
  20. package/behaviors/exports/organisms/std-agent-builder.orb +14863 -0
  21. package/behaviors/exports/organisms/std-agent-pipeline.orb +11950 -0
  22. package/behaviors/exports/organisms/std-agent-reviewer.orb +5405 -0
  23. package/behaviors/exports/organisms/std-agent-tutor.orb +5107 -0
  24. package/behaviors/exports/validation-report.json +2 -1099
  25. package/dist/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  26. package/dist/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  27. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +871 -0
  28. package/dist/behaviors/exports/atoms/std-agent-completion.orb +933 -0
  29. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +2294 -0
  30. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +1020 -0
  31. package/dist/behaviors/exports/atoms/std-agent-memory.orb +879 -0
  32. package/dist/behaviors/exports/atoms/std-agent-provider.orb +898 -0
  33. package/dist/behaviors/exports/atoms/std-agent-search.orb +448 -0
  34. package/dist/behaviors/exports/atoms/std-agent-session.orb +835 -0
  35. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  36. package/dist/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  37. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +1237 -0
  38. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +3177 -0
  39. package/dist/behaviors/exports/molecules/std-agent-learner.orb +2950 -0
  40. package/dist/behaviors/exports/molecules/std-agent-planner.orb +2655 -0
  41. package/dist/behaviors/exports/molecules/std-agent-rag.orb +1871 -0
  42. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +4857 -0
  43. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +6440 -0
  44. package/dist/behaviors/exports/organisms/std-agent-builder.orb +14863 -0
  45. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +11950 -0
  46. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +5405 -0
  47. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +5107 -0
  48. package/dist/behaviors/exports/validation-report.json +2 -1099
  49. package/dist/behaviors/exports-reader.js +7156 -302
  50. package/dist/behaviors/exports-reader.js.map +1 -1
  51. package/dist/behaviors/functions/index.d.ts +781 -1
  52. package/dist/behaviors/functions/index.js +7080 -303
  53. package/dist/behaviors/functions/index.js.map +1 -1
  54. package/dist/behaviors/index.d.ts +1 -1
  55. package/dist/behaviors/index.js +7159 -305
  56. package/dist/behaviors/index.js.map +1 -1
  57. package/dist/behaviors/query.js +7158 -304
  58. package/dist/behaviors/query.js.map +1 -1
  59. package/dist/exports/atoms/std-agent-activity-log.orb +559 -0
  60. package/dist/exports/atoms/std-agent-chat-thread.orb +774 -0
  61. package/dist/exports/atoms/std-agent-classifier.orb +871 -0
  62. package/dist/exports/atoms/std-agent-completion.orb +933 -0
  63. package/dist/exports/atoms/std-agent-context-window.orb +2294 -0
  64. package/dist/exports/atoms/std-agent-conversation.orb +1020 -0
  65. package/dist/exports/atoms/std-agent-memory.orb +879 -0
  66. package/dist/exports/atoms/std-agent-provider.orb +898 -0
  67. package/dist/exports/atoms/std-agent-search.orb +448 -0
  68. package/dist/exports/atoms/std-agent-session.orb +835 -0
  69. package/dist/exports/atoms/std-agent-step-progress.orb +850 -0
  70. package/dist/exports/atoms/std-agent-token-gauge.orb +1616 -0
  71. package/dist/exports/atoms/std-agent-tool-call.orb +1237 -0
  72. package/dist/exports/molecules/std-agent-fix-loop.orb +3177 -0
  73. package/dist/exports/molecules/std-agent-learner.orb +2950 -0
  74. package/dist/exports/molecules/std-agent-planner.orb +2655 -0
  75. package/dist/exports/molecules/std-agent-rag.orb +1871 -0
  76. package/dist/exports/molecules/std-agent-tool-loop.orb +4857 -0
  77. package/dist/exports/organisms/std-agent-assistant.orb +6440 -0
  78. package/dist/exports/organisms/std-agent-builder.orb +14863 -0
  79. package/dist/exports/organisms/std-agent-pipeline.orb +11950 -0
  80. package/dist/exports/organisms/std-agent-reviewer.orb +5405 -0
  81. package/dist/exports/organisms/std-agent-tutor.orb +5107 -0
  82. package/dist/exports/validation-report.json +2 -1099
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +7159 -305
  85. package/dist/index.js.map +1 -1
  86. package/package.json +1 -1
@@ -0,0 +1,1871 @@
1
+ {
2
+ "name": "AgentRagOrbital",
3
+ "orbitals": [
4
+ {
5
+ "name": "AgentRagOrbital",
6
+ "entity": {
7
+ "name": "AgentRag",
8
+ "persistence": "runtime",
9
+ "fields": [
10
+ {
11
+ "name": "id",
12
+ "type": "string"
13
+ },
14
+ {
15
+ "name": "name",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "name": "description",
20
+ "type": "string"
21
+ },
22
+ {
23
+ "name": "status",
24
+ "type": "string",
25
+ "default": "active",
26
+ "values": [
27
+ "active",
28
+ "inactive",
29
+ "pending"
30
+ ]
31
+ },
32
+ {
33
+ "name": "createdAt",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "name": "query",
38
+ "type": "string",
39
+ "default": ""
40
+ },
41
+ {
42
+ "name": "context",
43
+ "type": "string",
44
+ "default": ""
45
+ },
46
+ {
47
+ "name": "response",
48
+ "type": "string",
49
+ "default": ""
50
+ },
51
+ {
52
+ "name": "memoryHits",
53
+ "type": "number",
54
+ "default": 0
55
+ },
56
+ {
57
+ "name": "searchHits",
58
+ "type": "number",
59
+ "default": 0
60
+ },
61
+ {
62
+ "name": "error",
63
+ "type": "string",
64
+ "default": ""
65
+ },
66
+ {
67
+ "name": "content",
68
+ "type": "string",
69
+ "default": ""
70
+ },
71
+ {
72
+ "name": "category",
73
+ "type": "string",
74
+ "default": ""
75
+ },
76
+ {
77
+ "name": "scope",
78
+ "type": "string",
79
+ "default": ""
80
+ },
81
+ {
82
+ "name": "strength",
83
+ "type": "number",
84
+ "default": 1
85
+ },
86
+ {
87
+ "name": "pinned",
88
+ "type": "boolean",
89
+ "default": false
90
+ },
91
+ {
92
+ "name": "language",
93
+ "type": "string",
94
+ "default": ""
95
+ },
96
+ {
97
+ "name": "resultCount",
98
+ "type": "number",
99
+ "default": 0
100
+ },
101
+ {
102
+ "name": "results",
103
+ "type": "string",
104
+ "default": "[]"
105
+ },
106
+ {
107
+ "name": "prompt",
108
+ "type": "string",
109
+ "default": ""
110
+ },
111
+ {
112
+ "name": "provider",
113
+ "type": "string",
114
+ "default": "anthropic"
115
+ },
116
+ {
117
+ "name": "model",
118
+ "type": "string",
119
+ "default": "claude-sonnet-4-20250514"
120
+ }
121
+ ]
122
+ },
123
+ "traits": [
124
+ {
125
+ "name": "AgentRagRag",
126
+ "linkedEntity": "AgentRag",
127
+ "category": "interaction",
128
+ "stateMachine": {
129
+ "states": [
130
+ {
131
+ "name": "idle",
132
+ "isInitial": true
133
+ },
134
+ {
135
+ "name": "retrieving"
136
+ },
137
+ {
138
+ "name": "generating"
139
+ },
140
+ {
141
+ "name": "completed"
142
+ }
143
+ ],
144
+ "events": [
145
+ {
146
+ "key": "INIT",
147
+ "name": "Initialize"
148
+ },
149
+ {
150
+ "key": "GENERATE",
151
+ "name": "Generate"
152
+ },
153
+ {
154
+ "key": "RETRIEVAL_DONE",
155
+ "name": "Retrieval Done",
156
+ "payload": [
157
+ {
158
+ "name": "context",
159
+ "type": "string",
160
+ "required": true
161
+ },
162
+ {
163
+ "name": "memoryHits",
164
+ "type": "number",
165
+ "required": true
166
+ },
167
+ {
168
+ "name": "searchHits",
169
+ "type": "number",
170
+ "required": true
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ "key": "GENERATION_DONE",
176
+ "name": "Generation Done",
177
+ "payload": [
178
+ {
179
+ "name": "response",
180
+ "type": "string",
181
+ "required": true
182
+ }
183
+ ]
184
+ },
185
+ {
186
+ "key": "FAILED",
187
+ "name": "Failed",
188
+ "payload": [
189
+ {
190
+ "name": "error",
191
+ "type": "string",
192
+ "required": true
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ "key": "RESET",
198
+ "name": "Reset"
199
+ }
200
+ ],
201
+ "transitions": [
202
+ {
203
+ "from": "idle",
204
+ "to": "idle",
205
+ "event": "INIT",
206
+ "effects": [
207
+ [
208
+ "render-ui",
209
+ "main",
210
+ {
211
+ "type": "stack",
212
+ "direction": "vertical",
213
+ "gap": "lg",
214
+ "children": [
215
+ {
216
+ "type": "stack",
217
+ "direction": "horizontal",
218
+ "gap": "sm",
219
+ "align": "center",
220
+ "children": [
221
+ {
222
+ "type": "icon",
223
+ "name": "brain",
224
+ "size": "lg"
225
+ },
226
+ {
227
+ "type": "typography",
228
+ "content": "RAG Pipeline",
229
+ "variant": "h2"
230
+ }
231
+ ]
232
+ },
233
+ {
234
+ "type": "divider"
235
+ },
236
+ {
237
+ "type": "card",
238
+ "children": [
239
+ {
240
+ "type": "stack",
241
+ "direction": "vertical",
242
+ "gap": "md",
243
+ "children": [
244
+ {
245
+ "type": "typography",
246
+ "content": "Enter a query to retrieve context and generate a response",
247
+ "variant": "body"
248
+ },
249
+ {
250
+ "type": "form-section",
251
+ "entity": "AgentRag",
252
+ "mode": "edit",
253
+ "submitEvent": "GENERATE",
254
+ "fields": [
255
+ "query"
256
+ ]
257
+ }
258
+ ]
259
+ }
260
+ ]
261
+ }
262
+ ]
263
+ }
264
+ ]
265
+ ]
266
+ },
267
+ {
268
+ "from": "idle",
269
+ "to": "retrieving",
270
+ "event": "GENERATE",
271
+ "effects": [
272
+ [
273
+ "set",
274
+ "@entity.status",
275
+ "retrieving"
276
+ ],
277
+ [
278
+ "agent/recall",
279
+ "@entity.query",
280
+ 5
281
+ ],
282
+ [
283
+ "agent/search-code",
284
+ "@entity.query"
285
+ ],
286
+ [
287
+ "render-ui",
288
+ "main",
289
+ {
290
+ "type": "stack",
291
+ "direction": "vertical",
292
+ "gap": "lg",
293
+ "align": "center",
294
+ "children": [
295
+ {
296
+ "type": "icon",
297
+ "name": "search",
298
+ "size": "lg"
299
+ },
300
+ {
301
+ "type": "typography",
302
+ "content": "Retrieving context...",
303
+ "variant": "h3"
304
+ },
305
+ {
306
+ "type": "spinner",
307
+ "size": "lg"
308
+ },
309
+ {
310
+ "type": "stack",
311
+ "direction": "horizontal",
312
+ "gap": "md",
313
+ "justify": "center",
314
+ "children": [
315
+ {
316
+ "type": "badge",
317
+ "label": "Recalling memories"
318
+ },
319
+ {
320
+ "type": "badge",
321
+ "label": "Searching code"
322
+ }
323
+ ]
324
+ }
325
+ ]
326
+ }
327
+ ]
328
+ ]
329
+ },
330
+ {
331
+ "from": "retrieving",
332
+ "to": "generating",
333
+ "event": "RETRIEVAL_DONE",
334
+ "effects": [
335
+ [
336
+ "set",
337
+ "@entity.context",
338
+ "@payload.context"
339
+ ],
340
+ [
341
+ "set",
342
+ "@entity.memoryHits",
343
+ "@payload.memoryHits"
344
+ ],
345
+ [
346
+ "set",
347
+ "@entity.searchHits",
348
+ "@payload.searchHits"
349
+ ],
350
+ [
351
+ "set",
352
+ "@entity.status",
353
+ "generating"
354
+ ],
355
+ [
356
+ "agent/generate",
357
+ [
358
+ "str/concat",
359
+ "Context:\n",
360
+ "@entity.context",
361
+ "\n\nQuery: ",
362
+ "@entity.query",
363
+ "\n\nProvide a comprehensive answer based on the retrieved context."
364
+ ]
365
+ ],
366
+ [
367
+ "render-ui",
368
+ "main",
369
+ {
370
+ "type": "stack",
371
+ "direction": "vertical",
372
+ "gap": "lg",
373
+ "align": "center",
374
+ "children": [
375
+ {
376
+ "type": "icon",
377
+ "name": "cpu",
378
+ "size": "lg"
379
+ },
380
+ {
381
+ "type": "typography",
382
+ "content": "Generating response...",
383
+ "variant": "h3"
384
+ },
385
+ {
386
+ "type": "spinner",
387
+ "size": "lg"
388
+ },
389
+ {
390
+ "type": "stack",
391
+ "direction": "horizontal",
392
+ "gap": "md",
393
+ "justify": "center",
394
+ "children": [
395
+ {
396
+ "type": "badge",
397
+ "label": [
398
+ "str/concat",
399
+ [
400
+ "str/concat",
401
+ "@entity.memoryHits"
402
+ ],
403
+ " memories"
404
+ ]
405
+ },
406
+ {
407
+ "type": "badge",
408
+ "label": [
409
+ "str/concat",
410
+ [
411
+ "str/concat",
412
+ "@entity.searchHits"
413
+ ],
414
+ " code hits"
415
+ ]
416
+ }
417
+ ]
418
+ }
419
+ ]
420
+ }
421
+ ]
422
+ ]
423
+ },
424
+ {
425
+ "from": "generating",
426
+ "to": "completed",
427
+ "event": "GENERATION_DONE",
428
+ "effects": [
429
+ [
430
+ "set",
431
+ "@entity.response",
432
+ "@payload.response"
433
+ ],
434
+ [
435
+ "set",
436
+ "@entity.status",
437
+ "completed"
438
+ ],
439
+ [
440
+ "agent/memorize",
441
+ [
442
+ "str/concat",
443
+ "RAG query: ",
444
+ "@entity.query"
445
+ ],
446
+ "pattern-affinity"
447
+ ],
448
+ [
449
+ "render-ui",
450
+ "main",
451
+ {
452
+ "type": "stack",
453
+ "direction": "vertical",
454
+ "gap": "lg",
455
+ "children": [
456
+ {
457
+ "type": "stack",
458
+ "direction": "horizontal",
459
+ "gap": "sm",
460
+ "align": "center",
461
+ "justify": "space-between",
462
+ "children": [
463
+ {
464
+ "type": "stack",
465
+ "direction": "horizontal",
466
+ "gap": "sm",
467
+ "align": "center",
468
+ "children": [
469
+ {
470
+ "type": "icon",
471
+ "name": "check-circle",
472
+ "size": "lg"
473
+ },
474
+ {
475
+ "type": "typography",
476
+ "content": "RAG Complete",
477
+ "variant": "h2"
478
+ }
479
+ ]
480
+ },
481
+ {
482
+ "type": "button",
483
+ "label": "New Query",
484
+ "event": "RESET",
485
+ "variant": "ghost",
486
+ "icon": "rotate-ccw"
487
+ }
488
+ ]
489
+ },
490
+ {
491
+ "type": "divider"
492
+ },
493
+ {
494
+ "type": "simple-grid",
495
+ "columns": 2,
496
+ "children": [
497
+ {
498
+ "type": "stat-display",
499
+ "label": "Memory Hits",
500
+ "value": "@entity.memoryHits",
501
+ "icon": "brain"
502
+ },
503
+ {
504
+ "type": "stat-display",
505
+ "label": "Code Hits",
506
+ "value": "@entity.searchHits",
507
+ "icon": "code"
508
+ }
509
+ ]
510
+ },
511
+ {
512
+ "type": "divider"
513
+ },
514
+ {
515
+ "type": "card",
516
+ "children": [
517
+ {
518
+ "type": "stack",
519
+ "direction": "vertical",
520
+ "gap": "md",
521
+ "children": [
522
+ {
523
+ "type": "typography",
524
+ "content": "Query",
525
+ "variant": "caption"
526
+ },
527
+ {
528
+ "type": "typography",
529
+ "content": "@entity.query",
530
+ "variant": "body"
531
+ },
532
+ {
533
+ "type": "divider"
534
+ },
535
+ {
536
+ "type": "typography",
537
+ "content": "Response",
538
+ "variant": "caption"
539
+ },
540
+ {
541
+ "type": "typography",
542
+ "content": "@entity.response",
543
+ "variant": "body"
544
+ }
545
+ ]
546
+ }
547
+ ]
548
+ },
549
+ {
550
+ "type": "card",
551
+ "children": [
552
+ {
553
+ "type": "stack",
554
+ "direction": "vertical",
555
+ "gap": "sm",
556
+ "children": [
557
+ {
558
+ "type": "typography",
559
+ "content": "Retrieved Context",
560
+ "variant": "caption"
561
+ },
562
+ {
563
+ "type": "typography",
564
+ "content": "@entity.context",
565
+ "variant": "body"
566
+ }
567
+ ]
568
+ }
569
+ ]
570
+ }
571
+ ]
572
+ }
573
+ ]
574
+ ]
575
+ },
576
+ {
577
+ "from": "retrieving",
578
+ "to": "idle",
579
+ "event": "FAILED",
580
+ "effects": [
581
+ [
582
+ "set",
583
+ "@entity.error",
584
+ "@payload.error"
585
+ ],
586
+ [
587
+ "set",
588
+ "@entity.status",
589
+ "error"
590
+ ],
591
+ [
592
+ "render-ui",
593
+ "main",
594
+ {
595
+ "type": "stack",
596
+ "direction": "vertical",
597
+ "gap": "lg",
598
+ "align": "center",
599
+ "children": [
600
+ {
601
+ "type": "icon",
602
+ "name": "alert-triangle",
603
+ "size": "lg"
604
+ },
605
+ {
606
+ "type": "typography",
607
+ "content": "RAG Pipeline Error",
608
+ "variant": "h2"
609
+ },
610
+ {
611
+ "type": "alert",
612
+ "variant": "error",
613
+ "message": "@entity.error"
614
+ },
615
+ {
616
+ "type": "button",
617
+ "label": "Try Again",
618
+ "event": "RESET",
619
+ "variant": "primary",
620
+ "icon": "rotate-ccw"
621
+ }
622
+ ]
623
+ }
624
+ ]
625
+ ]
626
+ },
627
+ {
628
+ "from": "generating",
629
+ "to": "idle",
630
+ "event": "FAILED",
631
+ "effects": [
632
+ [
633
+ "set",
634
+ "@entity.error",
635
+ "@payload.error"
636
+ ],
637
+ [
638
+ "set",
639
+ "@entity.status",
640
+ "error"
641
+ ],
642
+ [
643
+ "render-ui",
644
+ "main",
645
+ {
646
+ "type": "stack",
647
+ "direction": "vertical",
648
+ "gap": "lg",
649
+ "align": "center",
650
+ "children": [
651
+ {
652
+ "type": "icon",
653
+ "name": "alert-triangle",
654
+ "size": "lg"
655
+ },
656
+ {
657
+ "type": "typography",
658
+ "content": "RAG Pipeline Error",
659
+ "variant": "h2"
660
+ },
661
+ {
662
+ "type": "alert",
663
+ "variant": "error",
664
+ "message": "@entity.error"
665
+ },
666
+ {
667
+ "type": "button",
668
+ "label": "Try Again",
669
+ "event": "RESET",
670
+ "variant": "primary",
671
+ "icon": "rotate-ccw"
672
+ }
673
+ ]
674
+ }
675
+ ]
676
+ ]
677
+ },
678
+ {
679
+ "from": "completed",
680
+ "to": "idle",
681
+ "event": "RESET",
682
+ "effects": [
683
+ [
684
+ "set",
685
+ "@entity.status",
686
+ "idle"
687
+ ],
688
+ [
689
+ "set",
690
+ "@entity.response",
691
+ ""
692
+ ],
693
+ [
694
+ "set",
695
+ "@entity.context",
696
+ ""
697
+ ],
698
+ [
699
+ "set",
700
+ "@entity.memoryHits",
701
+ 0
702
+ ],
703
+ [
704
+ "set",
705
+ "@entity.searchHits",
706
+ 0
707
+ ],
708
+ [
709
+ "set",
710
+ "@entity.error",
711
+ ""
712
+ ],
713
+ [
714
+ "render-ui",
715
+ "main",
716
+ {
717
+ "type": "stack",
718
+ "direction": "vertical",
719
+ "gap": "lg",
720
+ "children": [
721
+ {
722
+ "type": "stack",
723
+ "direction": "horizontal",
724
+ "gap": "sm",
725
+ "align": "center",
726
+ "children": [
727
+ {
728
+ "type": "icon",
729
+ "name": "brain",
730
+ "size": "lg"
731
+ },
732
+ {
733
+ "type": "typography",
734
+ "content": "RAG Pipeline",
735
+ "variant": "h2"
736
+ }
737
+ ]
738
+ },
739
+ {
740
+ "type": "divider"
741
+ },
742
+ {
743
+ "type": "card",
744
+ "children": [
745
+ {
746
+ "type": "stack",
747
+ "direction": "vertical",
748
+ "gap": "md",
749
+ "children": [
750
+ {
751
+ "type": "typography",
752
+ "content": "Enter a query to retrieve context and generate a response",
753
+ "variant": "body"
754
+ },
755
+ {
756
+ "type": "form-section",
757
+ "entity": "AgentRag",
758
+ "mode": "edit",
759
+ "submitEvent": "GENERATE",
760
+ "fields": [
761
+ "query"
762
+ ]
763
+ }
764
+ ]
765
+ }
766
+ ]
767
+ }
768
+ ]
769
+ }
770
+ ]
771
+ ]
772
+ }
773
+ ]
774
+ }
775
+ },
776
+ {
777
+ "name": "RagTabs",
778
+ "linkedEntity": "AgentRag",
779
+ "category": "interaction",
780
+ "stateMachine": {
781
+ "states": [
782
+ {
783
+ "name": "idle",
784
+ "isInitial": true
785
+ }
786
+ ],
787
+ "events": [
788
+ {
789
+ "key": "INIT",
790
+ "name": "Initialize"
791
+ },
792
+ {
793
+ "key": "SELECT_TAB",
794
+ "name": "Select Tab",
795
+ "payload": [
796
+ {
797
+ "name": "tab",
798
+ "type": "string",
799
+ "required": true
800
+ }
801
+ ]
802
+ }
803
+ ],
804
+ "transitions": [
805
+ {
806
+ "from": "idle",
807
+ "to": "idle",
808
+ "event": "INIT",
809
+ "effects": [
810
+ [
811
+ "fetch",
812
+ "AgentRag"
813
+ ],
814
+ [
815
+ "render-ui",
816
+ "main",
817
+ {
818
+ "type": "stack",
819
+ "direction": "vertical",
820
+ "gap": "lg",
821
+ "children": [
822
+ {
823
+ "type": "stack",
824
+ "direction": "horizontal",
825
+ "gap": "sm",
826
+ "align": "center",
827
+ "children": [
828
+ {
829
+ "type": "icon",
830
+ "name": "brain",
831
+ "size": "lg"
832
+ },
833
+ {
834
+ "type": "typography",
835
+ "content": "RAG Pipeline",
836
+ "variant": "h2"
837
+ }
838
+ ]
839
+ },
840
+ {
841
+ "type": "divider"
842
+ },
843
+ {
844
+ "type": "tabs",
845
+ "tabs": [
846
+ {
847
+ "label": "Query",
848
+ "value": "query"
849
+ },
850
+ {
851
+ "label": "Sources",
852
+ "value": "sources"
853
+ },
854
+ {
855
+ "label": "Response",
856
+ "value": "response"
857
+ }
858
+ ],
859
+ "defaultActiveTab": "query",
860
+ "onTabChange": "SELECT_TAB"
861
+ },
862
+ {
863
+ "type": "divider"
864
+ },
865
+ {
866
+ "type": "data-grid",
867
+ "entity": "AgentRag",
868
+ "emptyIcon": "inbox",
869
+ "emptyTitle": "No agentrags yet",
870
+ "emptyDescription": "Add agentrags to see them here.",
871
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
872
+ "renderItem": [
873
+ "fn",
874
+ "item",
875
+ {
876
+ "type": "stack",
877
+ "direction": "vertical",
878
+ "gap": "sm",
879
+ "children": [
880
+ {
881
+ "type": "typography",
882
+ "variant": "h4",
883
+ "content": "@item.name"
884
+ },
885
+ {
886
+ "type": "typography",
887
+ "variant": "caption",
888
+ "color": "muted",
889
+ "content": "@item.query"
890
+ }
891
+ ]
892
+ }
893
+ ]
894
+ }
895
+ ]
896
+ }
897
+ ]
898
+ ]
899
+ },
900
+ {
901
+ "from": "idle",
902
+ "to": "idle",
903
+ "event": "SELECT_TAB",
904
+ "effects": [
905
+ [
906
+ "fetch",
907
+ "AgentRag"
908
+ ],
909
+ [
910
+ "render-ui",
911
+ "main",
912
+ {
913
+ "type": "stack",
914
+ "direction": "vertical",
915
+ "gap": "lg",
916
+ "children": [
917
+ {
918
+ "type": "stack",
919
+ "direction": "horizontal",
920
+ "gap": "sm",
921
+ "align": "center",
922
+ "children": [
923
+ {
924
+ "type": "icon",
925
+ "name": "brain",
926
+ "size": "lg"
927
+ },
928
+ {
929
+ "type": "typography",
930
+ "content": "RAG Pipeline",
931
+ "variant": "h2"
932
+ }
933
+ ]
934
+ },
935
+ {
936
+ "type": "divider"
937
+ },
938
+ {
939
+ "type": "tabs",
940
+ "tabs": [
941
+ {
942
+ "label": "Query",
943
+ "value": "query"
944
+ },
945
+ {
946
+ "label": "Sources",
947
+ "value": "sources"
948
+ },
949
+ {
950
+ "label": "Response",
951
+ "value": "response"
952
+ }
953
+ ],
954
+ "defaultActiveTab": "query",
955
+ "activeTab": "@payload.tab",
956
+ "onTabChange": "SELECT_TAB"
957
+ },
958
+ {
959
+ "type": "divider"
960
+ },
961
+ {
962
+ "type": "data-grid",
963
+ "entity": "AgentRag",
964
+ "emptyIcon": "inbox",
965
+ "emptyTitle": "No agentrags yet",
966
+ "emptyDescription": "Add agentrags to see them here.",
967
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
968
+ "renderItem": [
969
+ "fn",
970
+ "item",
971
+ {
972
+ "type": "stack",
973
+ "direction": "vertical",
974
+ "gap": "sm",
975
+ "children": [
976
+ {
977
+ "type": "typography",
978
+ "variant": "h4",
979
+ "content": "@item.name"
980
+ },
981
+ {
982
+ "type": "typography",
983
+ "variant": "caption",
984
+ "color": "muted",
985
+ "content": "@item.query"
986
+ }
987
+ ]
988
+ }
989
+ ]
990
+ }
991
+ ]
992
+ }
993
+ ]
994
+ ]
995
+ }
996
+ ]
997
+ }
998
+ },
999
+ {
1000
+ "name": "RagMemoryLifecycle",
1001
+ "linkedEntity": "AgentRag",
1002
+ "category": "interaction",
1003
+ "stateMachine": {
1004
+ "states": [
1005
+ {
1006
+ "name": "browsing",
1007
+ "isInitial": true
1008
+ }
1009
+ ],
1010
+ "events": [
1011
+ {
1012
+ "key": "INIT",
1013
+ "name": "Initialize"
1014
+ },
1015
+ {
1016
+ "key": "MEMORIZE",
1017
+ "name": "MEMORIZE"
1018
+ },
1019
+ {
1020
+ "key": "RECALL",
1021
+ "name": "RECALL"
1022
+ },
1023
+ {
1024
+ "key": "DECAY",
1025
+ "name": "DECAY"
1026
+ },
1027
+ {
1028
+ "key": "PIN",
1029
+ "name": "PIN",
1030
+ "payload": [
1031
+ {
1032
+ "name": "id",
1033
+ "type": "string",
1034
+ "required": true
1035
+ },
1036
+ {
1037
+ "name": "row",
1038
+ "type": "object"
1039
+ }
1040
+ ]
1041
+ },
1042
+ {
1043
+ "key": "REINFORCE",
1044
+ "name": "REINFORCE",
1045
+ "payload": [
1046
+ {
1047
+ "name": "id",
1048
+ "type": "string",
1049
+ "required": true
1050
+ },
1051
+ {
1052
+ "name": "row",
1053
+ "type": "object"
1054
+ }
1055
+ ]
1056
+ },
1057
+ {
1058
+ "key": "FORGET",
1059
+ "name": "FORGET",
1060
+ "payload": [
1061
+ {
1062
+ "name": "id",
1063
+ "type": "string",
1064
+ "required": true
1065
+ },
1066
+ {
1067
+ "name": "row",
1068
+ "type": "object"
1069
+ }
1070
+ ]
1071
+ },
1072
+ {
1073
+ "key": "MEMORIZED",
1074
+ "name": "MEMORIZED",
1075
+ "payload": [
1076
+ {
1077
+ "name": "data",
1078
+ "type": "object",
1079
+ "required": true
1080
+ }
1081
+ ]
1082
+ },
1083
+ {
1084
+ "key": "PINNED",
1085
+ "name": "PINNED",
1086
+ "payload": [
1087
+ {
1088
+ "name": "data",
1089
+ "type": "object",
1090
+ "required": true
1091
+ }
1092
+ ]
1093
+ },
1094
+ {
1095
+ "key": "FORGOT",
1096
+ "name": "FORGOT",
1097
+ "payload": [
1098
+ {
1099
+ "name": "data",
1100
+ "type": "object",
1101
+ "required": true
1102
+ }
1103
+ ]
1104
+ },
1105
+ {
1106
+ "key": "REINFORCED",
1107
+ "name": "REINFORCED",
1108
+ "payload": [
1109
+ {
1110
+ "name": "data",
1111
+ "type": "object",
1112
+ "required": true
1113
+ }
1114
+ ]
1115
+ },
1116
+ {
1117
+ "key": "DECAYED",
1118
+ "name": "DECAYED",
1119
+ "payload": [
1120
+ {
1121
+ "name": "data",
1122
+ "type": "object",
1123
+ "required": true
1124
+ }
1125
+ ]
1126
+ }
1127
+ ],
1128
+ "transitions": [
1129
+ {
1130
+ "from": "browsing",
1131
+ "to": "browsing",
1132
+ "event": "INIT",
1133
+ "effects": [
1134
+ [
1135
+ "ref",
1136
+ "AgentRag"
1137
+ ],
1138
+ [
1139
+ "render-ui",
1140
+ "main",
1141
+ {
1142
+ "type": "stack",
1143
+ "direction": "vertical",
1144
+ "gap": "lg",
1145
+ "className": "max-w-5xl mx-auto w-full",
1146
+ "children": [
1147
+ {
1148
+ "type": "stack",
1149
+ "direction": "horizontal",
1150
+ "gap": "md",
1151
+ "justify": "space-between",
1152
+ "align": "center",
1153
+ "children": [
1154
+ {
1155
+ "type": "stack",
1156
+ "direction": "horizontal",
1157
+ "gap": "sm",
1158
+ "align": "center",
1159
+ "children": [
1160
+ {
1161
+ "type": "icon",
1162
+ "name": "brain",
1163
+ "size": "lg"
1164
+ },
1165
+ {
1166
+ "type": "typography",
1167
+ "content": "AgentRag Manager",
1168
+ "variant": "h2"
1169
+ }
1170
+ ]
1171
+ },
1172
+ {
1173
+ "type": "stack",
1174
+ "direction": "horizontal",
1175
+ "gap": "sm",
1176
+ "children": [
1177
+ {
1178
+ "type": "button",
1179
+ "label": "Memorize",
1180
+ "event": "MEMORIZE",
1181
+ "variant": "primary",
1182
+ "icon": "plus"
1183
+ },
1184
+ {
1185
+ "type": "button",
1186
+ "label": "Recall",
1187
+ "event": "RECALL",
1188
+ "variant": "secondary",
1189
+ "icon": "search"
1190
+ },
1191
+ {
1192
+ "type": "button",
1193
+ "label": "Decay All",
1194
+ "event": "DECAY",
1195
+ "variant": "ghost",
1196
+ "icon": "clock"
1197
+ }
1198
+ ]
1199
+ }
1200
+ ]
1201
+ },
1202
+ {
1203
+ "type": "divider"
1204
+ },
1205
+ {
1206
+ "type": "data-grid",
1207
+ "entity": "AgentRag",
1208
+ "emptyIcon": "inbox",
1209
+ "emptyTitle": "No memories yet",
1210
+ "emptyDescription": "Create your first memory to get started.",
1211
+ "itemActions": [
1212
+ {
1213
+ "label": "Pin",
1214
+ "event": "PIN",
1215
+ "variant": "ghost",
1216
+ "size": "sm"
1217
+ },
1218
+ {
1219
+ "label": "Reinforce",
1220
+ "event": "REINFORCE",
1221
+ "variant": "ghost",
1222
+ "size": "sm"
1223
+ },
1224
+ {
1225
+ "label": "Forget",
1226
+ "event": "FORGET",
1227
+ "variant": "danger",
1228
+ "size": "sm"
1229
+ }
1230
+ ],
1231
+ "columns": [
1232
+ {
1233
+ "name": "content",
1234
+ "label": "Content",
1235
+ "variant": "h4",
1236
+ "icon": "brain"
1237
+ },
1238
+ {
1239
+ "name": "category",
1240
+ "label": "Category",
1241
+ "variant": "badge",
1242
+ "colorMap": {
1243
+ "active": "success",
1244
+ "completed": "success",
1245
+ "done": "success",
1246
+ "pending": "warning",
1247
+ "draft": "warning",
1248
+ "scheduled": "warning",
1249
+ "inactive": "neutral",
1250
+ "archived": "neutral",
1251
+ "disabled": "neutral",
1252
+ "error": "destructive",
1253
+ "cancelled": "destructive",
1254
+ "failed": "destructive"
1255
+ }
1256
+ },
1257
+ {
1258
+ "name": "strength",
1259
+ "label": "Strength",
1260
+ "variant": "caption"
1261
+ }
1262
+ ]
1263
+ }
1264
+ ]
1265
+ }
1266
+ ]
1267
+ ]
1268
+ },
1269
+ {
1270
+ "from": "browsing",
1271
+ "to": "browsing",
1272
+ "event": "MEMORIZED",
1273
+ "effects": [
1274
+ [
1275
+ "ref",
1276
+ "AgentRag"
1277
+ ]
1278
+ ]
1279
+ },
1280
+ {
1281
+ "from": "browsing",
1282
+ "to": "browsing",
1283
+ "event": "PINNED",
1284
+ "effects": [
1285
+ [
1286
+ "ref",
1287
+ "AgentRag"
1288
+ ]
1289
+ ]
1290
+ },
1291
+ {
1292
+ "from": "browsing",
1293
+ "to": "browsing",
1294
+ "event": "FORGOT",
1295
+ "effects": [
1296
+ [
1297
+ "ref",
1298
+ "AgentRag"
1299
+ ]
1300
+ ]
1301
+ },
1302
+ {
1303
+ "from": "browsing",
1304
+ "to": "browsing",
1305
+ "event": "REINFORCED",
1306
+ "effects": [
1307
+ [
1308
+ "ref",
1309
+ "AgentRag"
1310
+ ]
1311
+ ]
1312
+ },
1313
+ {
1314
+ "from": "browsing",
1315
+ "to": "browsing",
1316
+ "event": "DECAYED",
1317
+ "effects": [
1318
+ [
1319
+ "ref",
1320
+ "AgentRag"
1321
+ ]
1322
+ ]
1323
+ }
1324
+ ]
1325
+ }
1326
+ },
1327
+ {
1328
+ "name": "RagSearchLifecycle",
1329
+ "linkedEntity": "AgentRag",
1330
+ "category": "interaction",
1331
+ "stateMachine": {
1332
+ "states": [
1333
+ {
1334
+ "name": "browsing",
1335
+ "isInitial": true
1336
+ }
1337
+ ],
1338
+ "events": [
1339
+ {
1340
+ "key": "INIT",
1341
+ "name": "Initialize"
1342
+ },
1343
+ {
1344
+ "key": "SEARCH",
1345
+ "name": "SEARCH"
1346
+ },
1347
+ {
1348
+ "key": "CLEAR",
1349
+ "name": "CLEAR"
1350
+ },
1351
+ {
1352
+ "key": "VIEW",
1353
+ "name": "VIEW",
1354
+ "payload": [
1355
+ {
1356
+ "name": "id",
1357
+ "type": "string",
1358
+ "required": true
1359
+ },
1360
+ {
1361
+ "name": "row",
1362
+ "type": "object"
1363
+ }
1364
+ ]
1365
+ },
1366
+ {
1367
+ "key": "SEARCHED",
1368
+ "name": "SEARCHED",
1369
+ "payload": [
1370
+ {
1371
+ "name": "data",
1372
+ "type": "object",
1373
+ "required": true
1374
+ }
1375
+ ]
1376
+ }
1377
+ ],
1378
+ "transitions": [
1379
+ {
1380
+ "from": "browsing",
1381
+ "to": "browsing",
1382
+ "event": "INIT",
1383
+ "effects": [
1384
+ [
1385
+ "ref",
1386
+ "AgentRag"
1387
+ ],
1388
+ [
1389
+ "render-ui",
1390
+ "main",
1391
+ {
1392
+ "type": "stack",
1393
+ "direction": "vertical",
1394
+ "gap": "lg",
1395
+ "className": "max-w-5xl mx-auto w-full",
1396
+ "children": [
1397
+ {
1398
+ "type": "stack",
1399
+ "direction": "horizontal",
1400
+ "gap": "md",
1401
+ "justify": "space-between",
1402
+ "align": "center",
1403
+ "children": [
1404
+ {
1405
+ "type": "stack",
1406
+ "direction": "horizontal",
1407
+ "gap": "sm",
1408
+ "align": "center",
1409
+ "children": [
1410
+ {
1411
+ "type": "icon",
1412
+ "name": "search",
1413
+ "size": "lg"
1414
+ },
1415
+ {
1416
+ "type": "typography",
1417
+ "content": "AgentRag",
1418
+ "variant": "h2"
1419
+ }
1420
+ ]
1421
+ },
1422
+ {
1423
+ "type": "stack",
1424
+ "direction": "horizontal",
1425
+ "gap": "sm",
1426
+ "children": [
1427
+ {
1428
+ "type": "button",
1429
+ "label": "Search",
1430
+ "event": "SEARCH",
1431
+ "variant": "primary",
1432
+ "icon": "search"
1433
+ },
1434
+ {
1435
+ "type": "button",
1436
+ "label": "Clear",
1437
+ "event": "CLEAR",
1438
+ "variant": "ghost",
1439
+ "icon": "x"
1440
+ }
1441
+ ]
1442
+ }
1443
+ ]
1444
+ },
1445
+ {
1446
+ "type": "divider"
1447
+ },
1448
+ {
1449
+ "type": "data-grid",
1450
+ "entity": "AgentRag",
1451
+ "emptyIcon": "inbox",
1452
+ "emptyTitle": "No search results",
1453
+ "emptyDescription": "Enter a query to search the codebase.",
1454
+ "itemActions": [
1455
+ {
1456
+ "label": "View",
1457
+ "event": "VIEW",
1458
+ "variant": "ghost",
1459
+ "size": "sm"
1460
+ }
1461
+ ],
1462
+ "columns": [
1463
+ {
1464
+ "name": "query",
1465
+ "label": "Query",
1466
+ "variant": "h4",
1467
+ "icon": "search"
1468
+ },
1469
+ {
1470
+ "name": "language",
1471
+ "label": "Language",
1472
+ "variant": "badge",
1473
+ "colorMap": {
1474
+ "active": "success",
1475
+ "completed": "success",
1476
+ "done": "success",
1477
+ "pending": "warning",
1478
+ "draft": "warning",
1479
+ "scheduled": "warning",
1480
+ "inactive": "neutral",
1481
+ "archived": "neutral",
1482
+ "disabled": "neutral",
1483
+ "error": "destructive",
1484
+ "cancelled": "destructive",
1485
+ "failed": "destructive"
1486
+ }
1487
+ },
1488
+ {
1489
+ "name": "resultCount",
1490
+ "label": "Result Count",
1491
+ "variant": "caption"
1492
+ }
1493
+ ]
1494
+ }
1495
+ ]
1496
+ }
1497
+ ]
1498
+ ]
1499
+ },
1500
+ {
1501
+ "from": "browsing",
1502
+ "to": "browsing",
1503
+ "event": "SEARCHED",
1504
+ "effects": [
1505
+ [
1506
+ "ref",
1507
+ "AgentRag"
1508
+ ]
1509
+ ]
1510
+ }
1511
+ ]
1512
+ }
1513
+ },
1514
+ {
1515
+ "name": "RagCompletionFlow",
1516
+ "linkedEntity": "AgentRag",
1517
+ "category": "interaction",
1518
+ "emits": [
1519
+ {
1520
+ "event": "GENERATED",
1521
+ "scope": "internal"
1522
+ }
1523
+ ],
1524
+ "stateMachine": {
1525
+ "states": [
1526
+ {
1527
+ "name": "closed",
1528
+ "isInitial": true
1529
+ },
1530
+ {
1531
+ "name": "open"
1532
+ }
1533
+ ],
1534
+ "events": [
1535
+ {
1536
+ "key": "INIT",
1537
+ "name": "Initialize"
1538
+ },
1539
+ {
1540
+ "key": "GENERATE",
1541
+ "name": "Open"
1542
+ },
1543
+ {
1544
+ "key": "CLOSE",
1545
+ "name": "Close"
1546
+ },
1547
+ {
1548
+ "key": "SAVE",
1549
+ "name": "Save",
1550
+ "payload": [
1551
+ {
1552
+ "name": "data",
1553
+ "type": "object",
1554
+ "required": true
1555
+ }
1556
+ ]
1557
+ }
1558
+ ],
1559
+ "transitions": [
1560
+ {
1561
+ "from": "closed",
1562
+ "to": "closed",
1563
+ "event": "INIT",
1564
+ "effects": [
1565
+ [
1566
+ "ref",
1567
+ "AgentRag"
1568
+ ],
1569
+ [
1570
+ "render-ui",
1571
+ "main",
1572
+ {
1573
+ "type": "stack",
1574
+ "direction": "vertical",
1575
+ "gap": "lg",
1576
+ "children": [
1577
+ {
1578
+ "type": "stack",
1579
+ "direction": "horizontal",
1580
+ "gap": "md",
1581
+ "justify": "space-between",
1582
+ "children": [
1583
+ {
1584
+ "type": "stack",
1585
+ "direction": "horizontal",
1586
+ "gap": "md",
1587
+ "children": [
1588
+ {
1589
+ "type": "icon",
1590
+ "name": "sparkles",
1591
+ "size": "lg"
1592
+ },
1593
+ {
1594
+ "type": "typography",
1595
+ "content": "AgentRag",
1596
+ "variant": "h2"
1597
+ }
1598
+ ]
1599
+ },
1600
+ {
1601
+ "type": "button",
1602
+ "label": "Open",
1603
+ "event": "GENERATE",
1604
+ "variant": "primary",
1605
+ "icon": "sparkles"
1606
+ }
1607
+ ]
1608
+ },
1609
+ {
1610
+ "type": "divider"
1611
+ },
1612
+ {
1613
+ "type": "empty-state",
1614
+ "icon": "sparkles",
1615
+ "title": "Nothing open",
1616
+ "description": "Click Open to view details in a modal overlay."
1617
+ }
1618
+ ]
1619
+ }
1620
+ ]
1621
+ ]
1622
+ },
1623
+ {
1624
+ "from": "closed",
1625
+ "to": "open",
1626
+ "event": "GENERATE",
1627
+ "effects": [
1628
+ [
1629
+ "render-ui",
1630
+ "modal",
1631
+ {
1632
+ "type": "stack",
1633
+ "direction": "vertical",
1634
+ "gap": "md",
1635
+ "children": [
1636
+ {
1637
+ "type": "stack",
1638
+ "direction": "horizontal",
1639
+ "gap": "sm",
1640
+ "children": [
1641
+ {
1642
+ "type": "icon",
1643
+ "name": "sparkles",
1644
+ "size": "md"
1645
+ },
1646
+ {
1647
+ "type": "typography",
1648
+ "content": "AgentRag",
1649
+ "variant": "h3"
1650
+ }
1651
+ ]
1652
+ },
1653
+ {
1654
+ "type": "divider"
1655
+ },
1656
+ {
1657
+ "type": "stack",
1658
+ "direction": "horizontal",
1659
+ "gap": "sm",
1660
+ "children": [
1661
+ {
1662
+ "type": "badge",
1663
+ "label": "@entity.provider"
1664
+ },
1665
+ {
1666
+ "type": "badge",
1667
+ "label": "@entity.model"
1668
+ }
1669
+ ]
1670
+ },
1671
+ {
1672
+ "type": "form-section",
1673
+ "entity": "AgentRag",
1674
+ "mode": "create",
1675
+ "submitEvent": "SAVE",
1676
+ "cancelEvent": "CLOSE",
1677
+ "fields": [
1678
+ "prompt"
1679
+ ]
1680
+ }
1681
+ ]
1682
+ }
1683
+ ]
1684
+ ]
1685
+ },
1686
+ {
1687
+ "from": "open",
1688
+ "to": "closed",
1689
+ "event": "CLOSE",
1690
+ "effects": [
1691
+ [
1692
+ "render-ui",
1693
+ "modal",
1694
+ null
1695
+ ],
1696
+ [
1697
+ "notify",
1698
+ "Cancelled",
1699
+ "info"
1700
+ ],
1701
+ [
1702
+ "ref",
1703
+ "AgentRag"
1704
+ ],
1705
+ [
1706
+ "render-ui",
1707
+ "main",
1708
+ {
1709
+ "type": "stack",
1710
+ "direction": "vertical",
1711
+ "gap": "lg",
1712
+ "children": [
1713
+ {
1714
+ "type": "stack",
1715
+ "direction": "horizontal",
1716
+ "gap": "md",
1717
+ "justify": "space-between",
1718
+ "children": [
1719
+ {
1720
+ "type": "stack",
1721
+ "direction": "horizontal",
1722
+ "gap": "md",
1723
+ "children": [
1724
+ {
1725
+ "type": "icon",
1726
+ "name": "sparkles",
1727
+ "size": "lg"
1728
+ },
1729
+ {
1730
+ "type": "typography",
1731
+ "content": "AgentRag",
1732
+ "variant": "h2"
1733
+ }
1734
+ ]
1735
+ },
1736
+ {
1737
+ "type": "button",
1738
+ "label": "Open",
1739
+ "event": "GENERATE",
1740
+ "variant": "primary",
1741
+ "icon": "sparkles"
1742
+ }
1743
+ ]
1744
+ },
1745
+ {
1746
+ "type": "divider"
1747
+ },
1748
+ {
1749
+ "type": "empty-state",
1750
+ "icon": "sparkles",
1751
+ "title": "Nothing open",
1752
+ "description": "Click Open to view details in a modal overlay."
1753
+ }
1754
+ ]
1755
+ }
1756
+ ]
1757
+ ]
1758
+ },
1759
+ {
1760
+ "from": "open",
1761
+ "to": "closed",
1762
+ "event": "SAVE",
1763
+ "effects": [
1764
+ [
1765
+ "persist",
1766
+ "create",
1767
+ "AgentRag",
1768
+ "@payload.data"
1769
+ ],
1770
+ [
1771
+ "render-ui",
1772
+ "modal",
1773
+ null
1774
+ ],
1775
+ [
1776
+ "emit",
1777
+ "GENERATED"
1778
+ ],
1779
+ [
1780
+ "ref",
1781
+ "AgentRag"
1782
+ ],
1783
+ [
1784
+ "render-ui",
1785
+ "main",
1786
+ {
1787
+ "type": "stack",
1788
+ "direction": "vertical",
1789
+ "gap": "lg",
1790
+ "children": [
1791
+ {
1792
+ "type": "stack",
1793
+ "direction": "horizontal",
1794
+ "gap": "md",
1795
+ "justify": "space-between",
1796
+ "children": [
1797
+ {
1798
+ "type": "stack",
1799
+ "direction": "horizontal",
1800
+ "gap": "md",
1801
+ "children": [
1802
+ {
1803
+ "type": "icon",
1804
+ "name": "sparkles",
1805
+ "size": "lg"
1806
+ },
1807
+ {
1808
+ "type": "typography",
1809
+ "content": "AgentRag",
1810
+ "variant": "h2"
1811
+ }
1812
+ ]
1813
+ },
1814
+ {
1815
+ "type": "button",
1816
+ "label": "Open",
1817
+ "event": "GENERATE",
1818
+ "variant": "primary",
1819
+ "icon": "sparkles"
1820
+ }
1821
+ ]
1822
+ },
1823
+ {
1824
+ "type": "divider"
1825
+ },
1826
+ {
1827
+ "type": "empty-state",
1828
+ "icon": "sparkles",
1829
+ "title": "Nothing open",
1830
+ "description": "Click Open to view details in a modal overlay."
1831
+ }
1832
+ ]
1833
+ }
1834
+ ],
1835
+ [
1836
+ "notify",
1837
+ "AgentRag created successfully"
1838
+ ]
1839
+ ]
1840
+ }
1841
+ ]
1842
+ }
1843
+ }
1844
+ ],
1845
+ "pages": [
1846
+ {
1847
+ "name": "AgentRagPage",
1848
+ "path": "/agentrags",
1849
+ "traits": [
1850
+ {
1851
+ "ref": "AgentRagRag"
1852
+ },
1853
+ {
1854
+ "ref": "RagTabs"
1855
+ },
1856
+ {
1857
+ "ref": "RagMemoryLifecycle"
1858
+ },
1859
+ {
1860
+ "ref": "RagSearchLifecycle"
1861
+ },
1862
+ {
1863
+ "ref": "RagCompletionFlow"
1864
+ }
1865
+ ]
1866
+ }
1867
+ ]
1868
+ }
1869
+ ],
1870
+ "description": "Composes agent atoms + UI atoms into a RAG pipeline with tabbed views. Retrieves relevant memories and code snippets, injects them as context, then generates a response with the augmented prompt. Composed atoms: - stdAgentMemory: recall memories by semantic query - stdAgentSearch: search code repositories for relevant snippets - stdAgentCompletion: generate response with augmented context - stdTabs: tabbed view for Query / Sources / Response Cross-trait events: - GENERATE (RagOrchestrator -> MemoryLifecycle): trigger recall - RETRIEVAL_DONE (RagOrchestrator -> SearchLifecycle): trigger search after recall - GENERATION_DONE (RagOrchestrator -> CompletionFlow): trigger completion"
1871
+ }