@almadar/std 3.12.1 → 3.13.0

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 (149) hide show
  1. package/behaviors/exports/atoms/std-agent-classifier.orb +402 -0
  2. package/behaviors/exports/atoms/std-agent-completion.orb +469 -0
  3. package/behaviors/exports/atoms/std-agent-context-window.orb +790 -0
  4. package/behaviors/exports/atoms/std-agent-conversation.orb +737 -0
  5. package/behaviors/exports/atoms/std-agent-memory.orb +627 -0
  6. package/behaviors/exports/atoms/std-agent-provider.orb +402 -0
  7. package/behaviors/exports/atoms/std-agent-search.orb +418 -0
  8. package/behaviors/exports/atoms/std-agent-session.orb +825 -0
  9. package/behaviors/exports/atoms/std-agent-tool-call.orb +380 -0
  10. package/behaviors/exports/atoms/std-wizard.orb +63 -70
  11. package/behaviors/exports/molecules/std-agent-fix-loop.orb +1213 -0
  12. package/behaviors/exports/molecules/std-agent-learner.orb +1143 -0
  13. package/behaviors/exports/molecules/std-agent-planner.orb +898 -0
  14. package/behaviors/exports/molecules/std-agent-rag.orb +736 -0
  15. package/behaviors/exports/molecules/std-agent-tool-loop.orb +1237 -0
  16. package/behaviors/exports/molecules/std-detail.orb +4 -0
  17. package/behaviors/exports/molecules/std-geospatial.orb +4 -0
  18. package/behaviors/exports/molecules/std-inventory.orb +8 -0
  19. package/behaviors/exports/molecules/std-list.orb +18 -1
  20. package/behaviors/exports/molecules/std-messaging.orb +4 -0
  21. package/behaviors/exports/organisms/std-agent-assistant.orb +2288 -0
  22. package/behaviors/exports/organisms/std-agent-builder.orb +2664 -0
  23. package/behaviors/exports/organisms/std-agent-pipeline.orb +2307 -0
  24. package/behaviors/exports/organisms/std-agent-reviewer.orb +1743 -0
  25. package/behaviors/exports/organisms/std-agent-tutor.orb +2303 -0
  26. package/behaviors/exports/organisms/std-api-gateway.orb +18 -1
  27. package/behaviors/exports/organisms/std-booking-system.orb +131 -104
  28. package/behaviors/exports/organisms/std-cicd-pipeline.orb +18 -1
  29. package/behaviors/exports/organisms/std-cms.orb +40 -2
  30. package/behaviors/exports/organisms/std-crm.orb +40 -2
  31. package/behaviors/exports/organisms/std-devops-dashboard.orb +18 -1
  32. package/behaviors/exports/organisms/std-finance-tracker.orb +22 -1
  33. package/behaviors/exports/organisms/std-healthcare.orb +167 -136
  34. package/behaviors/exports/organisms/std-helpdesk.orb +22 -1
  35. package/behaviors/exports/organisms/std-hr-portal.orb +115 -88
  36. package/behaviors/exports/organisms/std-iot-dashboard.orb +18 -1
  37. package/behaviors/exports/organisms/std-lms.orb +97 -87
  38. package/behaviors/exports/organisms/std-platformer-app.orb +8 -0
  39. package/behaviors/exports/organisms/std-project-manager.orb +36 -2
  40. package/behaviors/exports/organisms/std-realtime-chat.orb +22 -1
  41. package/behaviors/exports/organisms/std-rpg-game.orb +8 -0
  42. package/behaviors/exports/organisms/std-service-marketplace.orb +36 -2
  43. package/behaviors/exports/organisms/std-social-feed.orb +8 -0
  44. package/behaviors/exports/organisms/std-trading-dashboard.orb +18 -1
  45. package/behaviors/exports/validation-report.json +1425 -0
  46. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +402 -0
  47. package/dist/behaviors/exports/atoms/std-agent-completion.orb +469 -0
  48. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +790 -0
  49. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +737 -0
  50. package/dist/behaviors/exports/atoms/std-agent-memory.orb +627 -0
  51. package/dist/behaviors/exports/atoms/std-agent-provider.orb +402 -0
  52. package/dist/behaviors/exports/atoms/std-agent-search.orb +418 -0
  53. package/dist/behaviors/exports/atoms/std-agent-session.orb +825 -0
  54. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +380 -0
  55. package/dist/behaviors/exports/atoms/std-wizard.orb +63 -70
  56. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +1213 -0
  57. package/dist/behaviors/exports/molecules/std-agent-learner.orb +1143 -0
  58. package/dist/behaviors/exports/molecules/std-agent-planner.orb +898 -0
  59. package/dist/behaviors/exports/molecules/std-agent-rag.orb +736 -0
  60. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +1237 -0
  61. package/dist/behaviors/exports/molecules/std-detail.orb +4 -0
  62. package/dist/behaviors/exports/molecules/std-geospatial.orb +4 -0
  63. package/dist/behaviors/exports/molecules/std-inventory.orb +8 -0
  64. package/dist/behaviors/exports/molecules/std-list.orb +18 -1
  65. package/dist/behaviors/exports/molecules/std-messaging.orb +4 -0
  66. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +2288 -0
  67. package/dist/behaviors/exports/organisms/std-agent-builder.orb +2664 -0
  68. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +2307 -0
  69. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +1743 -0
  70. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +2303 -0
  71. package/dist/behaviors/exports/organisms/std-api-gateway.orb +18 -1
  72. package/dist/behaviors/exports/organisms/std-booking-system.orb +131 -104
  73. package/dist/behaviors/exports/organisms/std-cicd-pipeline.orb +18 -1
  74. package/dist/behaviors/exports/organisms/std-cms.orb +40 -2
  75. package/dist/behaviors/exports/organisms/std-crm.orb +40 -2
  76. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +18 -1
  77. package/dist/behaviors/exports/organisms/std-finance-tracker.orb +22 -1
  78. package/dist/behaviors/exports/organisms/std-healthcare.orb +167 -136
  79. package/dist/behaviors/exports/organisms/std-helpdesk.orb +22 -1
  80. package/dist/behaviors/exports/organisms/std-hr-portal.orb +115 -88
  81. package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +18 -1
  82. package/dist/behaviors/exports/organisms/std-lms.orb +97 -87
  83. package/dist/behaviors/exports/organisms/std-platformer-app.orb +8 -0
  84. package/dist/behaviors/exports/organisms/std-project-manager.orb +36 -2
  85. package/dist/behaviors/exports/organisms/std-realtime-chat.orb +22 -1
  86. package/dist/behaviors/exports/organisms/std-rpg-game.orb +8 -0
  87. package/dist/behaviors/exports/organisms/std-service-marketplace.orb +36 -2
  88. package/dist/behaviors/exports/organisms/std-social-feed.orb +8 -0
  89. package/dist/behaviors/exports/organisms/std-trading-dashboard.orb +18 -1
  90. package/dist/behaviors/exports/validation-report.json +1425 -0
  91. package/dist/behaviors/exports-reader.js +6345 -175
  92. package/dist/behaviors/exports-reader.js.map +1 -1
  93. package/dist/behaviors/functions/index.d.ts +620 -1
  94. package/dist/behaviors/functions/index.js +6285 -176
  95. package/dist/behaviors/functions/index.js.map +1 -1
  96. package/dist/behaviors/index.d.ts +1 -1
  97. package/dist/behaviors/index.js +6348 -178
  98. package/dist/behaviors/index.js.map +1 -1
  99. package/dist/behaviors/query.js +6347 -177
  100. package/dist/behaviors/query.js.map +1 -1
  101. package/dist/exports/atoms/std-agent-classifier.orb +402 -0
  102. package/dist/exports/atoms/std-agent-completion.orb +469 -0
  103. package/dist/exports/atoms/std-agent-context-window.orb +790 -0
  104. package/dist/exports/atoms/std-agent-conversation.orb +737 -0
  105. package/dist/exports/atoms/std-agent-memory.orb +627 -0
  106. package/dist/exports/atoms/std-agent-provider.orb +402 -0
  107. package/dist/exports/atoms/std-agent-search.orb +418 -0
  108. package/dist/exports/atoms/std-agent-session.orb +825 -0
  109. package/dist/exports/atoms/std-agent-tool-call.orb +380 -0
  110. package/dist/exports/atoms/std-wizard.orb +63 -70
  111. package/dist/exports/molecules/std-agent-fix-loop.orb +1213 -0
  112. package/dist/exports/molecules/std-agent-learner.orb +1143 -0
  113. package/dist/exports/molecules/std-agent-planner.orb +898 -0
  114. package/dist/exports/molecules/std-agent-rag.orb +736 -0
  115. package/dist/exports/molecules/std-agent-tool-loop.orb +1237 -0
  116. package/dist/exports/molecules/std-detail.orb +4 -0
  117. package/dist/exports/molecules/std-geospatial.orb +4 -0
  118. package/dist/exports/molecules/std-inventory.orb +8 -0
  119. package/dist/exports/molecules/std-list.orb +18 -1
  120. package/dist/exports/molecules/std-messaging.orb +4 -0
  121. package/dist/exports/organisms/std-agent-assistant.orb +2288 -0
  122. package/dist/exports/organisms/std-agent-builder.orb +2664 -0
  123. package/dist/exports/organisms/std-agent-pipeline.orb +2307 -0
  124. package/dist/exports/organisms/std-agent-reviewer.orb +1743 -0
  125. package/dist/exports/organisms/std-agent-tutor.orb +2303 -0
  126. package/dist/exports/organisms/std-api-gateway.orb +18 -1
  127. package/dist/exports/organisms/std-booking-system.orb +131 -104
  128. package/dist/exports/organisms/std-cicd-pipeline.orb +18 -1
  129. package/dist/exports/organisms/std-cms.orb +40 -2
  130. package/dist/exports/organisms/std-crm.orb +40 -2
  131. package/dist/exports/organisms/std-devops-dashboard.orb +18 -1
  132. package/dist/exports/organisms/std-finance-tracker.orb +22 -1
  133. package/dist/exports/organisms/std-healthcare.orb +167 -136
  134. package/dist/exports/organisms/std-helpdesk.orb +22 -1
  135. package/dist/exports/organisms/std-hr-portal.orb +115 -88
  136. package/dist/exports/organisms/std-iot-dashboard.orb +18 -1
  137. package/dist/exports/organisms/std-lms.orb +97 -87
  138. package/dist/exports/organisms/std-platformer-app.orb +8 -0
  139. package/dist/exports/organisms/std-project-manager.orb +36 -2
  140. package/dist/exports/organisms/std-realtime-chat.orb +22 -1
  141. package/dist/exports/organisms/std-rpg-game.orb +8 -0
  142. package/dist/exports/organisms/std-service-marketplace.orb +36 -2
  143. package/dist/exports/organisms/std-social-feed.orb +8 -0
  144. package/dist/exports/organisms/std-trading-dashboard.orb +18 -1
  145. package/dist/exports/validation-report.json +1425 -0
  146. package/dist/index.d.ts +1 -1
  147. package/dist/index.js +6348 -178
  148. package/dist/index.js.map +1 -1
  149. package/package.json +1 -1
@@ -0,0 +1,2288 @@
1
+ {
2
+ "name": "Agent Assistant",
3
+ "version": "1.0.0",
4
+ "orbitals": [
5
+ {
6
+ "name": "AssistantOrbital",
7
+ "entity": {
8
+ "name": "Assistant",
9
+ "persistence": "runtime",
10
+ "fields": [
11
+ {
12
+ "name": "id",
13
+ "type": "string",
14
+ "required": true
15
+ },
16
+ {
17
+ "name": "messages",
18
+ "type": "string",
19
+ "default": "[]"
20
+ },
21
+ {
22
+ "name": "currentMessage",
23
+ "type": "string",
24
+ "default": ""
25
+ },
26
+ {
27
+ "name": "response",
28
+ "type": "string",
29
+ "default": ""
30
+ },
31
+ {
32
+ "name": "memoryCount",
33
+ "type": "number",
34
+ "default": 0
35
+ },
36
+ {
37
+ "name": "contextUsage",
38
+ "type": "number",
39
+ "default": 0
40
+ },
41
+ {
42
+ "name": "provider",
43
+ "type": "string",
44
+ "default": "default"
45
+ },
46
+ {
47
+ "name": "sessionId",
48
+ "type": "string",
49
+ "default": ""
50
+ },
51
+ {
52
+ "name": "status",
53
+ "type": "string",
54
+ "default": "idle"
55
+ },
56
+ {
57
+ "name": "error",
58
+ "type": "string",
59
+ "default": ""
60
+ }
61
+ ]
62
+ },
63
+ "traits": [
64
+ {
65
+ "name": "AssistantConversation",
66
+ "linkedEntity": "Assistant",
67
+ "category": "interaction",
68
+ "emits": [
69
+ {
70
+ "event": "MEMORIZE_RESPONSE",
71
+ "description": "Auto-memorize important responses",
72
+ "scope": "internal"
73
+ },
74
+ {
75
+ "event": "MEMORIZE_RESPONSE",
76
+ "description": "Auto-memorize important responses",
77
+ "scope": "external"
78
+ }
79
+ ],
80
+ "stateMachine": {
81
+ "states": [
82
+ {
83
+ "name": "idle",
84
+ "isInitial": true
85
+ },
86
+ {
87
+ "name": "listening"
88
+ },
89
+ {
90
+ "name": "thinking"
91
+ },
92
+ {
93
+ "name": "responding"
94
+ }
95
+ ],
96
+ "events": [
97
+ {
98
+ "key": "INIT",
99
+ "name": "Initialize"
100
+ },
101
+ {
102
+ "key": "SEND",
103
+ "name": "Send Message",
104
+ "payload": [
105
+ {
106
+ "name": "currentMessage",
107
+ "type": "string",
108
+ "required": true
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "key": "COMPACT",
114
+ "name": "Compact Context"
115
+ },
116
+ {
117
+ "key": "SWITCH_PROVIDER",
118
+ "name": "Switch Provider",
119
+ "payload": [
120
+ {
121
+ "name": "provider",
122
+ "type": "string",
123
+ "required": false
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "key": "GENERATION_COMPLETE",
129
+ "name": "Generation Complete"
130
+ },
131
+ {
132
+ "key": "FAILED",
133
+ "name": "Failed",
134
+ "payload": [
135
+ {
136
+ "name": "error",
137
+ "type": "string",
138
+ "required": true
139
+ }
140
+ ]
141
+ }
142
+ ],
143
+ "transitions": [
144
+ {
145
+ "from": "idle",
146
+ "to": "idle",
147
+ "event": "INIT",
148
+ "effects": [
149
+ [
150
+ "set",
151
+ "@entity.sessionId",
152
+ [
153
+ "agent/session-id"
154
+ ]
155
+ ],
156
+ [
157
+ "set",
158
+ "@entity.provider",
159
+ [
160
+ "agent/provider"
161
+ ]
162
+ ],
163
+ [
164
+ "set",
165
+ "@entity.contextUsage",
166
+ [
167
+ "agent/context-usage"
168
+ ]
169
+ ],
170
+ [
171
+ "fetch",
172
+ "Assistant"
173
+ ],
174
+ [
175
+ "render-ui",
176
+ "main",
177
+ {
178
+ "type": "dashboard-layout",
179
+ "appName": "Agent Assistant",
180
+ "navItems": [
181
+ {
182
+ "label": "Chat",
183
+ "href": "/chat",
184
+ "icon": "message-circle"
185
+ },
186
+ {
187
+ "label": "Memory",
188
+ "href": "/memory",
189
+ "icon": "brain"
190
+ },
191
+ {
192
+ "label": "Provider",
193
+ "href": "/provider",
194
+ "icon": "settings"
195
+ }
196
+ ],
197
+ "children": [
198
+ {
199
+ "type": "stack",
200
+ "direction": "vertical",
201
+ "gap": "lg",
202
+ "children": [
203
+ {
204
+ "type": "stack",
205
+ "direction": "horizontal",
206
+ "gap": "sm",
207
+ "align": "center",
208
+ "justify": "space-between",
209
+ "children": [
210
+ {
211
+ "type": "stack",
212
+ "direction": "horizontal",
213
+ "gap": "sm",
214
+ "align": "center",
215
+ "children": [
216
+ {
217
+ "type": "icon",
218
+ "name": "message-circle",
219
+ "size": "lg"
220
+ },
221
+ {
222
+ "type": "typography",
223
+ "content": "Assistant",
224
+ "variant": "h2"
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "type": "stack",
230
+ "direction": "horizontal",
231
+ "gap": "xs",
232
+ "children": [
233
+ {
234
+ "type": "badge",
235
+ "label": "@entity.provider"
236
+ },
237
+ {
238
+ "type": "badge",
239
+ "label": "@entity.sessionId"
240
+ }
241
+ ]
242
+ }
243
+ ]
244
+ },
245
+ {
246
+ "type": "divider"
247
+ },
248
+ {
249
+ "type": "card",
250
+ "children": [
251
+ {
252
+ "type": "stack",
253
+ "direction": "vertical",
254
+ "gap": "md",
255
+ "children": [
256
+ {
257
+ "type": "typography",
258
+ "content": "Send a message to begin the conversation.",
259
+ "variant": "body"
260
+ },
261
+ {
262
+ "type": "form-section",
263
+ "entity": "Assistant",
264
+ "mode": "edit",
265
+ "submitEvent": "SEND",
266
+ "fields": [
267
+ "currentMessage"
268
+ ]
269
+ }
270
+ ]
271
+ }
272
+ ]
273
+ },
274
+ {
275
+ "type": "stack",
276
+ "direction": "horizontal",
277
+ "gap": "sm",
278
+ "children": [
279
+ {
280
+ "type": "button",
281
+ "label": "Compact Context",
282
+ "event": "COMPACT",
283
+ "variant": "ghost",
284
+ "icon": "minimize-2"
285
+ }
286
+ ]
287
+ }
288
+ ]
289
+ }
290
+ ]
291
+ }
292
+ ]
293
+ ]
294
+ },
295
+ {
296
+ "from": "idle",
297
+ "to": "listening",
298
+ "event": "SEND",
299
+ "effects": [
300
+ [
301
+ "set",
302
+ "@entity.currentMessage",
303
+ "@payload.currentMessage"
304
+ ],
305
+ [
306
+ "set",
307
+ "@entity.status",
308
+ "listening"
309
+ ],
310
+ [
311
+ "render-ui",
312
+ "main",
313
+ {
314
+ "type": "dashboard-layout",
315
+ "appName": "Agent Assistant",
316
+ "navItems": [
317
+ {
318
+ "label": "Chat",
319
+ "href": "/chat",
320
+ "icon": "message-circle"
321
+ },
322
+ {
323
+ "label": "Memory",
324
+ "href": "/memory",
325
+ "icon": "brain"
326
+ },
327
+ {
328
+ "label": "Provider",
329
+ "href": "/provider",
330
+ "icon": "settings"
331
+ }
332
+ ],
333
+ "children": [
334
+ {
335
+ "type": "stack",
336
+ "direction": "vertical",
337
+ "gap": "lg",
338
+ "align": "center",
339
+ "children": [
340
+ {
341
+ "type": "icon",
342
+ "name": "mic",
343
+ "size": "lg"
344
+ },
345
+ {
346
+ "type": "typography",
347
+ "content": "Listening...",
348
+ "variant": "h3"
349
+ },
350
+ {
351
+ "type": "spinner",
352
+ "size": "lg"
353
+ }
354
+ ]
355
+ }
356
+ ]
357
+ }
358
+ ]
359
+ ]
360
+ },
361
+ {
362
+ "from": "responding",
363
+ "to": "listening",
364
+ "event": "SEND",
365
+ "effects": [
366
+ [
367
+ "set",
368
+ "@entity.currentMessage",
369
+ "@payload.currentMessage"
370
+ ],
371
+ [
372
+ "set",
373
+ "@entity.status",
374
+ "listening"
375
+ ],
376
+ [
377
+ "render-ui",
378
+ "main",
379
+ {
380
+ "type": "dashboard-layout",
381
+ "appName": "Agent Assistant",
382
+ "navItems": [
383
+ {
384
+ "label": "Chat",
385
+ "href": "/chat",
386
+ "icon": "message-circle"
387
+ },
388
+ {
389
+ "label": "Memory",
390
+ "href": "/memory",
391
+ "icon": "brain"
392
+ },
393
+ {
394
+ "label": "Provider",
395
+ "href": "/provider",
396
+ "icon": "settings"
397
+ }
398
+ ],
399
+ "children": [
400
+ {
401
+ "type": "stack",
402
+ "direction": "vertical",
403
+ "gap": "lg",
404
+ "align": "center",
405
+ "children": [
406
+ {
407
+ "type": "icon",
408
+ "name": "mic",
409
+ "size": "lg"
410
+ },
411
+ {
412
+ "type": "typography",
413
+ "content": "Listening...",
414
+ "variant": "h3"
415
+ },
416
+ {
417
+ "type": "spinner",
418
+ "size": "lg"
419
+ }
420
+ ]
421
+ }
422
+ ]
423
+ }
424
+ ]
425
+ ]
426
+ },
427
+ {
428
+ "from": "listening",
429
+ "to": "thinking",
430
+ "event": "INIT",
431
+ "effects": [
432
+ [
433
+ "set",
434
+ "@entity.status",
435
+ "thinking"
436
+ ],
437
+ [
438
+ "set",
439
+ "@entity.contextUsage",
440
+ [
441
+ "agent/context-usage"
442
+ ]
443
+ ],
444
+ [
445
+ "agent/generate",
446
+ "@entity.currentMessage"
447
+ ],
448
+ [
449
+ "render-ui",
450
+ "main",
451
+ {
452
+ "type": "dashboard-layout",
453
+ "appName": "Agent Assistant",
454
+ "navItems": [
455
+ {
456
+ "label": "Chat",
457
+ "href": "/chat",
458
+ "icon": "message-circle"
459
+ },
460
+ {
461
+ "label": "Memory",
462
+ "href": "/memory",
463
+ "icon": "brain"
464
+ },
465
+ {
466
+ "label": "Provider",
467
+ "href": "/provider",
468
+ "icon": "settings"
469
+ }
470
+ ],
471
+ "children": [
472
+ {
473
+ "type": "stack",
474
+ "direction": "vertical",
475
+ "gap": "lg",
476
+ "align": "center",
477
+ "children": [
478
+ {
479
+ "type": "icon",
480
+ "name": "brain",
481
+ "size": "lg"
482
+ },
483
+ {
484
+ "type": "typography",
485
+ "content": "Thinking...",
486
+ "variant": "h3"
487
+ },
488
+ {
489
+ "type": "spinner",
490
+ "size": "lg"
491
+ },
492
+ {
493
+ "type": "typography",
494
+ "content": "Context usage: @entity.contextUsage",
495
+ "variant": "caption"
496
+ }
497
+ ]
498
+ }
499
+ ]
500
+ }
501
+ ]
502
+ ]
503
+ },
504
+ {
505
+ "from": "thinking",
506
+ "to": "responding",
507
+ "event": "GENERATION_COMPLETE",
508
+ "effects": [
509
+ [
510
+ "set",
511
+ "@entity.status",
512
+ "responding"
513
+ ],
514
+ [
515
+ "set",
516
+ "@entity.contextUsage",
517
+ [
518
+ "agent/context-usage"
519
+ ]
520
+ ],
521
+ [
522
+ "agent/memorize",
523
+ "@entity.response",
524
+ "conversation"
525
+ ],
526
+ [
527
+ "emit",
528
+ "MEMORIZE_RESPONSE"
529
+ ],
530
+ [
531
+ "render-ui",
532
+ "main",
533
+ {
534
+ "type": "dashboard-layout",
535
+ "appName": "Agent Assistant",
536
+ "navItems": [
537
+ {
538
+ "label": "Chat",
539
+ "href": "/chat",
540
+ "icon": "message-circle"
541
+ },
542
+ {
543
+ "label": "Memory",
544
+ "href": "/memory",
545
+ "icon": "brain"
546
+ },
547
+ {
548
+ "label": "Provider",
549
+ "href": "/provider",
550
+ "icon": "settings"
551
+ }
552
+ ],
553
+ "children": [
554
+ {
555
+ "type": "stack",
556
+ "direction": "vertical",
557
+ "gap": "lg",
558
+ "children": [
559
+ {
560
+ "type": "stack",
561
+ "direction": "horizontal",
562
+ "gap": "sm",
563
+ "align": "center",
564
+ "children": [
565
+ {
566
+ "type": "icon",
567
+ "name": "message-circle",
568
+ "size": "lg"
569
+ },
570
+ {
571
+ "type": "typography",
572
+ "content": "Assistant Response",
573
+ "variant": "h2"
574
+ }
575
+ ]
576
+ },
577
+ {
578
+ "type": "divider"
579
+ },
580
+ {
581
+ "type": "card",
582
+ "children": [
583
+ {
584
+ "type": "stack",
585
+ "direction": "vertical",
586
+ "gap": "md",
587
+ "children": [
588
+ {
589
+ "type": "typography",
590
+ "content": "@entity.response",
591
+ "variant": "body"
592
+ },
593
+ {
594
+ "type": "stack",
595
+ "direction": "horizontal",
596
+ "gap": "xs",
597
+ "children": [
598
+ {
599
+ "type": "badge",
600
+ "label": "@entity.provider"
601
+ },
602
+ {
603
+ "type": "badge",
604
+ "label": "@entity.contextUsage"
605
+ }
606
+ ]
607
+ }
608
+ ]
609
+ }
610
+ ]
611
+ },
612
+ {
613
+ "type": "form-section",
614
+ "entity": "Assistant",
615
+ "mode": "edit",
616
+ "submitEvent": "SEND",
617
+ "fields": [
618
+ "currentMessage"
619
+ ]
620
+ },
621
+ {
622
+ "type": "stack",
623
+ "direction": "horizontal",
624
+ "gap": "sm",
625
+ "children": [
626
+ {
627
+ "type": "button",
628
+ "label": "Compact Context",
629
+ "event": "COMPACT",
630
+ "variant": "ghost",
631
+ "icon": "minimize-2"
632
+ },
633
+ {
634
+ "type": "button",
635
+ "label": "Switch Provider",
636
+ "event": "SWITCH_PROVIDER",
637
+ "variant": "ghost",
638
+ "icon": "refresh-cw"
639
+ }
640
+ ]
641
+ }
642
+ ]
643
+ }
644
+ ]
645
+ }
646
+ ]
647
+ ]
648
+ },
649
+ {
650
+ "from": "thinking",
651
+ "to": "responding",
652
+ "event": "FAILED",
653
+ "effects": [
654
+ [
655
+ "set",
656
+ "@entity.error",
657
+ "@payload.error"
658
+ ],
659
+ [
660
+ "set",
661
+ "@entity.status",
662
+ "responding"
663
+ ],
664
+ [
665
+ "render-ui",
666
+ "main",
667
+ {
668
+ "type": "dashboard-layout",
669
+ "appName": "Agent Assistant",
670
+ "navItems": [
671
+ {
672
+ "label": "Chat",
673
+ "href": "/chat",
674
+ "icon": "message-circle"
675
+ },
676
+ {
677
+ "label": "Memory",
678
+ "href": "/memory",
679
+ "icon": "brain"
680
+ },
681
+ {
682
+ "label": "Provider",
683
+ "href": "/provider",
684
+ "icon": "settings"
685
+ }
686
+ ],
687
+ "children": [
688
+ {
689
+ "type": "stack",
690
+ "direction": "vertical",
691
+ "gap": "lg",
692
+ "children": [
693
+ {
694
+ "type": "stack",
695
+ "direction": "horizontal",
696
+ "gap": "sm",
697
+ "align": "center",
698
+ "children": [
699
+ {
700
+ "type": "icon",
701
+ "name": "message-circle",
702
+ "size": "lg"
703
+ },
704
+ {
705
+ "type": "typography",
706
+ "content": "Assistant Response",
707
+ "variant": "h2"
708
+ }
709
+ ]
710
+ },
711
+ {
712
+ "type": "divider"
713
+ },
714
+ {
715
+ "type": "card",
716
+ "children": [
717
+ {
718
+ "type": "stack",
719
+ "direction": "vertical",
720
+ "gap": "md",
721
+ "children": [
722
+ {
723
+ "type": "typography",
724
+ "content": "@entity.response",
725
+ "variant": "body"
726
+ },
727
+ {
728
+ "type": "stack",
729
+ "direction": "horizontal",
730
+ "gap": "xs",
731
+ "children": [
732
+ {
733
+ "type": "badge",
734
+ "label": "@entity.provider"
735
+ },
736
+ {
737
+ "type": "badge",
738
+ "label": "@entity.contextUsage"
739
+ }
740
+ ]
741
+ }
742
+ ]
743
+ }
744
+ ]
745
+ },
746
+ {
747
+ "type": "form-section",
748
+ "entity": "Assistant",
749
+ "mode": "edit",
750
+ "submitEvent": "SEND",
751
+ "fields": [
752
+ "currentMessage"
753
+ ]
754
+ },
755
+ {
756
+ "type": "stack",
757
+ "direction": "horizontal",
758
+ "gap": "sm",
759
+ "children": [
760
+ {
761
+ "type": "button",
762
+ "label": "Compact Context",
763
+ "event": "COMPACT",
764
+ "variant": "ghost",
765
+ "icon": "minimize-2"
766
+ },
767
+ {
768
+ "type": "button",
769
+ "label": "Switch Provider",
770
+ "event": "SWITCH_PROVIDER",
771
+ "variant": "ghost",
772
+ "icon": "refresh-cw"
773
+ }
774
+ ]
775
+ }
776
+ ]
777
+ }
778
+ ]
779
+ }
780
+ ]
781
+ ]
782
+ },
783
+ {
784
+ "from": "responding",
785
+ "to": "responding",
786
+ "event": "COMPACT",
787
+ "effects": [
788
+ [
789
+ "agent/compact"
790
+ ],
791
+ [
792
+ "set",
793
+ "@entity.contextUsage",
794
+ [
795
+ "agent/context-usage"
796
+ ]
797
+ ],
798
+ [
799
+ "render-ui",
800
+ "main",
801
+ {
802
+ "type": "dashboard-layout",
803
+ "appName": "Agent Assistant",
804
+ "navItems": [
805
+ {
806
+ "label": "Chat",
807
+ "href": "/chat",
808
+ "icon": "message-circle"
809
+ },
810
+ {
811
+ "label": "Memory",
812
+ "href": "/memory",
813
+ "icon": "brain"
814
+ },
815
+ {
816
+ "label": "Provider",
817
+ "href": "/provider",
818
+ "icon": "settings"
819
+ }
820
+ ],
821
+ "children": [
822
+ {
823
+ "type": "stack",
824
+ "direction": "vertical",
825
+ "gap": "lg",
826
+ "children": [
827
+ {
828
+ "type": "stack",
829
+ "direction": "horizontal",
830
+ "gap": "sm",
831
+ "align": "center",
832
+ "children": [
833
+ {
834
+ "type": "icon",
835
+ "name": "message-circle",
836
+ "size": "lg"
837
+ },
838
+ {
839
+ "type": "typography",
840
+ "content": "Assistant Response",
841
+ "variant": "h2"
842
+ }
843
+ ]
844
+ },
845
+ {
846
+ "type": "divider"
847
+ },
848
+ {
849
+ "type": "card",
850
+ "children": [
851
+ {
852
+ "type": "stack",
853
+ "direction": "vertical",
854
+ "gap": "md",
855
+ "children": [
856
+ {
857
+ "type": "typography",
858
+ "content": "@entity.response",
859
+ "variant": "body"
860
+ },
861
+ {
862
+ "type": "stack",
863
+ "direction": "horizontal",
864
+ "gap": "xs",
865
+ "children": [
866
+ {
867
+ "type": "badge",
868
+ "label": "@entity.provider"
869
+ },
870
+ {
871
+ "type": "badge",
872
+ "label": "@entity.contextUsage"
873
+ }
874
+ ]
875
+ }
876
+ ]
877
+ }
878
+ ]
879
+ },
880
+ {
881
+ "type": "form-section",
882
+ "entity": "Assistant",
883
+ "mode": "edit",
884
+ "submitEvent": "SEND",
885
+ "fields": [
886
+ "currentMessage"
887
+ ]
888
+ },
889
+ {
890
+ "type": "stack",
891
+ "direction": "horizontal",
892
+ "gap": "sm",
893
+ "children": [
894
+ {
895
+ "type": "button",
896
+ "label": "Compact Context",
897
+ "event": "COMPACT",
898
+ "variant": "ghost",
899
+ "icon": "minimize-2"
900
+ },
901
+ {
902
+ "type": "button",
903
+ "label": "Switch Provider",
904
+ "event": "SWITCH_PROVIDER",
905
+ "variant": "ghost",
906
+ "icon": "refresh-cw"
907
+ }
908
+ ]
909
+ }
910
+ ]
911
+ }
912
+ ]
913
+ }
914
+ ]
915
+ ]
916
+ },
917
+ {
918
+ "from": "idle",
919
+ "to": "idle",
920
+ "event": "COMPACT",
921
+ "effects": [
922
+ [
923
+ "agent/compact"
924
+ ],
925
+ [
926
+ "set",
927
+ "@entity.contextUsage",
928
+ [
929
+ "agent/context-usage"
930
+ ]
931
+ ],
932
+ [
933
+ "render-ui",
934
+ "main",
935
+ {
936
+ "type": "dashboard-layout",
937
+ "appName": "Agent Assistant",
938
+ "navItems": [
939
+ {
940
+ "label": "Chat",
941
+ "href": "/chat",
942
+ "icon": "message-circle"
943
+ },
944
+ {
945
+ "label": "Memory",
946
+ "href": "/memory",
947
+ "icon": "brain"
948
+ },
949
+ {
950
+ "label": "Provider",
951
+ "href": "/provider",
952
+ "icon": "settings"
953
+ }
954
+ ],
955
+ "children": [
956
+ {
957
+ "type": "stack",
958
+ "direction": "vertical",
959
+ "gap": "lg",
960
+ "children": [
961
+ {
962
+ "type": "stack",
963
+ "direction": "horizontal",
964
+ "gap": "sm",
965
+ "align": "center",
966
+ "justify": "space-between",
967
+ "children": [
968
+ {
969
+ "type": "stack",
970
+ "direction": "horizontal",
971
+ "gap": "sm",
972
+ "align": "center",
973
+ "children": [
974
+ {
975
+ "type": "icon",
976
+ "name": "message-circle",
977
+ "size": "lg"
978
+ },
979
+ {
980
+ "type": "typography",
981
+ "content": "Assistant",
982
+ "variant": "h2"
983
+ }
984
+ ]
985
+ },
986
+ {
987
+ "type": "stack",
988
+ "direction": "horizontal",
989
+ "gap": "xs",
990
+ "children": [
991
+ {
992
+ "type": "badge",
993
+ "label": "@entity.provider"
994
+ },
995
+ {
996
+ "type": "badge",
997
+ "label": "@entity.sessionId"
998
+ }
999
+ ]
1000
+ }
1001
+ ]
1002
+ },
1003
+ {
1004
+ "type": "divider"
1005
+ },
1006
+ {
1007
+ "type": "card",
1008
+ "children": [
1009
+ {
1010
+ "type": "stack",
1011
+ "direction": "vertical",
1012
+ "gap": "md",
1013
+ "children": [
1014
+ {
1015
+ "type": "typography",
1016
+ "content": "Send a message to begin the conversation.",
1017
+ "variant": "body"
1018
+ },
1019
+ {
1020
+ "type": "form-section",
1021
+ "entity": "Assistant",
1022
+ "mode": "edit",
1023
+ "submitEvent": "SEND",
1024
+ "fields": [
1025
+ "currentMessage"
1026
+ ]
1027
+ }
1028
+ ]
1029
+ }
1030
+ ]
1031
+ },
1032
+ {
1033
+ "type": "stack",
1034
+ "direction": "horizontal",
1035
+ "gap": "sm",
1036
+ "children": [
1037
+ {
1038
+ "type": "button",
1039
+ "label": "Compact Context",
1040
+ "event": "COMPACT",
1041
+ "variant": "ghost",
1042
+ "icon": "minimize-2"
1043
+ }
1044
+ ]
1045
+ }
1046
+ ]
1047
+ }
1048
+ ]
1049
+ }
1050
+ ]
1051
+ ]
1052
+ },
1053
+ {
1054
+ "from": "responding",
1055
+ "to": "responding",
1056
+ "event": "SWITCH_PROVIDER",
1057
+ "effects": [
1058
+ [
1059
+ "agent/switch-provider",
1060
+ "@payload.provider"
1061
+ ],
1062
+ [
1063
+ "set",
1064
+ "@entity.provider",
1065
+ [
1066
+ "agent/provider"
1067
+ ]
1068
+ ],
1069
+ [
1070
+ "render-ui",
1071
+ "main",
1072
+ {
1073
+ "type": "dashboard-layout",
1074
+ "appName": "Agent Assistant",
1075
+ "navItems": [
1076
+ {
1077
+ "label": "Chat",
1078
+ "href": "/chat",
1079
+ "icon": "message-circle"
1080
+ },
1081
+ {
1082
+ "label": "Memory",
1083
+ "href": "/memory",
1084
+ "icon": "brain"
1085
+ },
1086
+ {
1087
+ "label": "Provider",
1088
+ "href": "/provider",
1089
+ "icon": "settings"
1090
+ }
1091
+ ],
1092
+ "children": [
1093
+ {
1094
+ "type": "stack",
1095
+ "direction": "vertical",
1096
+ "gap": "lg",
1097
+ "children": [
1098
+ {
1099
+ "type": "stack",
1100
+ "direction": "horizontal",
1101
+ "gap": "sm",
1102
+ "align": "center",
1103
+ "children": [
1104
+ {
1105
+ "type": "icon",
1106
+ "name": "message-circle",
1107
+ "size": "lg"
1108
+ },
1109
+ {
1110
+ "type": "typography",
1111
+ "content": "Assistant Response",
1112
+ "variant": "h2"
1113
+ }
1114
+ ]
1115
+ },
1116
+ {
1117
+ "type": "divider"
1118
+ },
1119
+ {
1120
+ "type": "card",
1121
+ "children": [
1122
+ {
1123
+ "type": "stack",
1124
+ "direction": "vertical",
1125
+ "gap": "md",
1126
+ "children": [
1127
+ {
1128
+ "type": "typography",
1129
+ "content": "@entity.response",
1130
+ "variant": "body"
1131
+ },
1132
+ {
1133
+ "type": "stack",
1134
+ "direction": "horizontal",
1135
+ "gap": "xs",
1136
+ "children": [
1137
+ {
1138
+ "type": "badge",
1139
+ "label": "@entity.provider"
1140
+ },
1141
+ {
1142
+ "type": "badge",
1143
+ "label": "@entity.contextUsage"
1144
+ }
1145
+ ]
1146
+ }
1147
+ ]
1148
+ }
1149
+ ]
1150
+ },
1151
+ {
1152
+ "type": "form-section",
1153
+ "entity": "Assistant",
1154
+ "mode": "edit",
1155
+ "submitEvent": "SEND",
1156
+ "fields": [
1157
+ "currentMessage"
1158
+ ]
1159
+ },
1160
+ {
1161
+ "type": "stack",
1162
+ "direction": "horizontal",
1163
+ "gap": "sm",
1164
+ "children": [
1165
+ {
1166
+ "type": "button",
1167
+ "label": "Compact Context",
1168
+ "event": "COMPACT",
1169
+ "variant": "ghost",
1170
+ "icon": "minimize-2"
1171
+ },
1172
+ {
1173
+ "type": "button",
1174
+ "label": "Switch Provider",
1175
+ "event": "SWITCH_PROVIDER",
1176
+ "variant": "ghost",
1177
+ "icon": "refresh-cw"
1178
+ }
1179
+ ]
1180
+ }
1181
+ ]
1182
+ }
1183
+ ]
1184
+ }
1185
+ ]
1186
+ ]
1187
+ }
1188
+ ]
1189
+ },
1190
+ "listens": [
1191
+ {
1192
+ "event": "PROVIDER_CHANGED",
1193
+ "triggers": "INIT",
1194
+ "scope": "external"
1195
+ }
1196
+ ]
1197
+ }
1198
+ ],
1199
+ "pages": [
1200
+ {
1201
+ "name": "ChatPage",
1202
+ "path": "/chat",
1203
+ "isInitial": true,
1204
+ "traits": [
1205
+ {
1206
+ "ref": "AssistantConversation"
1207
+ }
1208
+ ]
1209
+ }
1210
+ ]
1211
+ },
1212
+ {
1213
+ "name": "MemoryOrbital",
1214
+ "entity": {
1215
+ "name": "Memory",
1216
+ "persistence": "persistent",
1217
+ "collection": "memorys",
1218
+ "fields": [
1219
+ {
1220
+ "name": "id",
1221
+ "type": "string",
1222
+ "required": true
1223
+ },
1224
+ {
1225
+ "name": "content",
1226
+ "type": "string",
1227
+ "default": ""
1228
+ },
1229
+ {
1230
+ "name": "category",
1231
+ "type": "string",
1232
+ "default": "general"
1233
+ },
1234
+ {
1235
+ "name": "strength",
1236
+ "type": "number",
1237
+ "default": 1
1238
+ },
1239
+ {
1240
+ "name": "pinned",
1241
+ "type": "boolean",
1242
+ "default": false
1243
+ },
1244
+ {
1245
+ "name": "scope",
1246
+ "type": "string",
1247
+ "default": "session"
1248
+ },
1249
+ {
1250
+ "name": "lastAccessedAt",
1251
+ "type": "string",
1252
+ "default": ""
1253
+ },
1254
+ {
1255
+ "name": "createdAt",
1256
+ "type": "string",
1257
+ "default": ""
1258
+ }
1259
+ ]
1260
+ },
1261
+ "traits": [
1262
+ {
1263
+ "name": "MemoryLifecycle",
1264
+ "linkedEntity": "Memory",
1265
+ "category": "interaction",
1266
+ "stateMachine": {
1267
+ "states": [
1268
+ {
1269
+ "name": "idle",
1270
+ "isInitial": true
1271
+ },
1272
+ {
1273
+ "name": "active"
1274
+ }
1275
+ ],
1276
+ "events": [
1277
+ {
1278
+ "key": "INIT",
1279
+ "name": "Initialize"
1280
+ },
1281
+ {
1282
+ "key": "MEMORIZE",
1283
+ "name": "Memorize",
1284
+ "payload": [
1285
+ {
1286
+ "name": "content",
1287
+ "type": "string",
1288
+ "required": true
1289
+ },
1290
+ {
1291
+ "name": "category",
1292
+ "type": "string",
1293
+ "required": false
1294
+ }
1295
+ ]
1296
+ },
1297
+ {
1298
+ "key": "RECALL",
1299
+ "name": "Recall",
1300
+ "payload": [
1301
+ {
1302
+ "name": "query",
1303
+ "type": "string",
1304
+ "required": true
1305
+ }
1306
+ ]
1307
+ },
1308
+ {
1309
+ "key": "PIN",
1310
+ "name": "Pin",
1311
+ "payload": [
1312
+ {
1313
+ "name": "id",
1314
+ "type": "string",
1315
+ "required": true
1316
+ }
1317
+ ]
1318
+ },
1319
+ {
1320
+ "key": "FORGET",
1321
+ "name": "Forget",
1322
+ "payload": [
1323
+ {
1324
+ "name": "id",
1325
+ "type": "string",
1326
+ "required": true
1327
+ }
1328
+ ]
1329
+ },
1330
+ {
1331
+ "key": "REINFORCE",
1332
+ "name": "Reinforce",
1333
+ "payload": [
1334
+ {
1335
+ "name": "id",
1336
+ "type": "string",
1337
+ "required": true
1338
+ }
1339
+ ]
1340
+ },
1341
+ {
1342
+ "key": "DECAY",
1343
+ "name": "Decay"
1344
+ }
1345
+ ],
1346
+ "transitions": [
1347
+ {
1348
+ "from": "idle",
1349
+ "to": "idle",
1350
+ "event": "INIT",
1351
+ "effects": [
1352
+ [
1353
+ "fetch",
1354
+ "Memory"
1355
+ ],
1356
+ [
1357
+ "render-ui",
1358
+ "main",
1359
+ {
1360
+ "type": "dashboard-layout",
1361
+ "appName": "Agent Assistant",
1362
+ "navItems": [
1363
+ {
1364
+ "label": "Chat",
1365
+ "href": "/chat",
1366
+ "icon": "message-circle"
1367
+ },
1368
+ {
1369
+ "label": "Memory",
1370
+ "href": "/memory",
1371
+ "icon": "brain"
1372
+ },
1373
+ {
1374
+ "label": "Provider",
1375
+ "href": "/provider",
1376
+ "icon": "settings"
1377
+ }
1378
+ ],
1379
+ "children": [
1380
+ {
1381
+ "type": "stack",
1382
+ "direction": "vertical",
1383
+ "gap": "lg",
1384
+ "children": [
1385
+ {
1386
+ "type": "stack",
1387
+ "direction": "horizontal",
1388
+ "gap": "sm",
1389
+ "align": "center",
1390
+ "children": [
1391
+ {
1392
+ "type": "icon",
1393
+ "name": "brain",
1394
+ "size": "lg"
1395
+ },
1396
+ {
1397
+ "type": "typography",
1398
+ "content": "Memory Manager",
1399
+ "variant": "h2"
1400
+ }
1401
+ ]
1402
+ },
1403
+ {
1404
+ "type": "divider"
1405
+ },
1406
+ {
1407
+ "type": "stack",
1408
+ "direction": "horizontal",
1409
+ "gap": "sm",
1410
+ "children": [
1411
+ {
1412
+ "type": "button",
1413
+ "label": "Memorize",
1414
+ "event": "MEMORIZE",
1415
+ "variant": "primary",
1416
+ "icon": "plus"
1417
+ },
1418
+ {
1419
+ "type": "button",
1420
+ "label": "Recall",
1421
+ "event": "RECALL",
1422
+ "variant": "secondary",
1423
+ "icon": "search"
1424
+ },
1425
+ {
1426
+ "type": "button",
1427
+ "label": "Decay All",
1428
+ "event": "DECAY",
1429
+ "variant": "ghost",
1430
+ "icon": "clock"
1431
+ }
1432
+ ]
1433
+ }
1434
+ ]
1435
+ }
1436
+ ]
1437
+ }
1438
+ ]
1439
+ ]
1440
+ },
1441
+ {
1442
+ "from": "idle",
1443
+ "to": "active",
1444
+ "event": "MEMORIZE",
1445
+ "effects": [
1446
+ [
1447
+ "agent/memorize",
1448
+ "@payload.content",
1449
+ "@payload.category"
1450
+ ],
1451
+ [
1452
+ "set",
1453
+ "@entity.content",
1454
+ "@payload.content"
1455
+ ],
1456
+ [
1457
+ "set",
1458
+ "@entity.category",
1459
+ "@payload.category"
1460
+ ],
1461
+ [
1462
+ "set",
1463
+ "@entity.createdAt",
1464
+ "@now"
1465
+ ],
1466
+ [
1467
+ "render-ui",
1468
+ "main",
1469
+ {
1470
+ "type": "dashboard-layout",
1471
+ "appName": "Agent Assistant",
1472
+ "navItems": [
1473
+ {
1474
+ "label": "Chat",
1475
+ "href": "/chat",
1476
+ "icon": "message-circle"
1477
+ },
1478
+ {
1479
+ "label": "Memory",
1480
+ "href": "/memory",
1481
+ "icon": "brain"
1482
+ },
1483
+ {
1484
+ "label": "Provider",
1485
+ "href": "/provider",
1486
+ "icon": "settings"
1487
+ }
1488
+ ],
1489
+ "children": [
1490
+ {
1491
+ "type": "stack",
1492
+ "direction": "vertical",
1493
+ "gap": "lg",
1494
+ "children": [
1495
+ {
1496
+ "type": "stack",
1497
+ "direction": "horizontal",
1498
+ "gap": "sm",
1499
+ "align": "center",
1500
+ "children": [
1501
+ {
1502
+ "type": "icon",
1503
+ "name": "brain",
1504
+ "size": "lg"
1505
+ },
1506
+ {
1507
+ "type": "typography",
1508
+ "content": "Memory Active",
1509
+ "variant": "h2"
1510
+ }
1511
+ ]
1512
+ },
1513
+ {
1514
+ "type": "divider"
1515
+ },
1516
+ {
1517
+ "type": "typography",
1518
+ "variant": "body",
1519
+ "content": "@entity.content"
1520
+ },
1521
+ {
1522
+ "type": "stack",
1523
+ "direction": "horizontal",
1524
+ "gap": "sm",
1525
+ "children": [
1526
+ {
1527
+ "type": "badge",
1528
+ "label": "@entity.category"
1529
+ },
1530
+ {
1531
+ "type": "badge",
1532
+ "label": "@entity.strength"
1533
+ }
1534
+ ]
1535
+ },
1536
+ {
1537
+ "type": "stack",
1538
+ "direction": "horizontal",
1539
+ "gap": "sm",
1540
+ "children": [
1541
+ {
1542
+ "type": "button",
1543
+ "label": "Pin",
1544
+ "event": "PIN",
1545
+ "variant": "secondary",
1546
+ "icon": "pin"
1547
+ },
1548
+ {
1549
+ "type": "button",
1550
+ "label": "Reinforce",
1551
+ "event": "REINFORCE",
1552
+ "variant": "secondary",
1553
+ "icon": "zap"
1554
+ },
1555
+ {
1556
+ "type": "button",
1557
+ "label": "Forget",
1558
+ "event": "FORGET",
1559
+ "variant": "destructive",
1560
+ "icon": "trash"
1561
+ }
1562
+ ]
1563
+ }
1564
+ ]
1565
+ }
1566
+ ]
1567
+ }
1568
+ ]
1569
+ ]
1570
+ },
1571
+ {
1572
+ "from": "idle",
1573
+ "to": "active",
1574
+ "event": "RECALL",
1575
+ "effects": [
1576
+ [
1577
+ "agent/recall",
1578
+ "@payload.query"
1579
+ ],
1580
+ [
1581
+ "render-ui",
1582
+ "main",
1583
+ {
1584
+ "type": "dashboard-layout",
1585
+ "appName": "Agent Assistant",
1586
+ "navItems": [
1587
+ {
1588
+ "label": "Chat",
1589
+ "href": "/chat",
1590
+ "icon": "message-circle"
1591
+ },
1592
+ {
1593
+ "label": "Memory",
1594
+ "href": "/memory",
1595
+ "icon": "brain"
1596
+ },
1597
+ {
1598
+ "label": "Provider",
1599
+ "href": "/provider",
1600
+ "icon": "settings"
1601
+ }
1602
+ ],
1603
+ "children": [
1604
+ {
1605
+ "type": "stack",
1606
+ "direction": "vertical",
1607
+ "gap": "lg",
1608
+ "children": [
1609
+ {
1610
+ "type": "stack",
1611
+ "direction": "horizontal",
1612
+ "gap": "sm",
1613
+ "align": "center",
1614
+ "children": [
1615
+ {
1616
+ "type": "icon",
1617
+ "name": "brain",
1618
+ "size": "lg"
1619
+ },
1620
+ {
1621
+ "type": "typography",
1622
+ "content": "Memory Active",
1623
+ "variant": "h2"
1624
+ }
1625
+ ]
1626
+ },
1627
+ {
1628
+ "type": "divider"
1629
+ },
1630
+ {
1631
+ "type": "typography",
1632
+ "variant": "body",
1633
+ "content": "@entity.content"
1634
+ },
1635
+ {
1636
+ "type": "stack",
1637
+ "direction": "horizontal",
1638
+ "gap": "sm",
1639
+ "children": [
1640
+ {
1641
+ "type": "badge",
1642
+ "label": "@entity.category"
1643
+ },
1644
+ {
1645
+ "type": "badge",
1646
+ "label": "@entity.strength"
1647
+ }
1648
+ ]
1649
+ },
1650
+ {
1651
+ "type": "stack",
1652
+ "direction": "horizontal",
1653
+ "gap": "sm",
1654
+ "children": [
1655
+ {
1656
+ "type": "button",
1657
+ "label": "Pin",
1658
+ "event": "PIN",
1659
+ "variant": "secondary",
1660
+ "icon": "pin"
1661
+ },
1662
+ {
1663
+ "type": "button",
1664
+ "label": "Reinforce",
1665
+ "event": "REINFORCE",
1666
+ "variant": "secondary",
1667
+ "icon": "zap"
1668
+ },
1669
+ {
1670
+ "type": "button",
1671
+ "label": "Forget",
1672
+ "event": "FORGET",
1673
+ "variant": "destructive",
1674
+ "icon": "trash"
1675
+ }
1676
+ ]
1677
+ }
1678
+ ]
1679
+ }
1680
+ ]
1681
+ }
1682
+ ]
1683
+ ]
1684
+ },
1685
+ {
1686
+ "from": "active",
1687
+ "to": "active",
1688
+ "event": "PIN",
1689
+ "guard": [
1690
+ "not",
1691
+ [
1692
+ "agent/is-pinned",
1693
+ "@payload.id"
1694
+ ]
1695
+ ],
1696
+ "effects": [
1697
+ [
1698
+ "agent/pin",
1699
+ "@payload.id"
1700
+ ],
1701
+ [
1702
+ "set",
1703
+ "@entity.pinned",
1704
+ true
1705
+ ]
1706
+ ]
1707
+ },
1708
+ {
1709
+ "from": "active",
1710
+ "to": "idle",
1711
+ "event": "FORGET",
1712
+ "effects": [
1713
+ [
1714
+ "agent/forget",
1715
+ "@payload.id"
1716
+ ],
1717
+ [
1718
+ "render-ui",
1719
+ "main",
1720
+ {
1721
+ "type": "dashboard-layout",
1722
+ "appName": "Agent Assistant",
1723
+ "navItems": [
1724
+ {
1725
+ "label": "Chat",
1726
+ "href": "/chat",
1727
+ "icon": "message-circle"
1728
+ },
1729
+ {
1730
+ "label": "Memory",
1731
+ "href": "/memory",
1732
+ "icon": "brain"
1733
+ },
1734
+ {
1735
+ "label": "Provider",
1736
+ "href": "/provider",
1737
+ "icon": "settings"
1738
+ }
1739
+ ],
1740
+ "children": [
1741
+ {
1742
+ "type": "stack",
1743
+ "direction": "vertical",
1744
+ "gap": "lg",
1745
+ "children": [
1746
+ {
1747
+ "type": "stack",
1748
+ "direction": "horizontal",
1749
+ "gap": "sm",
1750
+ "align": "center",
1751
+ "children": [
1752
+ {
1753
+ "type": "icon",
1754
+ "name": "brain",
1755
+ "size": "lg"
1756
+ },
1757
+ {
1758
+ "type": "typography",
1759
+ "content": "Memory Manager",
1760
+ "variant": "h2"
1761
+ }
1762
+ ]
1763
+ },
1764
+ {
1765
+ "type": "divider"
1766
+ },
1767
+ {
1768
+ "type": "stack",
1769
+ "direction": "horizontal",
1770
+ "gap": "sm",
1771
+ "children": [
1772
+ {
1773
+ "type": "button",
1774
+ "label": "Memorize",
1775
+ "event": "MEMORIZE",
1776
+ "variant": "primary",
1777
+ "icon": "plus"
1778
+ },
1779
+ {
1780
+ "type": "button",
1781
+ "label": "Recall",
1782
+ "event": "RECALL",
1783
+ "variant": "secondary",
1784
+ "icon": "search"
1785
+ },
1786
+ {
1787
+ "type": "button",
1788
+ "label": "Decay All",
1789
+ "event": "DECAY",
1790
+ "variant": "ghost",
1791
+ "icon": "clock"
1792
+ }
1793
+ ]
1794
+ }
1795
+ ]
1796
+ }
1797
+ ]
1798
+ }
1799
+ ]
1800
+ ]
1801
+ },
1802
+ {
1803
+ "from": "active",
1804
+ "to": "active",
1805
+ "event": "REINFORCE",
1806
+ "effects": [
1807
+ [
1808
+ "agent/reinforce",
1809
+ "@payload.id"
1810
+ ]
1811
+ ]
1812
+ },
1813
+ {
1814
+ "from": "idle",
1815
+ "to": "idle",
1816
+ "event": "DECAY",
1817
+ "effects": [
1818
+ [
1819
+ "agent/decay"
1820
+ ]
1821
+ ]
1822
+ },
1823
+ {
1824
+ "from": "active",
1825
+ "to": "idle",
1826
+ "event": "DECAY",
1827
+ "effects": [
1828
+ [
1829
+ "agent/decay"
1830
+ ],
1831
+ [
1832
+ "render-ui",
1833
+ "main",
1834
+ {
1835
+ "type": "dashboard-layout",
1836
+ "appName": "Agent Assistant",
1837
+ "navItems": [
1838
+ {
1839
+ "label": "Chat",
1840
+ "href": "/chat",
1841
+ "icon": "message-circle"
1842
+ },
1843
+ {
1844
+ "label": "Memory",
1845
+ "href": "/memory",
1846
+ "icon": "brain"
1847
+ },
1848
+ {
1849
+ "label": "Provider",
1850
+ "href": "/provider",
1851
+ "icon": "settings"
1852
+ }
1853
+ ],
1854
+ "children": [
1855
+ {
1856
+ "type": "stack",
1857
+ "direction": "vertical",
1858
+ "gap": "lg",
1859
+ "children": [
1860
+ {
1861
+ "type": "stack",
1862
+ "direction": "horizontal",
1863
+ "gap": "sm",
1864
+ "align": "center",
1865
+ "children": [
1866
+ {
1867
+ "type": "icon",
1868
+ "name": "brain",
1869
+ "size": "lg"
1870
+ },
1871
+ {
1872
+ "type": "typography",
1873
+ "content": "Memory Manager",
1874
+ "variant": "h2"
1875
+ }
1876
+ ]
1877
+ },
1878
+ {
1879
+ "type": "divider"
1880
+ },
1881
+ {
1882
+ "type": "stack",
1883
+ "direction": "horizontal",
1884
+ "gap": "sm",
1885
+ "children": [
1886
+ {
1887
+ "type": "button",
1888
+ "label": "Memorize",
1889
+ "event": "MEMORIZE",
1890
+ "variant": "primary",
1891
+ "icon": "plus"
1892
+ },
1893
+ {
1894
+ "type": "button",
1895
+ "label": "Recall",
1896
+ "event": "RECALL",
1897
+ "variant": "secondary",
1898
+ "icon": "search"
1899
+ },
1900
+ {
1901
+ "type": "button",
1902
+ "label": "Decay All",
1903
+ "event": "DECAY",
1904
+ "variant": "ghost",
1905
+ "icon": "clock"
1906
+ }
1907
+ ]
1908
+ }
1909
+ ]
1910
+ }
1911
+ ]
1912
+ }
1913
+ ]
1914
+ ]
1915
+ }
1916
+ ]
1917
+ },
1918
+ "listens": [
1919
+ {
1920
+ "event": "MEMORIZE_RESPONSE",
1921
+ "triggers": "MEMORIZE",
1922
+ "scope": "external"
1923
+ }
1924
+ ]
1925
+ }
1926
+ ],
1927
+ "pages": [
1928
+ {
1929
+ "name": "MemoryPage",
1930
+ "path": "/memory",
1931
+ "traits": [
1932
+ {
1933
+ "ref": "MemoryLifecycle"
1934
+ }
1935
+ ]
1936
+ }
1937
+ ]
1938
+ },
1939
+ {
1940
+ "name": "ProviderConfigOrbital",
1941
+ "entity": {
1942
+ "name": "ProviderConfig",
1943
+ "persistence": "runtime",
1944
+ "fields": [
1945
+ {
1946
+ "name": "id",
1947
+ "type": "string",
1948
+ "required": true
1949
+ },
1950
+ {
1951
+ "name": "currentProvider",
1952
+ "type": "string",
1953
+ "default": "default"
1954
+ },
1955
+ {
1956
+ "name": "currentModel",
1957
+ "type": "string",
1958
+ "default": ""
1959
+ },
1960
+ {
1961
+ "name": "availableProviders",
1962
+ "type": "string",
1963
+ "default": "default,openai,anthropic"
1964
+ },
1965
+ {
1966
+ "name": "switchReason",
1967
+ "type": "string",
1968
+ "default": ""
1969
+ }
1970
+ ]
1971
+ },
1972
+ "traits": [
1973
+ {
1974
+ "name": "ProviderManager",
1975
+ "linkedEntity": "ProviderConfig",
1976
+ "category": "interaction",
1977
+ "emits": [
1978
+ {
1979
+ "event": "PROVIDER_CHANGED",
1980
+ "description": "Provider was switched",
1981
+ "scope": "internal"
1982
+ },
1983
+ {
1984
+ "event": "PROVIDER_CHANGED",
1985
+ "description": "Provider was switched",
1986
+ "scope": "external"
1987
+ }
1988
+ ],
1989
+ "stateMachine": {
1990
+ "states": [
1991
+ {
1992
+ "name": "idle",
1993
+ "isInitial": true
1994
+ }
1995
+ ],
1996
+ "events": [
1997
+ {
1998
+ "key": "INIT",
1999
+ "name": "Initialize"
2000
+ },
2001
+ {
2002
+ "key": "SWITCH",
2003
+ "name": "Switch",
2004
+ "payload": [
2005
+ {
2006
+ "name": "provider",
2007
+ "type": "string",
2008
+ "required": false
2009
+ }
2010
+ ]
2011
+ }
2012
+ ],
2013
+ "transitions": [
2014
+ {
2015
+ "from": "idle",
2016
+ "to": "idle",
2017
+ "event": "INIT",
2018
+ "effects": [
2019
+ [
2020
+ "set",
2021
+ "@entity.currentProvider",
2022
+ [
2023
+ "agent/provider"
2024
+ ]
2025
+ ],
2026
+ [
2027
+ "set",
2028
+ "@entity.currentModel",
2029
+ [
2030
+ "agent/model"
2031
+ ]
2032
+ ],
2033
+ [
2034
+ "fetch",
2035
+ "ProviderConfig"
2036
+ ],
2037
+ [
2038
+ "render-ui",
2039
+ "main",
2040
+ {
2041
+ "type": "dashboard-layout",
2042
+ "appName": "Agent Assistant",
2043
+ "navItems": [
2044
+ {
2045
+ "label": "Chat",
2046
+ "href": "/chat",
2047
+ "icon": "message-circle"
2048
+ },
2049
+ {
2050
+ "label": "Memory",
2051
+ "href": "/memory",
2052
+ "icon": "brain"
2053
+ },
2054
+ {
2055
+ "label": "Provider",
2056
+ "href": "/provider",
2057
+ "icon": "settings"
2058
+ }
2059
+ ],
2060
+ "children": [
2061
+ {
2062
+ "type": "stack",
2063
+ "direction": "vertical",
2064
+ "gap": "lg",
2065
+ "children": [
2066
+ {
2067
+ "type": "stack",
2068
+ "direction": "horizontal",
2069
+ "gap": "sm",
2070
+ "align": "center",
2071
+ "children": [
2072
+ {
2073
+ "type": "icon",
2074
+ "name": "settings",
2075
+ "size": "lg"
2076
+ },
2077
+ {
2078
+ "type": "typography",
2079
+ "content": "Provider Settings",
2080
+ "variant": "h2"
2081
+ }
2082
+ ]
2083
+ },
2084
+ {
2085
+ "type": "divider"
2086
+ },
2087
+ {
2088
+ "type": "card",
2089
+ "children": [
2090
+ {
2091
+ "type": "stack",
2092
+ "direction": "vertical",
2093
+ "gap": "md",
2094
+ "children": [
2095
+ {
2096
+ "type": "typography",
2097
+ "content": "Current Provider",
2098
+ "variant": "caption"
2099
+ },
2100
+ {
2101
+ "type": "typography",
2102
+ "content": "@entity.currentProvider",
2103
+ "variant": "h3"
2104
+ },
2105
+ {
2106
+ "type": "typography",
2107
+ "content": "Model",
2108
+ "variant": "caption"
2109
+ },
2110
+ {
2111
+ "type": "typography",
2112
+ "content": "@entity.currentModel",
2113
+ "variant": "body"
2114
+ }
2115
+ ]
2116
+ }
2117
+ ]
2118
+ },
2119
+ {
2120
+ "type": "stack",
2121
+ "direction": "horizontal",
2122
+ "gap": "sm",
2123
+ "children": [
2124
+ {
2125
+ "type": "button",
2126
+ "label": "Switch Provider",
2127
+ "event": "SWITCH",
2128
+ "variant": "primary",
2129
+ "icon": "refresh-cw"
2130
+ }
2131
+ ]
2132
+ }
2133
+ ]
2134
+ }
2135
+ ]
2136
+ }
2137
+ ]
2138
+ ]
2139
+ },
2140
+ {
2141
+ "from": "idle",
2142
+ "to": "idle",
2143
+ "event": "SWITCH",
2144
+ "effects": [
2145
+ [
2146
+ "agent/switch-provider",
2147
+ "@payload.provider"
2148
+ ],
2149
+ [
2150
+ "set",
2151
+ "@entity.currentProvider",
2152
+ [
2153
+ "agent/provider"
2154
+ ]
2155
+ ],
2156
+ [
2157
+ "set",
2158
+ "@entity.currentModel",
2159
+ [
2160
+ "agent/model"
2161
+ ]
2162
+ ],
2163
+ [
2164
+ "emit",
2165
+ "PROVIDER_CHANGED"
2166
+ ],
2167
+ [
2168
+ "render-ui",
2169
+ "main",
2170
+ {
2171
+ "type": "dashboard-layout",
2172
+ "appName": "Agent Assistant",
2173
+ "navItems": [
2174
+ {
2175
+ "label": "Chat",
2176
+ "href": "/chat",
2177
+ "icon": "message-circle"
2178
+ },
2179
+ {
2180
+ "label": "Memory",
2181
+ "href": "/memory",
2182
+ "icon": "brain"
2183
+ },
2184
+ {
2185
+ "label": "Provider",
2186
+ "href": "/provider",
2187
+ "icon": "settings"
2188
+ }
2189
+ ],
2190
+ "children": [
2191
+ {
2192
+ "type": "stack",
2193
+ "direction": "vertical",
2194
+ "gap": "lg",
2195
+ "children": [
2196
+ {
2197
+ "type": "stack",
2198
+ "direction": "horizontal",
2199
+ "gap": "sm",
2200
+ "align": "center",
2201
+ "children": [
2202
+ {
2203
+ "type": "icon",
2204
+ "name": "settings",
2205
+ "size": "lg"
2206
+ },
2207
+ {
2208
+ "type": "typography",
2209
+ "content": "Provider Settings",
2210
+ "variant": "h2"
2211
+ }
2212
+ ]
2213
+ },
2214
+ {
2215
+ "type": "divider"
2216
+ },
2217
+ {
2218
+ "type": "card",
2219
+ "children": [
2220
+ {
2221
+ "type": "stack",
2222
+ "direction": "vertical",
2223
+ "gap": "md",
2224
+ "children": [
2225
+ {
2226
+ "type": "typography",
2227
+ "content": "Current Provider",
2228
+ "variant": "caption"
2229
+ },
2230
+ {
2231
+ "type": "typography",
2232
+ "content": "@entity.currentProvider",
2233
+ "variant": "h3"
2234
+ },
2235
+ {
2236
+ "type": "typography",
2237
+ "content": "Model",
2238
+ "variant": "caption"
2239
+ },
2240
+ {
2241
+ "type": "typography",
2242
+ "content": "@entity.currentModel",
2243
+ "variant": "body"
2244
+ }
2245
+ ]
2246
+ }
2247
+ ]
2248
+ },
2249
+ {
2250
+ "type": "stack",
2251
+ "direction": "horizontal",
2252
+ "gap": "sm",
2253
+ "children": [
2254
+ {
2255
+ "type": "button",
2256
+ "label": "Switch Provider",
2257
+ "event": "SWITCH",
2258
+ "variant": "primary",
2259
+ "icon": "refresh-cw"
2260
+ }
2261
+ ]
2262
+ }
2263
+ ]
2264
+ }
2265
+ ]
2266
+ }
2267
+ ]
2268
+ ]
2269
+ }
2270
+ ]
2271
+ }
2272
+ }
2273
+ ],
2274
+ "pages": [
2275
+ {
2276
+ "name": "ProviderPage",
2277
+ "path": "/provider",
2278
+ "traits": [
2279
+ {
2280
+ "ref": "ProviderManager"
2281
+ }
2282
+ ]
2283
+ }
2284
+ ]
2285
+ }
2286
+ ],
2287
+ "description": "Full chat assistant organism. Composes agent atoms into a multi-turn conversational agent with memory persistence, context compaction, and provider switching. Composed from: - stdAgentMemory: memory lifecycle (memorize, recall, pin, forget, reinforce, decay) - inline ConversationTrait: multi-turn chat with generate + context tracking - inline ProviderTrait: provider switching based on task complexity Cross-trait events: - MEMORIZE_RESPONSE (Conversation -> Memory): auto-memorize important responses - PROVIDER_CHANGED (Provider -> Conversation): notify conversation of provider switch Pages: /chat (initial), /memory, /provider"
2288
+ }