@datalayer/agent-runtimes 1.0.3 → 1.0.4

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 (73) hide show
  1. package/README.md +13 -131
  2. package/lib/chat/Chat.d.ts +3 -1
  3. package/lib/chat/Chat.js +2 -2
  4. package/lib/chat/base/ChatBase.js +52 -1
  5. package/lib/chat/messages/ChatMessageList.js +17 -4
  6. package/lib/client/AgentsMixin.d.ts +48 -1
  7. package/lib/client/AgentsMixin.js +109 -0
  8. package/lib/components/NotificationEventCard.js +51 -26
  9. package/lib/components/OutputCard.js +21 -7
  10. package/lib/components/ToolApprovalCard.js +20 -2
  11. package/lib/examples/AgentCheckpointsExample.js +2 -8
  12. package/lib/examples/AgentCodemodeExample.js +3 -9
  13. package/lib/examples/AgentEvalsExample.js +3 -9
  14. package/lib/examples/AgentGuardrailsExample.js +3 -9
  15. package/lib/examples/AgentMemoryExample.js +3 -9
  16. package/lib/examples/AgentMonitoringExample.js +3 -9
  17. package/lib/examples/AgentNotificationsExample.js +2 -8
  18. package/lib/examples/AgentOutputsExample.js +3 -9
  19. package/lib/examples/AgentSandboxExample.js +3 -9
  20. package/lib/examples/AgentSkillsExample.js +3 -9
  21. package/lib/examples/AgentToolApprovalsExample.js +89 -24
  22. package/lib/examples/AgentTriggersExample.js +604 -37
  23. package/lib/examples/ChatExample.js +2 -10
  24. package/lib/examples/components/ErrorView.d.ts +14 -0
  25. package/lib/examples/components/ErrorView.js +20 -0
  26. package/lib/examples/components/index.d.ts +2 -0
  27. package/lib/examples/components/index.js +1 -0
  28. package/lib/examples/main.d.ts +1 -0
  29. package/lib/examples/main.js +1 -0
  30. package/lib/protocols/VercelAIAdapter.d.ts +2 -0
  31. package/lib/protocols/VercelAIAdapter.js +86 -20
  32. package/lib/shims/json5.d.ts +4 -0
  33. package/lib/shims/json5.js +8 -0
  34. package/lib/specs/agents/agents.js +241 -1390
  35. package/lib/specs/agents/index.js +1 -3
  36. package/lib/specs/envvars.js +20 -27
  37. package/lib/specs/evals.js +6 -6
  38. package/lib/specs/events.d.ts +10 -2
  39. package/lib/specs/events.js +84 -126
  40. package/lib/specs/frontendTools.js +2 -2
  41. package/lib/specs/guardrails.d.ts +7 -0
  42. package/lib/specs/guardrails.js +159 -240
  43. package/lib/specs/mcpServers.js +6 -35
  44. package/lib/specs/memory.d.ts +2 -0
  45. package/lib/specs/memory.js +17 -4
  46. package/lib/specs/models.js +5 -25
  47. package/lib/specs/notifications.js +18 -102
  48. package/lib/specs/outputs.js +9 -15
  49. package/lib/specs/skills.js +18 -18
  50. package/lib/specs/teams/index.js +1 -3
  51. package/lib/specs/teams/teams.js +348 -468
  52. package/lib/specs/tools.js +6 -3
  53. package/lib/specs/triggers.js +11 -61
  54. package/lib/types/tools.d.ts +2 -0
  55. package/package.json +1 -1
  56. package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
  57. package/scripts/codegen/generate_agents.py +4 -1
  58. package/scripts/codegen/generate_events.py +12 -4
  59. package/scripts/codegen/generate_tools.py +20 -0
  60. package/style/primer-primitives.css +1 -6
  61. package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
  62. package/scripts/codegen/__pycache__/generate_envvars.cpython-313.pyc +0 -0
  63. package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
  64. package/scripts/codegen/__pycache__/generate_guardrails.cpython-313.pyc +0 -0
  65. package/scripts/codegen/__pycache__/generate_mcp_servers.cpython-313.pyc +0 -0
  66. package/scripts/codegen/__pycache__/generate_memory.cpython-313.pyc +0 -0
  67. package/scripts/codegen/__pycache__/generate_models.cpython-313.pyc +0 -0
  68. package/scripts/codegen/__pycache__/generate_notifications.cpython-313.pyc +0 -0
  69. package/scripts/codegen/__pycache__/generate_outputs.cpython-313.pyc +0 -0
  70. package/scripts/codegen/__pycache__/generate_skills.cpython-313.pyc +0 -0
  71. package/scripts/codegen/__pycache__/generate_teams.cpython-313.pyc +0 -0
  72. package/scripts/codegen/__pycache__/generate_tools.cpython-313.pyc +0 -0
  73. package/scripts/codegen/__pycache__/generate_triggers.cpython-313.pyc +0 -0
@@ -10,14 +10,7 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
10
10
  version: '0.0.1',
11
11
  name: 'Analyze Campaign Performance',
12
12
  description: `A multi-agent team that unifies marketing data from Google Ads, Meta, TikTok, LinkedIn, GA4, CRM, and email platforms. Normalises metrics into a unified view, detects performance anomalies in real time, and generates budget reallocation recommendations to maximise ROAS.`,
13
- tags: [
14
- 'marketing',
15
- 'media',
16
- 'campaigns',
17
- 'analytics',
18
- 'advertising',
19
- 'social-media',
20
- ],
13
+ tags: ["marketing", "media", "campaigns", "analytics", "advertising", "social-media"],
21
14
  enabled: true,
22
15
  icon: 'megaphone',
23
16
  emoji: '📢',
@@ -25,10 +18,7 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
25
18
  agentSpecId: 'analyze-campaign-performance:0.0.1',
26
19
  orchestrationProtocol: 'datalayer',
27
20
  executionMode: 'sequential',
28
- supervisor: {
29
- name: 'Campaign Analytics Orchestrator Agent',
30
- model: 'openai-gpt-4-1',
31
- },
21
+ supervisor: { name: 'Campaign Analytics Orchestrator Agent', model: 'openai-gpt-4-1' },
32
22
  routingInstructions: `Start with Platform Connector to pull data from all ad platforms, then Metrics Normaliser for unified KPIs, then Anomaly Detector for real-time performance monitoring, then Budget Optimiser for reallocation recommendations. Escalate CPA spikes above 50% immediately.`,
33
23
  validation: { timeout: '300s', retryOnFailure: true, maxRetries: 2 },
34
24
  agents: [
@@ -39,13 +29,7 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
39
29
  goal: `Pull campaign data from Google Ads, Meta, TikTok, LinkedIn, GA4, and email platforms`,
40
30
  model: 'openai-gpt-4-1',
41
31
  mcpServer: 'Ad Platforms MCP',
42
- tools: [
43
- 'Google Ads Connector',
44
- 'Meta Ads Connector',
45
- 'TikTok Ads Connector',
46
- 'LinkedIn Ads Connector',
47
- 'GA4 Connector',
48
- ],
32
+ tools: ["Google Ads Connector", "Meta Ads Connector", "TikTok Ads Connector", "LinkedIn Ads Connector", "GA4 Connector"],
49
33
  trigger: 'Schedule: Every 4 hours',
50
34
  approval: 'auto',
51
35
  },
@@ -56,12 +40,7 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
56
40
  goal: `Normalise CPA, ROAS, CTR, and attribution across all platforms into unified view`,
57
41
  model: 'openai-gpt-4-1',
58
42
  mcpServer: 'Analytics MCP',
59
- tools: [
60
- 'Metric Unifier',
61
- 'Currency Converter',
62
- 'Attribution Mapper',
63
- 'Naming Convention Resolver',
64
- ],
43
+ tools: ["Metric Unifier", "Currency Converter", "Attribution Mapper", "Naming Convention Resolver"],
65
44
  trigger: 'On completion of Platform Connector Agent',
66
45
  approval: 'auto',
67
46
  },
@@ -72,12 +51,7 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
72
51
  goal: `Monitor all KPIs for CTR drops, CPA spikes, and budget pacing issues`,
73
52
  model: 'anthropic-claude-sonnet-4',
74
53
  mcpServer: 'Monitoring MCP',
75
- tools: [
76
- 'Anomaly Scanner',
77
- 'Budget Pacer',
78
- 'Alert Generator',
79
- 'Campaign Pauser',
80
- ],
54
+ tools: ["Anomaly Scanner", "Budget Pacer", "Alert Generator", "Campaign Pauser"],
81
55
  trigger: 'On completion of Metrics Normaliser Agent',
82
56
  approval: 'manual',
83
57
  },
@@ -88,53 +62,52 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
88
62
  goal: `Generate budget reallocation recommendations to maximise ROAS across channels`,
89
63
  model: 'openai-gpt-4-1',
90
64
  mcpServer: 'Optimisation MCP',
91
- tools: [
92
- 'ROAS Calculator',
93
- 'Budget Allocator',
94
- 'Scenario Modeller',
95
- 'Report Generator',
96
- ],
65
+ tools: ["ROAS Calculator", "Budget Allocator", "Scenario Modeller", "Report Generator"],
97
66
  trigger: 'On completion of Anomaly Detector Agent',
98
67
  approval: 'manual',
99
68
  },
100
69
  ],
101
70
  reactionRules: [
102
71
  {
103
- id: 'rr-camp-1',
104
- trigger: 'budget_threshold_exceeded',
105
- action: 'pause_and_notify',
106
- auto: true,
107
- maxRetries: 1,
108
- escalateAfterRetries: 1,
109
- priority: 'high',
110
- },
111
- {
112
- id: 'rr-camp-2',
113
- trigger: 'data_quality_low',
114
- action: 'retry_collection',
115
- auto: true,
116
- maxRetries: 3,
117
- escalateAfterRetries: 3,
118
- priority: 'medium',
119
- },
72
+ "id": "rr-camp-1",
73
+ "trigger": "budget_threshold_exceeded",
74
+ "action": "pause_and_notify",
75
+ "auto": true,
76
+ "maxRetries": 1,
77
+ "escalateAfterRetries": 1,
78
+ "priority": "high"
79
+ },
80
+ {
81
+ "id": "rr-camp-2",
82
+ "trigger": "data_quality_low",
83
+ "action": "retry_collection",
84
+ "auto": true,
85
+ "maxRetries": 3,
86
+ "escalateAfterRetries": 3,
87
+ "priority": "medium"
88
+ }
120
89
  ],
121
90
  healthMonitoring: {
122
- heartbeatInterval: '30s',
123
- staleThreshold: '120s',
124
- unresponsiveThreshold: '300s',
125
- stuckThreshold: '600s',
126
- maxRestartAttempts: 3,
91
+ "heartbeatInterval": "30s",
92
+ "staleThreshold": "120s",
93
+ "unresponsiveThreshold": "300s",
94
+ "stuckThreshold": "600s",
95
+ "maxRestartAttempts": 3
127
96
  },
128
97
  notifications: {
129
- on_start: true,
130
- on_completion: true,
131
- on_failure: true,
132
- on_escalation: true,
98
+ "on_start": true,
99
+ "on_completion": true,
100
+ "on_failure": true,
101
+ "on_escalation": true
133
102
  },
134
103
  output: {
135
- formats: ['pdf', 'csv', 'json'],
136
- template: 'Campaign Performance Report',
137
- storage: 's3://reports/campaign-analytics/',
104
+ "formats": [
105
+ "pdf",
106
+ "csv",
107
+ "json"
108
+ ],
109
+ "template": "Campaign Performance Report",
110
+ "storage": "s3://reports/campaign-analytics/"
138
111
  },
139
112
  };
140
113
  export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
@@ -142,7 +115,7 @@ export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
142
115
  version: '0.0.1',
143
116
  name: 'Analyze Support Tickets',
144
117
  description: `A multi-agent team that triages incoming support tickets, categorizes by urgency and topic, identifies recurring patterns, and generates resolution recommendations with escalation paths.`,
145
- tags: ['analytics', 'data', 'support', 'tickets'],
118
+ tags: ["analytics", "data", "support", "tickets"],
146
119
  enabled: true,
147
120
  icon: 'issue-opened',
148
121
  emoji: '🎫',
@@ -161,7 +134,7 @@ export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
161
134
  goal: `Ingest new support tickets and assess urgency level (P1-P4)`,
162
135
  model: 'openai-gpt-4-1',
163
136
  mcpServer: 'Helpdesk MCP',
164
- tools: ['Ticket Reader', 'Priority Classifier'],
137
+ tools: ["Ticket Reader", "Priority Classifier"],
165
138
  trigger: 'Event: new ticket received',
166
139
  approval: 'auto',
167
140
  },
@@ -172,7 +145,7 @@ export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
172
145
  goal: `Categorize tickets by topic, product area, and sentiment`,
173
146
  model: 'openai-gpt-4-1',
174
147
  mcpServer: 'NLP Pipeline MCP',
175
- tools: ['Topic Classifier', 'Sentiment Analyzer', 'Product Tagger'],
148
+ tools: ["Topic Classifier", "Sentiment Analyzer", "Product Tagger"],
176
149
  trigger: 'On completion of Triage Agent',
177
150
  approval: 'auto',
178
151
  },
@@ -183,52 +156,51 @@ export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
183
156
  goal: `Identify recurring issues and generate resolution recommendations`,
184
157
  model: 'anthropic-claude-sonnet-4',
185
158
  mcpServer: 'Analytics MCP',
186
- tools: [
187
- 'Pattern Detector',
188
- 'Knowledge Base Search',
189
- 'Resolution Generator',
190
- ],
159
+ tools: ["Pattern Detector", "Knowledge Base Search", "Resolution Generator"],
191
160
  trigger: 'On completion of Categorizer Agent',
192
161
  approval: 'manual',
193
162
  },
194
163
  ],
195
164
  reactionRules: [
196
165
  {
197
- id: 'rr-supp-1',
198
- trigger: 'ticket_surge_detected',
199
- action: 'escalate_to_supervisor',
200
- auto: true,
201
- maxRetries: 2,
202
- escalateAfterRetries: 2,
203
- priority: 'high',
204
- },
205
- {
206
- id: 'rr-supp-2',
207
- trigger: 'classification_confidence_low',
208
- action: 'request_human_review',
209
- auto: false,
210
- maxRetries: 1,
211
- escalateAfterRetries: 1,
212
- priority: 'medium',
213
- },
166
+ "id": "rr-supp-1",
167
+ "trigger": "ticket_surge_detected",
168
+ "action": "escalate_to_supervisor",
169
+ "auto": true,
170
+ "maxRetries": 2,
171
+ "escalateAfterRetries": 2,
172
+ "priority": "high"
173
+ },
174
+ {
175
+ "id": "rr-supp-2",
176
+ "trigger": "classification_confidence_low",
177
+ "action": "request_human_review",
178
+ "auto": false,
179
+ "maxRetries": 1,
180
+ "escalateAfterRetries": 1,
181
+ "priority": "medium"
182
+ }
214
183
  ],
215
184
  healthMonitoring: {
216
- heartbeatInterval: '15s',
217
- staleThreshold: '60s',
218
- unresponsiveThreshold: '180s',
219
- stuckThreshold: '300s',
220
- maxRestartAttempts: 3,
185
+ "heartbeatInterval": "15s",
186
+ "staleThreshold": "60s",
187
+ "unresponsiveThreshold": "180s",
188
+ "stuckThreshold": "300s",
189
+ "maxRestartAttempts": 3
221
190
  },
222
191
  notifications: {
223
- on_start: false,
224
- on_completion: true,
225
- on_failure: true,
226
- on_escalation: true,
192
+ "on_start": false,
193
+ "on_completion": true,
194
+ "on_failure": true,
195
+ "on_escalation": true
227
196
  },
228
197
  output: {
229
- formats: ['pdf', 'json'],
230
- template: 'Support Ticket Analysis',
231
- storage: 's3://reports/support-analytics/',
198
+ "formats": [
199
+ "pdf",
200
+ "json"
201
+ ],
202
+ "template": "Support Ticket Analysis",
203
+ "storage": "s3://reports/support-analytics/"
232
204
  },
233
205
  };
234
206
  export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
@@ -236,7 +208,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
236
208
  version: '0.0.1',
237
209
  name: 'Audit Inventory Levels',
238
210
  description: `A multi-agent team that monitors inventory levels across warehouses, detects discrepancies between physical and system counts, forecasts demand by SKU, and generates automated reorder recommendations.`,
239
- tags: ['finance', 'automation', 'inventory', 'supply-chain'],
211
+ tags: ["finance", "automation", "inventory", "supply-chain"],
240
212
  enabled: true,
241
213
  icon: 'package',
242
214
  emoji: '📦',
@@ -255,7 +227,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
255
227
  goal: `Pull current inventory levels from all warehouse management systems`,
256
228
  model: 'openai-gpt-4-1',
257
229
  mcpServer: 'Warehouse MCP',
258
- tools: ['WMS Connector', 'Barcode Scanner API'],
230
+ tools: ["WMS Connector", "Barcode Scanner API"],
259
231
  trigger: 'Schedule: Every 6 hours',
260
232
  approval: 'auto',
261
233
  },
@@ -266,7 +238,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
266
238
  goal: `Compare system counts vs physical counts and flag discrepancies`,
267
239
  model: 'openai-gpt-4-1',
268
240
  mcpServer: 'Audit MCP',
269
- tools: ['Count Comparator', 'Discrepancy Logger', 'Shrinkage Calculator'],
241
+ tools: ["Count Comparator", "Discrepancy Logger", "Shrinkage Calculator"],
270
242
  trigger: 'On completion of Inventory Scanner',
271
243
  approval: 'auto',
272
244
  },
@@ -277,11 +249,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
277
249
  goal: `Forecast demand by SKU using historical sales and seasonal patterns`,
278
250
  model: 'anthropic-claude-sonnet-4',
279
251
  mcpServer: 'Analytics MCP',
280
- tools: [
281
- 'Time Series Model',
282
- 'Seasonal Analyzer',
283
- 'External Signals Fetcher',
284
- ],
252
+ tools: ["Time Series Model", "Seasonal Analyzer", "External Signals Fetcher"],
285
253
  trigger: 'On completion of Discrepancy Auditor',
286
254
  approval: 'auto',
287
255
  },
@@ -292,7 +260,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
292
260
  goal: `Calculate optimal reorder points and generate purchase order recommendations`,
293
261
  model: 'openai-gpt-4-1',
294
262
  mcpServer: 'Procurement MCP',
295
- tools: ['EOQ Calculator', 'Supplier Catalog', 'PO Generator'],
263
+ tools: ["EOQ Calculator", "Supplier Catalog", "PO Generator"],
296
264
  trigger: 'On completion of Demand Forecaster',
297
265
  approval: 'manual',
298
266
  },
@@ -303,48 +271,52 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
303
271
  goal: `Compile inventory audit report with discrepancies, forecasts, and reorder plan`,
304
272
  model: 'openai-gpt-4-1',
305
273
  mcpServer: 'Document Generation MCP',
306
- tools: ['PDF Generator', 'Chart Builder', 'Email Sender'],
274
+ tools: ["PDF Generator", "Chart Builder", "Email Sender"],
307
275
  trigger: 'On completion of Reorder Planner',
308
276
  approval: 'auto',
309
277
  },
310
278
  ],
311
279
  reactionRules: [
312
280
  {
313
- id: 'rr-inv-1',
314
- trigger: 'stockout_risk_detected',
315
- action: 'escalate_to_supervisor',
316
- auto: true,
317
- maxRetries: 1,
318
- escalateAfterRetries: 1,
319
- priority: 'high',
320
- },
321
- {
322
- id: 'rr-inv-2',
323
- trigger: 'discrepancy_threshold_exceeded',
324
- action: 'flag_for_manual_audit',
325
- auto: false,
326
- maxRetries: 2,
327
- escalateAfterRetries: 2,
328
- priority: 'high',
329
- },
281
+ "id": "rr-inv-1",
282
+ "trigger": "stockout_risk_detected",
283
+ "action": "escalate_to_supervisor",
284
+ "auto": true,
285
+ "maxRetries": 1,
286
+ "escalateAfterRetries": 1,
287
+ "priority": "high"
288
+ },
289
+ {
290
+ "id": "rr-inv-2",
291
+ "trigger": "discrepancy_threshold_exceeded",
292
+ "action": "flag_for_manual_audit",
293
+ "auto": false,
294
+ "maxRetries": 2,
295
+ "escalateAfterRetries": 2,
296
+ "priority": "high"
297
+ }
330
298
  ],
331
299
  healthMonitoring: {
332
- heartbeatInterval: '30s',
333
- staleThreshold: '120s',
334
- unresponsiveThreshold: '300s',
335
- stuckThreshold: '600s',
336
- maxRestartAttempts: 3,
300
+ "heartbeatInterval": "30s",
301
+ "staleThreshold": "120s",
302
+ "unresponsiveThreshold": "300s",
303
+ "stuckThreshold": "600s",
304
+ "maxRestartAttempts": 3
337
305
  },
338
306
  notifications: {
339
- on_start: true,
340
- on_completion: true,
341
- on_failure: true,
342
- on_escalation: true,
307
+ "on_start": true,
308
+ "on_completion": true,
309
+ "on_failure": true,
310
+ "on_escalation": true
343
311
  },
344
312
  output: {
345
- formats: ['pdf', 'xlsx', 'csv'],
346
- template: 'Inventory Audit Report',
347
- storage: 's3://reports/inventory-audits/',
313
+ "formats": [
314
+ "pdf",
315
+ "xlsx",
316
+ "csv"
317
+ ],
318
+ "template": "Inventory Audit Report",
319
+ "storage": "s3://reports/inventory-audits/"
348
320
  },
349
321
  };
350
322
  export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
@@ -352,7 +324,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
352
324
  version: '0.0.1',
353
325
  name: 'Automate Regulatory Reporting',
354
326
  description: `A multi-agent team that automates end-to-end regulatory reporting for financial institutions. Ingests data from trading systems, risk engines, and accounting platforms, reconciles positions, computes risk metrics, validates against regulatory rules (Basel III/IV, MiFID II, SOX), and generates submission-ready compliance reports with full audit trails.`,
355
- tags: ['finance', 'compliance', 'regulatory', 'risk', 'banking', 'audit'],
327
+ tags: ["finance", "compliance", "regulatory", "risk", "banking", "audit"],
356
328
  enabled: true,
357
329
  icon: 'shield-check',
358
330
  emoji: '🏦',
@@ -360,10 +332,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
360
332
  agentSpecId: 'automate-regulatory-reporting:0.0.1',
361
333
  orchestrationProtocol: 'datalayer',
362
334
  executionMode: 'sequential',
363
- supervisor: {
364
- name: 'Compliance Orchestrator Agent',
365
- model: 'openai-gpt-4-1',
366
- },
335
+ supervisor: { name: 'Compliance Orchestrator Agent', model: 'openai-gpt-4-1' },
367
336
  routingInstructions: `Start with Data Ingestion to pull positions and transactions, then Risk Calculator for metric computation, then Reconciliation Agent to cross-check figures, then Validation Agent for regulatory rule checks, then Report Generator for submission-ready output. Escalate any reconciliation breaks above $10K immediately to the compliance team.`,
368
337
  validation: { timeout: '900s', retryOnFailure: true, maxRetries: 2 },
369
338
  agents: [
@@ -374,7 +343,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
374
343
  goal: `Extract positions, transactions, and P&L from trading and accounting systems`,
375
344
  model: 'openai-gpt-4-1',
376
345
  mcpServer: 'Trading Systems MCP',
377
- tools: ['Position Reader', 'Transaction Fetcher', 'P&L Extractor'],
346
+ tools: ["Position Reader", "Transaction Fetcher", "P&L Extractor"],
378
347
  trigger: 'Schedule: Monthly on the 3rd business day',
379
348
  approval: 'auto',
380
349
  },
@@ -385,12 +354,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
385
354
  goal: `Compute Basel III/IV risk-weighted assets, capital ratios, and VaR metrics`,
386
355
  model: 'anthropic-claude-sonnet-4',
387
356
  mcpServer: 'Risk Engine MCP',
388
- tools: [
389
- 'RWA Calculator',
390
- 'VaR Engine',
391
- 'Capital Ratio Computer',
392
- 'Stress Test Runner',
393
- ],
357
+ tools: ["RWA Calculator", "VaR Engine", "Capital Ratio Computer", "Stress Test Runner"],
394
358
  trigger: 'On completion of Data Ingestion Agent',
395
359
  approval: 'auto',
396
360
  },
@@ -401,7 +365,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
401
365
  goal: `Cross-check computed figures against source systems and flag discrepancies`,
402
366
  model: 'openai-gpt-4-1',
403
367
  mcpServer: 'Reconciliation MCP',
404
- tools: ['Position Reconciler', 'Break Detector', 'Audit Logger'],
368
+ tools: ["Position Reconciler", "Break Detector", "Audit Logger"],
405
369
  trigger: 'On completion of Risk Calculator Agent',
406
370
  approval: 'auto',
407
371
  },
@@ -412,11 +376,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
412
376
  goal: `Validate all metrics against Basel III/IV, MiFID II, and SOX regulatory rules`,
413
377
  model: 'openai-gpt-4-1',
414
378
  mcpServer: 'Compliance Rules MCP',
415
- tools: [
416
- 'Basel Rule Validator',
417
- 'MiFID II Checker',
418
- 'SOX Control Verifier',
419
- ],
379
+ tools: ["Basel Rule Validator", "MiFID II Checker", "SOX Control Verifier"],
420
380
  trigger: 'On completion of Reconciliation Agent',
421
381
  approval: 'manual',
422
382
  },
@@ -427,48 +387,52 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
427
387
  goal: `Generate submission-ready regulatory reports with full data lineage and audit trail`,
428
388
  model: 'openai-gpt-4-1',
429
389
  mcpServer: 'Document Generation MCP',
430
- tools: ['PDF Generator', 'XBRL Formatter', 'Email Sender'],
390
+ tools: ["PDF Generator", "XBRL Formatter", "Email Sender"],
431
391
  trigger: 'On completion of Validation Agent',
432
392
  approval: 'auto',
433
393
  },
434
394
  ],
435
395
  reactionRules: [
436
396
  {
437
- id: 'rr-reg-1',
438
- trigger: 'compliance_violation_detected',
439
- action: 'halt_and_escalate',
440
- auto: true,
441
- maxRetries: 0,
442
- escalateAfterRetries: 0,
443
- priority: 'critical',
444
- },
445
- {
446
- id: 'rr-reg-2',
447
- trigger: 'data_validation_failure',
448
- action: 'retry_with_fallback',
449
- auto: true,
450
- maxRetries: 3,
451
- escalateAfterRetries: 3,
452
- priority: 'high',
453
- },
397
+ "id": "rr-reg-1",
398
+ "trigger": "compliance_violation_detected",
399
+ "action": "halt_and_escalate",
400
+ "auto": true,
401
+ "maxRetries": 0,
402
+ "escalateAfterRetries": 0,
403
+ "priority": "critical"
404
+ },
405
+ {
406
+ "id": "rr-reg-2",
407
+ "trigger": "data_validation_failure",
408
+ "action": "retry_with_fallback",
409
+ "auto": true,
410
+ "maxRetries": 3,
411
+ "escalateAfterRetries": 3,
412
+ "priority": "high"
413
+ }
454
414
  ],
455
415
  healthMonitoring: {
456
- heartbeatInterval: '15s',
457
- staleThreshold: '60s',
458
- unresponsiveThreshold: '120s',
459
- stuckThreshold: '300s',
460
- maxRestartAttempts: 2,
416
+ "heartbeatInterval": "15s",
417
+ "staleThreshold": "60s",
418
+ "unresponsiveThreshold": "120s",
419
+ "stuckThreshold": "300s",
420
+ "maxRestartAttempts": 2
461
421
  },
462
422
  notifications: {
463
- on_start: true,
464
- on_completion: true,
465
- on_failure: true,
466
- on_escalation: true,
423
+ "on_start": true,
424
+ "on_completion": true,
425
+ "on_failure": true,
426
+ "on_escalation": true
467
427
  },
468
428
  output: {
469
- formats: ['pdf', 'xbrl', 'json'],
470
- template: 'Regulatory Submission Report',
471
- storage: 's3://reports/regulatory-submissions/',
429
+ "formats": [
430
+ "pdf",
431
+ "xbrl",
432
+ "json"
433
+ ],
434
+ "template": "Regulatory Submission Report",
435
+ "storage": "s3://reports/regulatory-submissions/"
472
436
  },
473
437
  };
474
438
  export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
@@ -476,7 +440,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
476
440
  version: '0.0.1',
477
441
  name: 'Comprehensive Sales Analytics',
478
442
  description: `A multi-agent team that replaces a single KPI monitor with four specialized agents: a Data Collector that pulls real-time CRM metrics, an Anomaly Detector that flags statistical outliers, a Trend Analyzer that identifies patterns and forecasts, and a Report Generator that compiles executive dashboards and sends alerts. Together they deliver deeper insights, faster detection, and richer reporting than any single agent could.`,
479
- tags: ['sales', 'analytics', 'kpi', 'monitoring', 'horizontal'],
443
+ tags: ["sales", "analytics", "kpi", "monitoring", "horizontal"],
480
444
  enabled: true,
481
445
  icon: 'graph',
482
446
  emoji: '📈',
@@ -484,10 +448,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
484
448
  agentSpecId: 'comprehensive-sales-analytics:0.0.1',
485
449
  orchestrationProtocol: 'datalayer',
486
450
  executionMode: 'sequential',
487
- supervisor: {
488
- name: 'Sales Analytics Supervisor',
489
- model: 'anthropic-claude-opus-4',
490
- },
451
+ supervisor: { name: 'Sales Analytics Supervisor', model: 'anthropic-claude-opus-4' },
491
452
  routingInstructions: `Route data collection to KPI Collector first, then pass raw metrics to Anomaly Detector and Trend Analyzer in parallel, then aggregate all outputs into the Report Generator. Escalate if anomalies exceed the critical threshold (>25% deviation from target).`,
492
453
  validation: { timeout: '300s', retryOnFailure: true, maxRetries: 3 },
493
454
  agents: [
@@ -498,7 +459,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
498
459
  goal: `Pull real-time sales metrics from CRM, ERP, and marketing platforms. Normalize data into a unified schema with timestamps, dimensions (region, product line, rep), and measures (revenue, pipeline, conversion).`,
499
460
  model: 'openai-gpt-4-1',
500
461
  mcpServer: 'CRM Data Server',
501
- tools: ['get_sales_data', 'get_customer_list', 'API Connector'],
462
+ tools: ["get_sales_data", "get_customer_list", "API Connector"],
502
463
  trigger: 'Schedule: Daily at 7:30 AM',
503
464
  approval: 'auto',
504
465
  },
@@ -509,7 +470,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
509
470
  goal: `Apply statistical anomaly detection (Z-score, IQR, moving average) to the collected KPIs. Flag any metric deviating more than 10% from its rolling 30-day average. Classify anomalies as info, warning, or critical.`,
510
471
  model: 'anthropic-claude-sonnet-4',
511
472
  mcpServer: 'Analytics Server',
512
- tools: ['run_analysis', 'Statistical Analysis', 'ML Predictor'],
473
+ tools: ["run_analysis", "Statistical Analysis", "ML Predictor"],
513
474
  trigger: 'On completion of KPI Data Collector',
514
475
  approval: 'auto',
515
476
  },
@@ -520,7 +481,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
520
481
  goal: `Identify week-over-week, month-over-month, and quarter-over-quarter trends. Generate 30-day forecasts for each KPI using time-series models. Highlight the top 3 improving and top 3 declining metrics.`,
521
482
  model: 'anthropic-claude-sonnet-4',
522
483
  mcpServer: 'Analytics Server',
523
- tools: ['run_analysis', 'generate_charts', 'Forecaster'],
484
+ tools: ["run_analysis", "generate_charts", "Forecaster"],
524
485
  trigger: 'On completion of KPI Data Collector',
525
486
  approval: 'auto',
526
487
  },
@@ -531,53 +492,52 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
531
492
  goal: `Compile all insights — raw KPIs, anomalies, trends, and forecasts — into a polished executive dashboard with charts, tables, and narrative commentary. Send the report via Slack and email. Highlight critical anomalies with a red-flag summary at the top.`,
532
493
  model: 'openai-gpt-4-1',
533
494
  mcpServer: 'Document Generation MCP',
534
- tools: [
535
- 'PDF Generator',
536
- 'Chart Builder',
537
- 'Email Sender',
538
- 'Slack Notifier',
539
- ],
495
+ tools: ["PDF Generator", "Chart Builder", "Email Sender", "Slack Notifier"],
540
496
  trigger: 'On completion of Anomaly Detector & Trend Analyzer',
541
497
  approval: 'manual',
542
498
  },
543
499
  ],
544
500
  reactionRules: [
545
501
  {
546
- id: 'rr-sales-1',
547
- trigger: 'anomaly_critical',
548
- action: 'escalate_to_supervisor',
549
- auto: true,
550
- maxRetries: 2,
551
- escalateAfterRetries: 2,
552
- priority: 'high',
553
- },
554
- {
555
- id: 'rr-sales-2',
556
- trigger: 'data_stale',
557
- action: 'retry_collection',
558
- auto: true,
559
- maxRetries: 3,
560
- escalateAfterRetries: 3,
561
- priority: 'medium',
562
- },
502
+ "id": "rr-sales-1",
503
+ "trigger": "anomaly_critical",
504
+ "action": "escalate_to_supervisor",
505
+ "auto": true,
506
+ "maxRetries": 2,
507
+ "escalateAfterRetries": 2,
508
+ "priority": "high"
509
+ },
510
+ {
511
+ "id": "rr-sales-2",
512
+ "trigger": "data_stale",
513
+ "action": "retry_collection",
514
+ "auto": true,
515
+ "maxRetries": 3,
516
+ "escalateAfterRetries": 3,
517
+ "priority": "medium"
518
+ }
563
519
  ],
564
520
  healthMonitoring: {
565
- heartbeatInterval: '30s',
566
- staleThreshold: '120s',
567
- unresponsiveThreshold: '300s',
568
- stuckThreshold: '600s',
569
- maxRestartAttempts: 3,
521
+ "heartbeatInterval": "30s",
522
+ "staleThreshold": "120s",
523
+ "unresponsiveThreshold": "300s",
524
+ "stuckThreshold": "600s",
525
+ "maxRestartAttempts": 3
570
526
  },
571
527
  notifications: {
572
- on_start: true,
573
- on_completion: true,
574
- on_failure: true,
575
- on_escalation: true,
528
+ "on_start": true,
529
+ "on_completion": true,
530
+ "on_failure": true,
531
+ "on_escalation": true
576
532
  },
577
533
  output: {
578
- formats: ['pdf', 'xlsx', 'json'],
579
- template: 'Executive Sales Dashboard',
580
- storage: 's3://reports/sales-analytics/',
534
+ "formats": [
535
+ "pdf",
536
+ "xlsx",
537
+ "json"
538
+ ],
539
+ "template": "Executive Sales Dashboard",
540
+ "storage": "s3://reports/sales-analytics/"
581
541
  },
582
542
  };
583
543
  export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
@@ -585,14 +545,7 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
585
545
  version: '0.0.1',
586
546
  name: 'Optimize Grid Operations',
587
547
  description: `A multi-agent team that processes millions of IoT sensor data points from smart meters, substations, and renewable generation assets. Predicts equipment failures 2–4 weeks in advance, optimises load balancing across the grid, and reduces unplanned downtime by 50%.`,
588
- tags: [
589
- 'energy',
590
- 'utilities',
591
- 'smart-grid',
592
- 'iot',
593
- 'predictive-maintenance',
594
- 'sustainability',
595
- ],
548
+ tags: ["energy", "utilities", "smart-grid", "iot", "predictive-maintenance", "sustainability"],
596
549
  enabled: true,
597
550
  icon: 'zap',
598
551
  emoji: '⚡',
@@ -600,10 +553,7 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
600
553
  agentSpecId: 'optimize-grid-operations:0.0.1',
601
554
  orchestrationProtocol: 'datalayer',
602
555
  executionMode: 'sequential',
603
- supervisor: {
604
- name: 'Grid Operations Orchestrator Agent',
605
- model: 'openai-gpt-4-1',
606
- },
556
+ supervisor: { name: 'Grid Operations Orchestrator Agent', model: 'openai-gpt-4-1' },
607
557
  routingInstructions: `Start with Sensor Ingestion to process real-time telemetry, then Anomaly Detector for pattern identification, then Failure Predictor for maintenance forecasting, then Grid Balancer for load optimisation. Escalate critical failure predictions (< 48h) immediately to operations dispatch.`,
608
558
  validation: { timeout: '600s', retryOnFailure: true, maxRetries: 3 },
609
559
  agents: [
@@ -614,12 +564,7 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
614
564
  goal: `Ingest and process real-time telemetry from SCADA, smart meters, and IoT gateways`,
615
565
  model: 'openai-gpt-4-1',
616
566
  mcpServer: 'SCADA MCP',
617
- tools: [
618
- 'SCADA Connector',
619
- 'Smart Meter Reader',
620
- 'IoT Gateway Adapter',
621
- 'Time Series Processor',
622
- ],
567
+ tools: ["SCADA Connector", "Smart Meter Reader", "IoT Gateway Adapter", "Time Series Processor"],
623
568
  trigger: 'Schedule: Every 5 minutes',
624
569
  approval: 'auto',
625
570
  },
@@ -630,12 +575,7 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
630
575
  goal: `Detect vibration, temperature, and voltage anomalies across all grid assets`,
631
576
  model: 'openai-gpt-4-1',
632
577
  mcpServer: 'Monitoring MCP',
633
- tools: [
634
- 'Vibration Analyzer',
635
- 'Temperature Anomaly Detector',
636
- 'Voltage Pattern Scanner',
637
- 'Historical Comparator',
638
- ],
578
+ tools: ["Vibration Analyzer", "Temperature Anomaly Detector", "Voltage Pattern Scanner", "Historical Comparator"],
639
579
  trigger: 'On completion of Sensor Ingestion Agent',
640
580
  approval: 'auto',
641
581
  },
@@ -646,12 +586,7 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
646
586
  goal: `Predict equipment failures 2–4 weeks in advance using anomaly patterns and failure history`,
647
587
  model: 'anthropic-claude-sonnet-4',
648
588
  mcpServer: 'Predictive Analytics MCP',
649
- tools: [
650
- 'Failure Correlation Engine',
651
- 'Risk Scorer',
652
- 'Maintenance Scheduler',
653
- 'Work Order Generator',
654
- ],
589
+ tools: ["Failure Correlation Engine", "Risk Scorer", "Maintenance Scheduler", "Work Order Generator"],
655
590
  trigger: 'On completion of Anomaly Detector Agent',
656
591
  approval: 'manual',
657
592
  },
@@ -662,53 +597,52 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
662
597
  goal: `Optimise real-time load balancing across renewable and conventional generation sources`,
663
598
  model: 'openai-gpt-4-1',
664
599
  mcpServer: 'Grid Control MCP',
665
- tools: [
666
- 'Load Forecaster',
667
- 'Renewable Integration Model',
668
- 'Dispatch Optimiser',
669
- 'Grid Stability Checker',
670
- ],
600
+ tools: ["Load Forecaster", "Renewable Integration Model", "Dispatch Optimiser", "Grid Stability Checker"],
671
601
  trigger: 'On completion of Failure Predictor Agent',
672
602
  approval: 'auto',
673
603
  },
674
604
  ],
675
605
  reactionRules: [
676
606
  {
677
- id: 'rr-grid-1',
678
- trigger: 'grid_instability_detected',
679
- action: 'emergency_rebalance',
680
- auto: true,
681
- maxRetries: 1,
682
- escalateAfterRetries: 1,
683
- priority: 'critical',
684
- },
685
- {
686
- id: 'rr-grid-2',
687
- trigger: 'forecast_deviation_high',
688
- action: 'recalibrate_model',
689
- auto: true,
690
- maxRetries: 2,
691
- escalateAfterRetries: 2,
692
- priority: 'medium',
693
- },
607
+ "id": "rr-grid-1",
608
+ "trigger": "grid_instability_detected",
609
+ "action": "emergency_rebalance",
610
+ "auto": true,
611
+ "maxRetries": 1,
612
+ "escalateAfterRetries": 1,
613
+ "priority": "critical"
614
+ },
615
+ {
616
+ "id": "rr-grid-2",
617
+ "trigger": "forecast_deviation_high",
618
+ "action": "recalibrate_model",
619
+ "auto": true,
620
+ "maxRetries": 2,
621
+ "escalateAfterRetries": 2,
622
+ "priority": "medium"
623
+ }
694
624
  ],
695
625
  healthMonitoring: {
696
- heartbeatInterval: '10s',
697
- staleThreshold: '30s',
698
- unresponsiveThreshold: '60s',
699
- stuckThreshold: '120s',
700
- maxRestartAttempts: 5,
626
+ "heartbeatInterval": "10s",
627
+ "staleThreshold": "30s",
628
+ "unresponsiveThreshold": "60s",
629
+ "stuckThreshold": "120s",
630
+ "maxRestartAttempts": 5
701
631
  },
702
632
  notifications: {
703
- on_start: true,
704
- on_completion: true,
705
- on_failure: true,
706
- on_escalation: true,
633
+ "on_start": true,
634
+ "on_completion": true,
635
+ "on_failure": true,
636
+ "on_escalation": true
707
637
  },
708
638
  output: {
709
- formats: ['json', 'csv', 'pdf'],
710
- template: 'Grid Operations Dashboard',
711
- storage: 's3://reports/grid-operations/',
639
+ "formats": [
640
+ "json",
641
+ "csv",
642
+ "pdf"
643
+ ],
644
+ "template": "Grid Operations Dashboard",
645
+ "storage": "s3://reports/grid-operations/"
712
646
  },
713
647
  };
714
648
  export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
@@ -716,14 +650,7 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
716
650
  version: '0.0.1',
717
651
  name: 'Process Citizen Requests',
718
652
  description: `A multi-agent team that automates citizen request processing for government agencies. Classifies and triages permits, FOIA requests, and benefit claims from multiple channels. Models policy impacts across population datasets and ensures every automated decision is explainable, auditable, and compliant with transparency mandates.`,
719
- tags: [
720
- 'government',
721
- 'public-sector',
722
- 'civic',
723
- 'policy',
724
- 'compliance',
725
- 'transparency',
726
- ],
653
+ tags: ["government", "public-sector", "civic", "policy", "compliance", "transparency"],
727
654
  enabled: true,
728
655
  icon: 'organization',
729
656
  emoji: '🏛️',
@@ -731,10 +658,7 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
731
658
  agentSpecId: 'process-citizen-requests:0.0.1',
732
659
  orchestrationProtocol: 'datalayer',
733
660
  executionMode: 'sequential',
734
- supervisor: {
735
- name: 'Citizen Services Orchestrator Agent',
736
- model: 'openai-gpt-4-1',
737
- },
661
+ supervisor: { name: 'Citizen Services Orchestrator Agent', model: 'openai-gpt-4-1' },
738
662
  routingInstructions: `Route incoming citizen requests to the Intake Agent for classification and triage, then to the Case Processor for handling and routing, then to the Policy Analyst for impact assessment on relevant items, then to the Transparency Agent for audit trail and public documentation. Escalate urgent citizen safety issues immediately to supervisors.`,
739
663
  validation: { timeout: '300s', retryOnFailure: true, maxRetries: 2 },
740
664
  agents: [
@@ -745,12 +669,7 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
745
669
  goal: `Classify, triage, and route citizen submissions from web portals, email, and documents`,
746
670
  model: 'openai-gpt-4-1',
747
671
  mcpServer: 'Citizen Portal MCP',
748
- tools: [
749
- 'Request Classifier',
750
- 'Urgency Assessor',
751
- 'Jurisdiction Router',
752
- 'OCR Scanner',
753
- ],
672
+ tools: ["Request Classifier", "Urgency Assessor", "Jurisdiction Router", "OCR Scanner"],
754
673
  trigger: 'Event: new citizen request received',
755
674
  approval: 'auto',
756
675
  },
@@ -761,12 +680,7 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
761
680
  goal: `Process and route requests to appropriate departments with required documentation`,
762
681
  model: 'openai-gpt-4-1',
763
682
  mcpServer: 'Case Management MCP',
764
- tools: [
765
- 'Case Creator',
766
- 'Document Assembler',
767
- 'Department Router',
768
- 'Status Tracker',
769
- ],
683
+ tools: ["Case Creator", "Document Assembler", "Department Router", "Status Tracker"],
770
684
  trigger: 'On completion of Intake Agent',
771
685
  approval: 'auto',
772
686
  },
@@ -777,12 +691,7 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
777
691
  goal: `Model policy outcomes across population datasets with scenario simulation`,
778
692
  model: 'anthropic-claude-sonnet-4',
779
693
  mcpServer: 'Policy Analytics MCP',
780
- tools: [
781
- 'Monte Carlo Simulator',
782
- 'Demographic Analyzer',
783
- 'Budget Impact Model',
784
- 'Scenario Comparator',
785
- ],
694
+ tools: ["Monte Carlo Simulator", "Demographic Analyzer", "Budget Impact Model", "Scenario Comparator"],
786
695
  trigger: 'On completion of Case Processor Agent',
787
696
  approval: 'manual',
788
697
  },
@@ -793,53 +702,51 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
793
702
  goal: `Generate explainable decision documentation with full audit trail for public record`,
794
703
  model: 'openai-gpt-4-1',
795
704
  mcpServer: 'Compliance MCP',
796
- tools: [
797
- 'Decision Explainer',
798
- 'Audit Trail Builder',
799
- 'FOIA Compliance Checker',
800
- 'Public Record Generator',
801
- ],
705
+ tools: ["Decision Explainer", "Audit Trail Builder", "FOIA Compliance Checker", "Public Record Generator"],
802
706
  trigger: 'On completion of Policy Impact Analyst Agent',
803
707
  approval: 'auto',
804
708
  },
805
709
  ],
806
710
  reactionRules: [
807
711
  {
808
- id: 'rr-cit-1',
809
- trigger: 'priority_request_detected',
810
- action: 'fast_track_processing',
811
- auto: true,
812
- maxRetries: 2,
813
- escalateAfterRetries: 2,
814
- priority: 'high',
815
- },
816
- {
817
- id: 'rr-cit-2',
818
- trigger: 'policy_ambiguity_detected',
819
- action: 'request_human_review',
820
- auto: false,
821
- maxRetries: 1,
822
- escalateAfterRetries: 1,
823
- priority: 'medium',
824
- },
712
+ "id": "rr-cit-1",
713
+ "trigger": "priority_request_detected",
714
+ "action": "fast_track_processing",
715
+ "auto": true,
716
+ "maxRetries": 2,
717
+ "escalateAfterRetries": 2,
718
+ "priority": "high"
719
+ },
720
+ {
721
+ "id": "rr-cit-2",
722
+ "trigger": "policy_ambiguity_detected",
723
+ "action": "request_human_review",
724
+ "auto": false,
725
+ "maxRetries": 1,
726
+ "escalateAfterRetries": 1,
727
+ "priority": "medium"
728
+ }
825
729
  ],
826
730
  healthMonitoring: {
827
- heartbeatInterval: '30s',
828
- staleThreshold: '120s',
829
- unresponsiveThreshold: '300s',
830
- stuckThreshold: '600s',
831
- maxRestartAttempts: 3,
731
+ "heartbeatInterval": "30s",
732
+ "staleThreshold": "120s",
733
+ "unresponsiveThreshold": "300s",
734
+ "stuckThreshold": "600s",
735
+ "maxRestartAttempts": 3
832
736
  },
833
737
  notifications: {
834
- on_start: false,
835
- on_completion: true,
836
- on_failure: true,
837
- on_escalation: true,
738
+ "on_start": false,
739
+ "on_completion": true,
740
+ "on_failure": true,
741
+ "on_escalation": true
838
742
  },
839
743
  output: {
840
- formats: ['pdf', 'json'],
841
- template: 'Citizen Request Processing Report',
842
- storage: 's3://reports/citizen-requests/',
744
+ "formats": [
745
+ "pdf",
746
+ "json"
747
+ ],
748
+ "template": "Citizen Request Processing Report",
749
+ "storage": "s3://reports/citizen-requests/"
843
750
  },
844
751
  };
845
752
  export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
@@ -847,13 +754,7 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
847
754
  version: '0.0.1',
848
755
  name: 'Process Clinical Trial Data',
849
756
  description: `A multi-agent team that automates clinical trial data processing across dozens of trial sites. Harmonises patient records and lab results to CDISC SDTM format, detects safety signals and adverse events in real time, and prepares submission-ready datasets — all with strict HIPAA and GxP compliance guardrails.`,
850
- tags: [
851
- 'healthcare',
852
- 'pharma',
853
- 'clinical-trials',
854
- 'patient-data',
855
- 'compliance',
856
- ],
757
+ tags: ["healthcare", "pharma", "clinical-trials", "patient-data", "compliance"],
857
758
  enabled: true,
858
759
  icon: 'heart',
859
760
  emoji: '🏥',
@@ -861,10 +762,7 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
861
762
  agentSpecId: 'process-clinical-trial-data:0.0.1',
862
763
  orchestrationProtocol: 'datalayer',
863
764
  executionMode: 'sequential',
864
- supervisor: {
865
- name: 'Clinical Data Orchestrator Agent',
866
- model: 'anthropic-claude-sonnet-4',
867
- },
765
+ supervisor: { name: 'Clinical Data Orchestrator Agent', model: 'anthropic-claude-sonnet-4' },
868
766
  routingInstructions: `Route incoming data through the Ingestion Agent first for format detection and parsing, then to Harmonisation Agent for CDISC SDTM standardisation, then Safety Monitor for adverse event screening, then Submission Preparer for final dataset assembly. Escalate serious adverse events (SAEs) immediately to the medical officer.`,
869
767
  validation: { timeout: '600s', retryOnFailure: true, maxRetries: 2 },
870
768
  agents: [
@@ -875,12 +773,7 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
875
773
  goal: `Ingest patient records, lab results, and CRFs from clinical sites`,
876
774
  model: 'openai-gpt-4-1',
877
775
  mcpServer: 'Clinical EDC MCP',
878
- tools: [
879
- 'Medidata Connector',
880
- 'Veeva Vault Reader',
881
- 'Oracle Clinical Adapter',
882
- 'Format Detector',
883
- ],
776
+ tools: ["Medidata Connector", "Veeva Vault Reader", "Oracle Clinical Adapter", "Format Detector"],
884
777
  trigger: 'Event: new data batch received from site',
885
778
  approval: 'auto',
886
779
  },
@@ -891,12 +784,7 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
891
784
  goal: `Standardise all data to CDISC SDTM format with MedDRA coding`,
892
785
  model: 'openai-gpt-4-1',
893
786
  mcpServer: 'Data Standards MCP',
894
- tools: [
895
- 'SDTM Mapper',
896
- 'MedDRA Coder',
897
- 'Unit Converter',
898
- 'Site Normaliser',
899
- ],
787
+ tools: ["SDTM Mapper", "MedDRA Coder", "Unit Converter", "Site Normaliser"],
900
788
  trigger: 'On completion of Data Ingestion Agent',
901
789
  approval: 'auto',
902
790
  },
@@ -907,12 +795,7 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
907
795
  goal: `Screen every data point for adverse events and safety signals`,
908
796
  model: 'anthropic-claude-sonnet-4',
909
797
  mcpServer: 'Safety Database MCP',
910
- tools: [
911
- 'AE Classifier',
912
- 'Signal Detector',
913
- 'SAE Escalator',
914
- 'Evidence Trail Builder',
915
- ],
798
+ tools: ["AE Classifier", "Signal Detector", "SAE Escalator", "Evidence Trail Builder"],
916
799
  trigger: 'On completion of Harmonisation Agent',
917
800
  approval: 'manual',
918
801
  },
@@ -923,53 +806,52 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
923
806
  goal: `Assemble submission-ready SDTM datasets with validation and define.xml`,
924
807
  model: 'openai-gpt-4-1',
925
808
  mcpServer: 'Submission MCP',
926
- tools: [
927
- 'Dataset Validator',
928
- 'Define.xml Generator',
929
- 'PDF Report Builder',
930
- 'Compliance Checker',
931
- ],
809
+ tools: ["Dataset Validator", "Define.xml Generator", "PDF Report Builder", "Compliance Checker"],
932
810
  trigger: 'On completion of Safety Monitor Agent',
933
811
  approval: 'auto',
934
812
  },
935
813
  ],
936
814
  reactionRules: [
937
815
  {
938
- id: 'rr-clin-1',
939
- trigger: 'safety_signal_detected',
940
- action: 'halt_and_escalate',
941
- auto: true,
942
- maxRetries: 0,
943
- escalateAfterRetries: 0,
944
- priority: 'critical',
945
- },
946
- {
947
- id: 'rr-clin-2',
948
- trigger: 'data_integrity_violation',
949
- action: 'quarantine_and_notify',
950
- auto: true,
951
- maxRetries: 1,
952
- escalateAfterRetries: 1,
953
- priority: 'critical',
954
- },
816
+ "id": "rr-clin-1",
817
+ "trigger": "safety_signal_detected",
818
+ "action": "halt_and_escalate",
819
+ "auto": true,
820
+ "maxRetries": 0,
821
+ "escalateAfterRetries": 0,
822
+ "priority": "critical"
823
+ },
824
+ {
825
+ "id": "rr-clin-2",
826
+ "trigger": "data_integrity_violation",
827
+ "action": "quarantine_and_notify",
828
+ "auto": true,
829
+ "maxRetries": 1,
830
+ "escalateAfterRetries": 1,
831
+ "priority": "critical"
832
+ }
955
833
  ],
956
834
  healthMonitoring: {
957
- heartbeatInterval: '10s',
958
- staleThreshold: '45s',
959
- unresponsiveThreshold: '90s',
960
- stuckThreshold: '180s',
961
- maxRestartAttempts: 2,
835
+ "heartbeatInterval": "10s",
836
+ "staleThreshold": "45s",
837
+ "unresponsiveThreshold": "90s",
838
+ "stuckThreshold": "180s",
839
+ "maxRestartAttempts": 2
962
840
  },
963
841
  notifications: {
964
- on_start: true,
965
- on_completion: true,
966
- on_failure: true,
967
- on_escalation: true,
842
+ "on_start": true,
843
+ "on_completion": true,
844
+ "on_failure": true,
845
+ "on_escalation": true
968
846
  },
969
847
  output: {
970
- formats: ['pdf', 'json', 'xml'],
971
- template: 'Clinical Trial Data Report',
972
- storage: 's3://reports/clinical-trials/',
848
+ "formats": [
849
+ "pdf",
850
+ "json",
851
+ "xml"
852
+ ],
853
+ "template": "Clinical Trial Data Report",
854
+ "storage": "s3://reports/clinical-trials/"
973
855
  },
974
856
  };
975
857
  export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
@@ -977,7 +859,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
977
859
  version: '0.0.1',
978
860
  name: 'Sync CRM Contacts',
979
861
  description: `A multi-agent team that collects and aggregates contact data from multiple CRM sources, analyzes and deduplicates records, writes cleaned data back, and generates sync summary reports.`,
980
- tags: ['sales', 'crm', 'data-sync', 'deduplication'],
862
+ tags: ["sales", "crm", "data-sync", "deduplication"],
981
863
  enabled: true,
982
864
  icon: 'people',
983
865
  emoji: '🔄',
@@ -985,10 +867,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
985
867
  agentSpecId: 'sync-crm-contacts:0.0.1',
986
868
  orchestrationProtocol: 'datalayer',
987
869
  executionMode: 'sequential',
988
- supervisor: {
989
- name: 'CRM Orchestrator Agent',
990
- model: 'anthropic-claude-opus-4',
991
- },
870
+ supervisor: { name: 'CRM Orchestrator Agent', model: 'anthropic-claude-opus-4' },
992
871
  routingInstructions: `Route data collection tasks to the Data Collector first, then analysis, then sync, then reporting. Escalate to human if sync fails 3 times.`,
993
872
  validation: { timeout: '300s', retryOnFailure: true, maxRetries: 3 },
994
873
  agents: [
@@ -999,7 +878,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
999
878
  goal: `Collect and aggregate contact data from multiple CRM sources`,
1000
879
  model: 'openai-gpt-4-1',
1001
880
  mcpServer: 'Data Processing MCP',
1002
- tools: ['API Connector', 'Data Parser'],
881
+ tools: ["API Connector", "Data Parser"],
1003
882
  trigger: 'Schedule: Daily at 2:00 AM',
1004
883
  approval: 'auto',
1005
884
  },
@@ -1010,7 +889,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
1010
889
  goal: `Analyze collected data and identify patterns and duplicates`,
1011
890
  model: 'anthropic-claude-opus-4',
1012
891
  mcpServer: 'Analytics MCP',
1013
- tools: ['Statistical Analysis', 'ML Predictor', 'Deduplicator'],
892
+ tools: ["Statistical Analysis", "ML Predictor", "Deduplicator"],
1014
893
  trigger: 'On completion of Data Collector',
1015
894
  approval: 'manual',
1016
895
  },
@@ -1021,7 +900,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
1021
900
  goal: `Write cleaned and merged contacts back to the CRM systems`,
1022
901
  model: 'openai-gpt-4-1',
1023
902
  mcpServer: 'CRM Write MCP',
1024
- tools: ['Salesforce Connector', 'HubSpot Connector'],
903
+ tools: ["Salesforce Connector", "HubSpot Connector"],
1025
904
  trigger: 'On completion of Analyzer',
1026
905
  approval: 'manual',
1027
906
  },
@@ -1032,48 +911,51 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
1032
911
  goal: `Generate sync summary reports and send notifications`,
1033
912
  model: 'openai-gpt-4-1',
1034
913
  mcpServer: 'Document Generation MCP',
1035
- tools: ['PDF Generator', 'Chart Builder', 'Email Sender'],
914
+ tools: ["PDF Generator", "Chart Builder", "Email Sender"],
1036
915
  trigger: 'On completion of Sync Writer',
1037
916
  approval: 'auto',
1038
917
  },
1039
918
  ],
1040
919
  reactionRules: [
1041
920
  {
1042
- id: 'rr-crm-1',
1043
- trigger: 'sync_conflict_detected',
1044
- action: 'log_and_skip',
1045
- auto: true,
1046
- maxRetries: 3,
1047
- escalateAfterRetries: 3,
1048
- priority: 'medium',
1049
- },
1050
- {
1051
- id: 'rr-crm-2',
1052
- trigger: 'api_rate_limit_hit',
1053
- action: 'backoff_and_retry',
1054
- auto: true,
1055
- maxRetries: 5,
1056
- escalateAfterRetries: 5,
1057
- priority: 'low',
1058
- },
921
+ "id": "rr-crm-1",
922
+ "trigger": "sync_conflict_detected",
923
+ "action": "log_and_skip",
924
+ "auto": true,
925
+ "maxRetries": 3,
926
+ "escalateAfterRetries": 3,
927
+ "priority": "medium"
928
+ },
929
+ {
930
+ "id": "rr-crm-2",
931
+ "trigger": "api_rate_limit_hit",
932
+ "action": "backoff_and_retry",
933
+ "auto": true,
934
+ "maxRetries": 5,
935
+ "escalateAfterRetries": 5,
936
+ "priority": "low"
937
+ }
1059
938
  ],
1060
939
  healthMonitoring: {
1061
- heartbeatInterval: '30s',
1062
- staleThreshold: '120s',
1063
- unresponsiveThreshold: '300s',
1064
- stuckThreshold: '600s',
1065
- maxRestartAttempts: 3,
940
+ "heartbeatInterval": "30s",
941
+ "staleThreshold": "120s",
942
+ "unresponsiveThreshold": "300s",
943
+ "stuckThreshold": "600s",
944
+ "maxRestartAttempts": 3
1066
945
  },
1067
946
  notifications: {
1068
- on_start: false,
1069
- on_completion: true,
1070
- on_failure: true,
1071
- on_escalation: false,
947
+ "on_start": false,
948
+ "on_completion": true,
949
+ "on_failure": true,
950
+ "on_escalation": false
1072
951
  },
1073
952
  output: {
1074
- formats: ['json', 'csv'],
1075
- template: 'CRM Sync Summary',
1076
- storage: 's3://reports/crm-sync/',
953
+ "formats": [
954
+ "json",
955
+ "csv"
956
+ ],
957
+ "template": "CRM Sync Summary",
958
+ "storage": "s3://reports/crm-sync/"
1077
959
  },
1078
960
  };
1079
961
  // ============================================================================
@@ -1114,7 +996,5 @@ export function getTeamSpec(teamId) {
1114
996
  */
1115
997
  export function listTeamSpecs(prefix) {
1116
998
  const specs = Object.values(TEAM_SPECS);
1117
- return prefix !== undefined
1118
- ? specs.filter(s => s.id.startsWith(prefix))
1119
- : specs;
999
+ return prefix !== undefined ? specs.filter(s => s.id.startsWith(prefix)) : specs;
1120
1000
  }