@datalayer/agent-runtimes 1.0.4 → 1.0.6

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 (299) hide show
  1. package/README.md +182 -1
  2. package/lib/AgentNode.d.ts +3 -0
  3. package/lib/AgentNode.js +676 -0
  4. package/lib/App.js +1 -1
  5. package/lib/agent-node/themeStore.d.ts +3 -0
  6. package/lib/agent-node/themeStore.js +156 -0
  7. package/lib/agent-node-main.d.ts +1 -0
  8. package/lib/agent-node-main.js +14 -0
  9. package/lib/agents/AgentDetails.d.ts +22 -1
  10. package/lib/agents/AgentDetails.js +34 -47
  11. package/lib/api/index.d.ts +0 -1
  12. package/lib/api/index.js +4 -2
  13. package/lib/chat/Chat.d.ts +5 -106
  14. package/lib/chat/Chat.js +20 -14
  15. package/lib/chat/ChatFloating.d.ts +7 -140
  16. package/lib/chat/ChatFloating.js +3 -3
  17. package/lib/chat/ChatPopupStandalone.d.ts +8 -47
  18. package/lib/chat/ChatPopupStandalone.js +3 -3
  19. package/lib/chat/ChatSidebar.d.ts +4 -69
  20. package/lib/chat/ChatSidebar.js +83 -51
  21. package/lib/chat/ChatStandalone.d.ts +4 -54
  22. package/lib/chat/ChatStandalone.js +3 -3
  23. package/lib/chat/base/ChatBase.js +1414 -174
  24. package/lib/chat/display/FloatingBrandButton.js +8 -1
  25. package/lib/chat/header/ChatHeader.d.ts +3 -1
  26. package/lib/chat/header/ChatHeader.js +15 -12
  27. package/lib/chat/header/ChatHeaderBase.d.ts +30 -5
  28. package/lib/chat/header/ChatHeaderBase.js +41 -16
  29. package/lib/chat/indicators/McpStatusIndicator.d.ts +7 -4
  30. package/lib/chat/indicators/McpStatusIndicator.js +7 -32
  31. package/lib/chat/indicators/SandboxStatusIndicator.d.ts +4 -1
  32. package/lib/chat/indicators/SandboxStatusIndicator.js +91 -56
  33. package/lib/chat/indicators/SkillsStatusIndicator.d.ts +7 -0
  34. package/lib/chat/indicators/SkillsStatusIndicator.js +88 -0
  35. package/lib/chat/indicators/index.d.ts +1 -0
  36. package/lib/chat/indicators/index.js +1 -0
  37. package/lib/chat/messages/ChatMessageList.d.ts +1 -1
  38. package/lib/chat/messages/ChatMessageList.js +154 -114
  39. package/lib/chat/messages/ChatMessages.js +6 -2
  40. package/lib/chat/prompt/InputFooter.d.ts +21 -6
  41. package/lib/chat/prompt/InputFooter.js +76 -20
  42. package/lib/chat/prompt/InputPrompt.d.ts +5 -1
  43. package/lib/chat/prompt/InputPrompt.js +4 -4
  44. package/lib/chat/prompt/InputPromptFooter.d.ts +3 -1
  45. package/lib/chat/prompt/InputPromptFooter.js +3 -3
  46. package/lib/chat/prompt/InputPromptLexical.d.ts +3 -1
  47. package/lib/chat/prompt/InputPromptLexical.js +12 -5
  48. package/lib/chat/prompt/InputPromptText.d.ts +3 -1
  49. package/lib/chat/prompt/InputPromptText.js +2 -2
  50. package/lib/chat/tools/ToolApprovalBanner.js +1 -1
  51. package/lib/chat/tools/ToolCallDisplay.d.ts +3 -1
  52. package/lib/chat/tools/ToolCallDisplay.js +2 -2
  53. package/lib/chat/usage/TokenUsageBar.js +20 -2
  54. package/lib/client/AgentRuntimesClientContext.d.ts +53 -0
  55. package/lib/client/AgentRuntimesClientContext.js +55 -0
  56. package/lib/client/AgentsMixin.d.ts +0 -18
  57. package/lib/client/AgentsMixin.js +20 -30
  58. package/lib/client/IAgentRuntimesClient.d.ts +215 -0
  59. package/lib/client/IAgentRuntimesClient.js +5 -0
  60. package/lib/client/SdkAgentRuntimesClient.d.ts +151 -0
  61. package/lib/client/SdkAgentRuntimesClient.js +134 -0
  62. package/lib/client/index.d.ts +4 -1
  63. package/lib/client/index.js +3 -1
  64. package/lib/components/NotificationEventCard.js +5 -1
  65. package/lib/config/AgentConfiguration.d.ts +22 -0
  66. package/lib/config/AgentConfiguration.js +319 -64
  67. package/lib/context/ContextDistribution.d.ts +3 -1
  68. package/lib/context/ContextDistribution.js +8 -27
  69. package/lib/context/ContextInspector.d.ts +3 -1
  70. package/lib/context/ContextInspector.js +19 -67
  71. package/lib/context/ContextPanel.d.ts +3 -1
  72. package/lib/context/ContextPanel.js +104 -64
  73. package/lib/context/ContextUsage.d.ts +3 -1
  74. package/lib/context/ContextUsage.js +3 -3
  75. package/lib/context/CostTracker.d.ts +9 -3
  76. package/lib/context/CostTracker.js +26 -47
  77. package/lib/context/CostUsageChart.d.ts +12 -0
  78. package/lib/context/CostUsageChart.js +378 -0
  79. package/lib/context/GraphFlowChart.d.ts +16 -0
  80. package/lib/context/GraphFlowChart.js +182 -0
  81. package/lib/context/TokenUsageChart.d.ts +8 -1
  82. package/lib/context/TokenUsageChart.js +349 -211
  83. package/lib/context/TurnGraphChart.d.ts +39 -0
  84. package/lib/context/TurnGraphChart.js +538 -0
  85. package/lib/context/otelWsPool.d.ts +20 -0
  86. package/lib/context/otelWsPool.js +69 -0
  87. package/lib/examples/A2UiComponentGalleryExample.d.ts +0 -17
  88. package/lib/examples/A2UiComponentGalleryExample.js +315 -522
  89. package/lib/examples/A2UiContactCardExample.d.ts +0 -18
  90. package/lib/examples/A2UiContactCardExample.js +154 -411
  91. package/lib/examples/A2UiRestaurantExample.d.ts +0 -30
  92. package/lib/examples/A2UiRestaurantExample.js +114 -212
  93. package/lib/examples/A2UiViewerExample.d.ts +0 -18
  94. package/lib/examples/A2UiViewerExample.js +283 -532
  95. package/lib/examples/AgUiBackendToolRenderingExample.js +1 -1
  96. package/lib/examples/AgUiHaikuGenUiExample.d.ts +1 -1
  97. package/lib/examples/AgUiHaikuGenUiExample.js +1 -1
  98. package/lib/examples/AgUiSharedStateExample.js +2 -1
  99. package/lib/examples/AgentCheckpointsExample.js +14 -28
  100. package/lib/examples/AgentCodemodeExample.d.ts +4 -6
  101. package/lib/examples/AgentCodemodeExample.js +603 -169
  102. package/lib/examples/AgentEvalsExample.js +339 -53
  103. package/lib/examples/AgentGuardrailsExample.js +383 -66
  104. package/lib/examples/AgentHooksExample.d.ts +3 -0
  105. package/lib/examples/AgentHooksExample.js +122 -0
  106. package/lib/examples/AgentInferenceProviderExample.d.ts +3 -0
  107. package/lib/examples/AgentInferenceProviderExample.js +329 -0
  108. package/lib/examples/AgentMCPExample.d.ts +3 -0
  109. package/lib/examples/AgentMCPExample.js +481 -0
  110. package/lib/examples/AgentMemoryExample.d.ts +1 -2
  111. package/lib/examples/AgentMemoryExample.js +78 -33
  112. package/lib/examples/AgentMonitoringExample.js +261 -200
  113. package/lib/examples/AgentNotificationsExample.d.ts +1 -2
  114. package/lib/examples/AgentNotificationsExample.js +114 -33
  115. package/lib/examples/AgentOtelExample.js +32 -42
  116. package/lib/examples/AgentOutputsExample.d.ts +11 -6
  117. package/lib/examples/AgentOutputsExample.js +433 -81
  118. package/lib/examples/AgentParametersExample.d.ts +3 -0
  119. package/lib/examples/AgentParametersExample.js +248 -0
  120. package/lib/examples/AgentSandboxExample.d.ts +3 -3
  121. package/lib/examples/AgentSandboxExample.js +74 -45
  122. package/lib/examples/AgentSkillsExample.js +95 -103
  123. package/lib/examples/AgentSubagentsExample.d.ts +14 -0
  124. package/lib/examples/AgentSubagentsExample.js +228 -0
  125. package/lib/examples/AgentToolApprovalsExample.js +49 -561
  126. package/lib/examples/AgentTriggersExample.js +823 -569
  127. package/lib/examples/{AgentspecExample.d.ts → AgentspecsExample.d.ts} +2 -2
  128. package/lib/examples/AgentspecsExample.js +1096 -0
  129. package/lib/examples/ChatCustomExample.js +16 -28
  130. package/lib/examples/ChatExample.js +13 -29
  131. package/lib/examples/CopilotKitLexicalExample.js +2 -1
  132. package/lib/examples/CopilotKitNotebookExample.js +2 -1
  133. package/lib/examples/HomeExample.d.ts +15 -0
  134. package/lib/examples/HomeExample.js +77 -0
  135. package/lib/examples/Lexical2Example.js +4 -2
  136. package/lib/examples/{LexicalExample.d.ts → LexicalAgentExample.d.ts} +4 -4
  137. package/lib/examples/{LexicalExample.js → LexicalAgentExample.js} +66 -17
  138. package/lib/examples/{LexicalSidebarExample.d.ts → LexicalAgentSidebarExample.d.ts} +5 -5
  139. package/lib/examples/LexicalAgentSidebarExample.js +261 -0
  140. package/lib/examples/NotebookAgentExample.d.ts +9 -0
  141. package/lib/examples/NotebookAgentExample.js +192 -0
  142. package/lib/examples/{NotebookSidebarExample.d.ts → NotebookAgentSidebarExample.d.ts} +2 -2
  143. package/lib/examples/NotebookAgentSidebarExample.js +221 -0
  144. package/lib/examples/{DatalayerNotebookExample.d.ts → NotebookCollaborationExample.d.ts} +4 -4
  145. package/lib/examples/{DatalayerNotebookExample.js → NotebookCollaborationExample.js} +3 -3
  146. package/lib/examples/NotebookExample.d.ts +4 -7
  147. package/lib/examples/NotebookExample.js +14 -146
  148. package/lib/examples/components/AuthRequiredView.d.ts +6 -0
  149. package/lib/examples/components/AuthRequiredView.js +33 -0
  150. package/lib/examples/components/ExampleWrapper.d.ts +9 -3
  151. package/lib/examples/components/ExampleWrapper.js +45 -9
  152. package/lib/examples/{ag-ui → components}/haiku/HaikuDisplay.js +1 -1
  153. package/lib/examples/{ag-ui → components}/haiku/InlineHaikuCard.js +1 -1
  154. package/lib/examples/{ag-ui → components}/haiku/index.d.ts +1 -1
  155. package/lib/examples/{ag-ui → components}/haiku/index.js +1 -1
  156. package/lib/examples/components/index.d.ts +3 -0
  157. package/lib/examples/components/index.js +4 -0
  158. package/lib/examples/{ag-ui → components}/weather/index.d.ts +1 -1
  159. package/lib/examples/{ag-ui → components}/weather/index.js +1 -1
  160. package/lib/examples/example-selector.d.ts +17 -4
  161. package/lib/examples/example-selector.js +108 -41
  162. package/lib/examples/index.d.ts +10 -6
  163. package/lib/examples/index.js +10 -6
  164. package/lib/examples/lexical/initial-content.json +6 -6
  165. package/lib/examples/main.js +257 -27
  166. package/lib/examples/utils/a2ui.d.ts +18 -0
  167. package/lib/examples/utils/a2ui.js +69 -0
  168. package/lib/examples/utils/a2uiMarkdownProvider.d.ts +7 -0
  169. package/lib/examples/utils/a2uiMarkdownProvider.js +9 -0
  170. package/lib/examples/utils/agentId.d.ts +18 -0
  171. package/lib/examples/utils/agentId.js +54 -0
  172. package/lib/examples/utils/agents/earthquake-detector.json +11 -11
  173. package/lib/examples/utils/agents/sales-forecaster.json +11 -11
  174. package/lib/examples/utils/agents/social-post-generator.json +11 -11
  175. package/lib/examples/utils/agents/stock-market.json +11 -11
  176. package/lib/examples/utils/examplesStore.js +82 -27
  177. package/lib/examples/utils/useExampleAgentRuntimesUrl.d.ts +5 -0
  178. package/lib/examples/utils/useExampleAgentRuntimesUrl.js +19 -0
  179. package/lib/hooks/index.d.ts +8 -8
  180. package/lib/hooks/index.js +7 -7
  181. package/lib/hooks/useA2A.d.ts +2 -3
  182. package/lib/hooks/useAIAgentsWebSocket.d.ts +43 -4
  183. package/lib/hooks/useAIAgentsWebSocket.js +153 -12
  184. package/lib/hooks/useAcp.d.ts +1 -2
  185. package/lib/hooks/useAgUi.d.ts +1 -1
  186. package/lib/hooks/{useAgents.d.ts → useAgentRuntimes.d.ts} +70 -4
  187. package/lib/hooks/{useAgents.js → useAgentRuntimes.js} +237 -32
  188. package/lib/hooks/useAgentsCatalog.js +1 -1
  189. package/lib/hooks/useAgentsService.d.ts +2 -2
  190. package/lib/hooks/useAgentsService.js +7 -7
  191. package/lib/hooks/useCheckpoints.js +1 -1
  192. package/lib/hooks/useConfig.d.ts +4 -1
  193. package/lib/hooks/useConfig.js +10 -3
  194. package/lib/hooks/useContextSnapshot.d.ts +9 -4
  195. package/lib/hooks/useContextSnapshot.js +9 -37
  196. package/lib/hooks/useMonitoring.js +3 -0
  197. package/lib/hooks/useSandbox.d.ts +20 -8
  198. package/lib/hooks/useSandbox.js +105 -40
  199. package/lib/hooks/useSkills.d.ts +23 -5
  200. package/lib/hooks/useSkills.js +94 -39
  201. package/lib/hooks/useToolApprovals.d.ts +60 -36
  202. package/lib/hooks/useToolApprovals.js +318 -69
  203. package/lib/hooks/useVercelAI.d.ts +1 -1
  204. package/lib/index.d.ts +2 -1
  205. package/lib/index.js +1 -0
  206. package/lib/inference/index.d.ts +0 -1
  207. package/lib/middleware/index.d.ts +0 -1
  208. package/lib/protocols/AGUIAdapter.js +6 -0
  209. package/lib/protocols/VercelAIAdapter.d.ts +7 -0
  210. package/lib/protocols/VercelAIAdapter.js +59 -7
  211. package/lib/specs/agents/agents.d.ts +21 -4
  212. package/lib/specs/agents/agents.js +2879 -316
  213. package/lib/specs/agents/index.js +3 -1
  214. package/lib/specs/benchmarks.d.ts +20 -0
  215. package/lib/specs/benchmarks.js +205 -0
  216. package/lib/specs/envvars.js +27 -20
  217. package/lib/specs/evals.d.ts +10 -9
  218. package/lib/specs/evals.js +128 -88
  219. package/lib/specs/events.d.ts +3 -10
  220. package/lib/specs/events.js +127 -84
  221. package/lib/specs/frontendTools.js +2 -2
  222. package/lib/specs/guardrails.d.ts +0 -7
  223. package/lib/specs/guardrails.js +240 -159
  224. package/lib/specs/mcpServers.js +35 -6
  225. package/lib/specs/memory.d.ts +0 -2
  226. package/lib/specs/memory.js +4 -17
  227. package/lib/specs/models.d.ts +0 -2
  228. package/lib/specs/models.js +20 -15
  229. package/lib/specs/notifications.js +102 -18
  230. package/lib/specs/outputs.js +15 -9
  231. package/lib/specs/personas.d.ts +41 -0
  232. package/lib/specs/personas.js +168 -0
  233. package/lib/specs/skills.d.ts +1 -1
  234. package/lib/specs/skills.js +23 -23
  235. package/lib/specs/teams/index.js +3 -1
  236. package/lib/specs/teams/teams.js +468 -348
  237. package/lib/specs/tools.js +4 -4
  238. package/lib/specs/triggers.js +61 -11
  239. package/lib/stores/agentRuntimeStore.d.ts +208 -0
  240. package/lib/stores/agentRuntimeStore.js +650 -0
  241. package/lib/stores/conversationStore.js +2 -2
  242. package/lib/stores/index.d.ts +1 -1
  243. package/lib/stores/index.js +1 -1
  244. package/lib/tools/adapters/copilotkit/lexicalHooks.d.ts +1 -2
  245. package/lib/tools/adapters/copilotkit/lexicalHooks.js +1 -3
  246. package/lib/tools/adapters/copilotkit/notebookHooks.d.ts +1 -2
  247. package/lib/tools/adapters/copilotkit/notebookHooks.js +1 -3
  248. package/lib/tools/index.d.ts +0 -2
  249. package/lib/tools/index.js +0 -1
  250. package/lib/types/agents-lifecycle.d.ts +18 -0
  251. package/lib/types/agents.d.ts +6 -0
  252. package/lib/types/agentspecs.d.ts +54 -1
  253. package/lib/types/benchmarks.d.ts +43 -0
  254. package/lib/types/benchmarks.js +5 -0
  255. package/lib/types/chat.d.ts +325 -8
  256. package/lib/types/context.d.ts +27 -0
  257. package/lib/types/cost.d.ts +2 -2
  258. package/lib/types/evals.d.ts +26 -17
  259. package/lib/types/index.d.ts +3 -0
  260. package/lib/types/index.js +3 -0
  261. package/lib/types/mcp.d.ts +8 -0
  262. package/lib/types/models.d.ts +2 -2
  263. package/lib/types/personas.d.ts +25 -0
  264. package/lib/types/personas.js +5 -0
  265. package/lib/types/skills.d.ts +43 -1
  266. package/lib/types/stream.d.ts +110 -0
  267. package/lib/types/stream.js +36 -0
  268. package/lib/utils/utils.d.ts +9 -5
  269. package/lib/utils/utils.js +9 -5
  270. package/package.json +19 -11
  271. package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
  272. package/scripts/codegen/__pycache__/generate_benchmarks.cpython-313.pyc +0 -0
  273. package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
  274. package/scripts/codegen/__pycache__/generate_events.cpython-313.pyc +0 -0
  275. package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
  276. package/scripts/codegen/generate_agents.py +187 -45
  277. package/scripts/codegen/generate_benchmarks.py +441 -0
  278. package/scripts/codegen/generate_evals.py +94 -16
  279. package/scripts/codegen/generate_events.py +35 -14
  280. package/scripts/codegen/generate_personas.py +319 -0
  281. package/scripts/codegen/generate_skills.py +9 -9
  282. package/scripts/sync-jupyter.sh +26 -7
  283. package/lib/api/tool-approvals.d.ts +0 -62
  284. package/lib/api/tool-approvals.js +0 -145
  285. package/lib/examples/AgentspecExample.js +0 -705
  286. package/lib/examples/LexicalSidebarExample.js +0 -163
  287. package/lib/examples/NotebookSidebarExample.js +0 -119
  288. package/lib/examples/NotebookSimpleExample.d.ts +0 -6
  289. package/lib/examples/NotebookSimpleExample.js +0 -22
  290. package/lib/examples/ag-ui/index.d.ts +0 -10
  291. package/lib/examples/ag-ui/index.js +0 -16
  292. package/lib/hooks/useAgentsRegistry.d.ts +0 -10
  293. package/lib/hooks/useAgentsRegistry.js +0 -20
  294. package/lib/stores/agentsStore.d.ts +0 -123
  295. package/lib/stores/agentsStore.js +0 -270
  296. /package/lib/examples/{ag-ui → components}/haiku/HaikuDisplay.d.ts +0 -0
  297. /package/lib/examples/{ag-ui → components}/haiku/InlineHaikuCard.d.ts +0 -0
  298. /package/lib/examples/{ag-ui → components}/weather/InlineWeatherCard.d.ts +0 -0
  299. /package/lib/examples/{ag-ui → components}/weather/InlineWeatherCard.js +0 -0
@@ -10,7 +10,14 @@ 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: ["marketing", "media", "campaigns", "analytics", "advertising", "social-media"],
13
+ tags: [
14
+ 'marketing',
15
+ 'media',
16
+ 'campaigns',
17
+ 'analytics',
18
+ 'advertising',
19
+ 'social-media',
20
+ ],
14
21
  enabled: true,
15
22
  icon: 'megaphone',
16
23
  emoji: '📢',
@@ -18,7 +25,10 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
18
25
  agentSpecId: 'analyze-campaign-performance:0.0.1',
19
26
  orchestrationProtocol: 'datalayer',
20
27
  executionMode: 'sequential',
21
- supervisor: { name: 'Campaign Analytics Orchestrator Agent', model: 'openai-gpt-4-1' },
28
+ supervisor: {
29
+ name: 'Campaign Analytics Orchestrator Agent',
30
+ model: 'openai-gpt-4-1',
31
+ },
22
32
  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.`,
23
33
  validation: { timeout: '300s', retryOnFailure: true, maxRetries: 2 },
24
34
  agents: [
@@ -29,7 +39,13 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
29
39
  goal: `Pull campaign data from Google Ads, Meta, TikTok, LinkedIn, GA4, and email platforms`,
30
40
  model: 'openai-gpt-4-1',
31
41
  mcpServer: 'Ad Platforms MCP',
32
- tools: ["Google Ads Connector", "Meta Ads Connector", "TikTok Ads Connector", "LinkedIn Ads Connector", "GA4 Connector"],
42
+ tools: [
43
+ 'Google Ads Connector',
44
+ 'Meta Ads Connector',
45
+ 'TikTok Ads Connector',
46
+ 'LinkedIn Ads Connector',
47
+ 'GA4 Connector',
48
+ ],
33
49
  trigger: 'Schedule: Every 4 hours',
34
50
  approval: 'auto',
35
51
  },
@@ -40,7 +56,12 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
40
56
  goal: `Normalise CPA, ROAS, CTR, and attribution across all platforms into unified view`,
41
57
  model: 'openai-gpt-4-1',
42
58
  mcpServer: 'Analytics MCP',
43
- tools: ["Metric Unifier", "Currency Converter", "Attribution Mapper", "Naming Convention Resolver"],
59
+ tools: [
60
+ 'Metric Unifier',
61
+ 'Currency Converter',
62
+ 'Attribution Mapper',
63
+ 'Naming Convention Resolver',
64
+ ],
44
65
  trigger: 'On completion of Platform Connector Agent',
45
66
  approval: 'auto',
46
67
  },
@@ -51,7 +72,12 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
51
72
  goal: `Monitor all KPIs for CTR drops, CPA spikes, and budget pacing issues`,
52
73
  model: 'anthropic-claude-sonnet-4',
53
74
  mcpServer: 'Monitoring MCP',
54
- tools: ["Anomaly Scanner", "Budget Pacer", "Alert Generator", "Campaign Pauser"],
75
+ tools: [
76
+ 'Anomaly Scanner',
77
+ 'Budget Pacer',
78
+ 'Alert Generator',
79
+ 'Campaign Pauser',
80
+ ],
55
81
  trigger: 'On completion of Metrics Normaliser Agent',
56
82
  approval: 'manual',
57
83
  },
@@ -62,52 +88,53 @@ export const ANALYZE_CAMPAIGN_PERFORMANCE_TEAM_SPEC_0_0_1 = {
62
88
  goal: `Generate budget reallocation recommendations to maximise ROAS across channels`,
63
89
  model: 'openai-gpt-4-1',
64
90
  mcpServer: 'Optimisation MCP',
65
- tools: ["ROAS Calculator", "Budget Allocator", "Scenario Modeller", "Report Generator"],
91
+ tools: [
92
+ 'ROAS Calculator',
93
+ 'Budget Allocator',
94
+ 'Scenario Modeller',
95
+ 'Report Generator',
96
+ ],
66
97
  trigger: 'On completion of Anomaly Detector Agent',
67
98
  approval: 'manual',
68
99
  },
69
100
  ],
70
101
  reactionRules: [
71
102
  {
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
- }
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
+ },
89
120
  ],
90
121
  healthMonitoring: {
91
- "heartbeatInterval": "30s",
92
- "staleThreshold": "120s",
93
- "unresponsiveThreshold": "300s",
94
- "stuckThreshold": "600s",
95
- "maxRestartAttempts": 3
122
+ heartbeatInterval: '30s',
123
+ staleThreshold: '120s',
124
+ unresponsiveThreshold: '300s',
125
+ stuckThreshold: '600s',
126
+ maxRestartAttempts: 3,
96
127
  },
97
128
  notifications: {
98
- "on_start": true,
99
- "on_completion": true,
100
- "on_failure": true,
101
- "on_escalation": true
129
+ on_start: true,
130
+ on_completion: true,
131
+ on_failure: true,
132
+ on_escalation: true,
102
133
  },
103
134
  output: {
104
- "formats": [
105
- "pdf",
106
- "csv",
107
- "json"
108
- ],
109
- "template": "Campaign Performance Report",
110
- "storage": "s3://reports/campaign-analytics/"
135
+ formats: ['pdf', 'csv', 'json'],
136
+ template: 'Campaign Performance Report',
137
+ storage: 's3://reports/campaign-analytics/',
111
138
  },
112
139
  };
113
140
  export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
@@ -115,7 +142,7 @@ export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
115
142
  version: '0.0.1',
116
143
  name: 'Analyze Support Tickets',
117
144
  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.`,
118
- tags: ["analytics", "data", "support", "tickets"],
145
+ tags: ['analytics', 'data', 'support', 'tickets'],
119
146
  enabled: true,
120
147
  icon: 'issue-opened',
121
148
  emoji: '🎫',
@@ -134,7 +161,7 @@ export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
134
161
  goal: `Ingest new support tickets and assess urgency level (P1-P4)`,
135
162
  model: 'openai-gpt-4-1',
136
163
  mcpServer: 'Helpdesk MCP',
137
- tools: ["Ticket Reader", "Priority Classifier"],
164
+ tools: ['Ticket Reader', 'Priority Classifier'],
138
165
  trigger: 'Event: new ticket received',
139
166
  approval: 'auto',
140
167
  },
@@ -145,7 +172,7 @@ export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
145
172
  goal: `Categorize tickets by topic, product area, and sentiment`,
146
173
  model: 'openai-gpt-4-1',
147
174
  mcpServer: 'NLP Pipeline MCP',
148
- tools: ["Topic Classifier", "Sentiment Analyzer", "Product Tagger"],
175
+ tools: ['Topic Classifier', 'Sentiment Analyzer', 'Product Tagger'],
149
176
  trigger: 'On completion of Triage Agent',
150
177
  approval: 'auto',
151
178
  },
@@ -156,51 +183,52 @@ export const ANALYZE_SUPPORT_TICKETS_TEAM_SPEC_0_0_1 = {
156
183
  goal: `Identify recurring issues and generate resolution recommendations`,
157
184
  model: 'anthropic-claude-sonnet-4',
158
185
  mcpServer: 'Analytics MCP',
159
- tools: ["Pattern Detector", "Knowledge Base Search", "Resolution Generator"],
186
+ tools: [
187
+ 'Pattern Detector',
188
+ 'Knowledge Base Search',
189
+ 'Resolution Generator',
190
+ ],
160
191
  trigger: 'On completion of Categorizer Agent',
161
192
  approval: 'manual',
162
193
  },
163
194
  ],
164
195
  reactionRules: [
165
196
  {
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
- }
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
+ },
183
214
  ],
184
215
  healthMonitoring: {
185
- "heartbeatInterval": "15s",
186
- "staleThreshold": "60s",
187
- "unresponsiveThreshold": "180s",
188
- "stuckThreshold": "300s",
189
- "maxRestartAttempts": 3
216
+ heartbeatInterval: '15s',
217
+ staleThreshold: '60s',
218
+ unresponsiveThreshold: '180s',
219
+ stuckThreshold: '300s',
220
+ maxRestartAttempts: 3,
190
221
  },
191
222
  notifications: {
192
- "on_start": false,
193
- "on_completion": true,
194
- "on_failure": true,
195
- "on_escalation": true
223
+ on_start: false,
224
+ on_completion: true,
225
+ on_failure: true,
226
+ on_escalation: true,
196
227
  },
197
228
  output: {
198
- "formats": [
199
- "pdf",
200
- "json"
201
- ],
202
- "template": "Support Ticket Analysis",
203
- "storage": "s3://reports/support-analytics/"
229
+ formats: ['pdf', 'json'],
230
+ template: 'Support Ticket Analysis',
231
+ storage: 's3://reports/support-analytics/',
204
232
  },
205
233
  };
206
234
  export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
@@ -208,7 +236,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
208
236
  version: '0.0.1',
209
237
  name: 'Audit Inventory Levels',
210
238
  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.`,
211
- tags: ["finance", "automation", "inventory", "supply-chain"],
239
+ tags: ['finance', 'automation', 'inventory', 'supply-chain'],
212
240
  enabled: true,
213
241
  icon: 'package',
214
242
  emoji: '📦',
@@ -227,7 +255,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
227
255
  goal: `Pull current inventory levels from all warehouse management systems`,
228
256
  model: 'openai-gpt-4-1',
229
257
  mcpServer: 'Warehouse MCP',
230
- tools: ["WMS Connector", "Barcode Scanner API"],
258
+ tools: ['WMS Connector', 'Barcode Scanner API'],
231
259
  trigger: 'Schedule: Every 6 hours',
232
260
  approval: 'auto',
233
261
  },
@@ -238,7 +266,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
238
266
  goal: `Compare system counts vs physical counts and flag discrepancies`,
239
267
  model: 'openai-gpt-4-1',
240
268
  mcpServer: 'Audit MCP',
241
- tools: ["Count Comparator", "Discrepancy Logger", "Shrinkage Calculator"],
269
+ tools: ['Count Comparator', 'Discrepancy Logger', 'Shrinkage Calculator'],
242
270
  trigger: 'On completion of Inventory Scanner',
243
271
  approval: 'auto',
244
272
  },
@@ -249,7 +277,11 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
249
277
  goal: `Forecast demand by SKU using historical sales and seasonal patterns`,
250
278
  model: 'anthropic-claude-sonnet-4',
251
279
  mcpServer: 'Analytics MCP',
252
- tools: ["Time Series Model", "Seasonal Analyzer", "External Signals Fetcher"],
280
+ tools: [
281
+ 'Time Series Model',
282
+ 'Seasonal Analyzer',
283
+ 'External Signals Fetcher',
284
+ ],
253
285
  trigger: 'On completion of Discrepancy Auditor',
254
286
  approval: 'auto',
255
287
  },
@@ -260,7 +292,7 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
260
292
  goal: `Calculate optimal reorder points and generate purchase order recommendations`,
261
293
  model: 'openai-gpt-4-1',
262
294
  mcpServer: 'Procurement MCP',
263
- tools: ["EOQ Calculator", "Supplier Catalog", "PO Generator"],
295
+ tools: ['EOQ Calculator', 'Supplier Catalog', 'PO Generator'],
264
296
  trigger: 'On completion of Demand Forecaster',
265
297
  approval: 'manual',
266
298
  },
@@ -271,52 +303,48 @@ export const AUDIT_INVENTORY_LEVELS_TEAM_SPEC_0_0_1 = {
271
303
  goal: `Compile inventory audit report with discrepancies, forecasts, and reorder plan`,
272
304
  model: 'openai-gpt-4-1',
273
305
  mcpServer: 'Document Generation MCP',
274
- tools: ["PDF Generator", "Chart Builder", "Email Sender"],
306
+ tools: ['PDF Generator', 'Chart Builder', 'Email Sender'],
275
307
  trigger: 'On completion of Reorder Planner',
276
308
  approval: 'auto',
277
309
  },
278
310
  ],
279
311
  reactionRules: [
280
312
  {
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
- }
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
+ },
298
330
  ],
299
331
  healthMonitoring: {
300
- "heartbeatInterval": "30s",
301
- "staleThreshold": "120s",
302
- "unresponsiveThreshold": "300s",
303
- "stuckThreshold": "600s",
304
- "maxRestartAttempts": 3
332
+ heartbeatInterval: '30s',
333
+ staleThreshold: '120s',
334
+ unresponsiveThreshold: '300s',
335
+ stuckThreshold: '600s',
336
+ maxRestartAttempts: 3,
305
337
  },
306
338
  notifications: {
307
- "on_start": true,
308
- "on_completion": true,
309
- "on_failure": true,
310
- "on_escalation": true
339
+ on_start: true,
340
+ on_completion: true,
341
+ on_failure: true,
342
+ on_escalation: true,
311
343
  },
312
344
  output: {
313
- "formats": [
314
- "pdf",
315
- "xlsx",
316
- "csv"
317
- ],
318
- "template": "Inventory Audit Report",
319
- "storage": "s3://reports/inventory-audits/"
345
+ formats: ['pdf', 'xlsx', 'csv'],
346
+ template: 'Inventory Audit Report',
347
+ storage: 's3://reports/inventory-audits/',
320
348
  },
321
349
  };
322
350
  export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
@@ -324,7 +352,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
324
352
  version: '0.0.1',
325
353
  name: 'Automate Regulatory Reporting',
326
354
  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.`,
327
- tags: ["finance", "compliance", "regulatory", "risk", "banking", "audit"],
355
+ tags: ['finance', 'compliance', 'regulatory', 'risk', 'banking', 'audit'],
328
356
  enabled: true,
329
357
  icon: 'shield-check',
330
358
  emoji: '🏦',
@@ -332,7 +360,10 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
332
360
  agentSpecId: 'automate-regulatory-reporting:0.0.1',
333
361
  orchestrationProtocol: 'datalayer',
334
362
  executionMode: 'sequential',
335
- supervisor: { name: 'Compliance Orchestrator Agent', model: 'openai-gpt-4-1' },
363
+ supervisor: {
364
+ name: 'Compliance Orchestrator Agent',
365
+ model: 'openai-gpt-4-1',
366
+ },
336
367
  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.`,
337
368
  validation: { timeout: '900s', retryOnFailure: true, maxRetries: 2 },
338
369
  agents: [
@@ -343,7 +374,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
343
374
  goal: `Extract positions, transactions, and P&L from trading and accounting systems`,
344
375
  model: 'openai-gpt-4-1',
345
376
  mcpServer: 'Trading Systems MCP',
346
- tools: ["Position Reader", "Transaction Fetcher", "P&L Extractor"],
377
+ tools: ['Position Reader', 'Transaction Fetcher', 'P&L Extractor'],
347
378
  trigger: 'Schedule: Monthly on the 3rd business day',
348
379
  approval: 'auto',
349
380
  },
@@ -354,7 +385,12 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
354
385
  goal: `Compute Basel III/IV risk-weighted assets, capital ratios, and VaR metrics`,
355
386
  model: 'anthropic-claude-sonnet-4',
356
387
  mcpServer: 'Risk Engine MCP',
357
- tools: ["RWA Calculator", "VaR Engine", "Capital Ratio Computer", "Stress Test Runner"],
388
+ tools: [
389
+ 'RWA Calculator',
390
+ 'VaR Engine',
391
+ 'Capital Ratio Computer',
392
+ 'Stress Test Runner',
393
+ ],
358
394
  trigger: 'On completion of Data Ingestion Agent',
359
395
  approval: 'auto',
360
396
  },
@@ -365,7 +401,7 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
365
401
  goal: `Cross-check computed figures against source systems and flag discrepancies`,
366
402
  model: 'openai-gpt-4-1',
367
403
  mcpServer: 'Reconciliation MCP',
368
- tools: ["Position Reconciler", "Break Detector", "Audit Logger"],
404
+ tools: ['Position Reconciler', 'Break Detector', 'Audit Logger'],
369
405
  trigger: 'On completion of Risk Calculator Agent',
370
406
  approval: 'auto',
371
407
  },
@@ -376,7 +412,11 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
376
412
  goal: `Validate all metrics against Basel III/IV, MiFID II, and SOX regulatory rules`,
377
413
  model: 'openai-gpt-4-1',
378
414
  mcpServer: 'Compliance Rules MCP',
379
- tools: ["Basel Rule Validator", "MiFID II Checker", "SOX Control Verifier"],
415
+ tools: [
416
+ 'Basel Rule Validator',
417
+ 'MiFID II Checker',
418
+ 'SOX Control Verifier',
419
+ ],
380
420
  trigger: 'On completion of Reconciliation Agent',
381
421
  approval: 'manual',
382
422
  },
@@ -387,52 +427,48 @@ export const AUTOMATE_REGULATORY_REPORTING_TEAM_SPEC_0_0_1 = {
387
427
  goal: `Generate submission-ready regulatory reports with full data lineage and audit trail`,
388
428
  model: 'openai-gpt-4-1',
389
429
  mcpServer: 'Document Generation MCP',
390
- tools: ["PDF Generator", "XBRL Formatter", "Email Sender"],
430
+ tools: ['PDF Generator', 'XBRL Formatter', 'Email Sender'],
391
431
  trigger: 'On completion of Validation Agent',
392
432
  approval: 'auto',
393
433
  },
394
434
  ],
395
435
  reactionRules: [
396
436
  {
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
- }
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
+ },
414
454
  ],
415
455
  healthMonitoring: {
416
- "heartbeatInterval": "15s",
417
- "staleThreshold": "60s",
418
- "unresponsiveThreshold": "120s",
419
- "stuckThreshold": "300s",
420
- "maxRestartAttempts": 2
456
+ heartbeatInterval: '15s',
457
+ staleThreshold: '60s',
458
+ unresponsiveThreshold: '120s',
459
+ stuckThreshold: '300s',
460
+ maxRestartAttempts: 2,
421
461
  },
422
462
  notifications: {
423
- "on_start": true,
424
- "on_completion": true,
425
- "on_failure": true,
426
- "on_escalation": true
463
+ on_start: true,
464
+ on_completion: true,
465
+ on_failure: true,
466
+ on_escalation: true,
427
467
  },
428
468
  output: {
429
- "formats": [
430
- "pdf",
431
- "xbrl",
432
- "json"
433
- ],
434
- "template": "Regulatory Submission Report",
435
- "storage": "s3://reports/regulatory-submissions/"
469
+ formats: ['pdf', 'xbrl', 'json'],
470
+ template: 'Regulatory Submission Report',
471
+ storage: 's3://reports/regulatory-submissions/',
436
472
  },
437
473
  };
438
474
  export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
@@ -440,7 +476,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
440
476
  version: '0.0.1',
441
477
  name: 'Comprehensive Sales Analytics',
442
478
  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.`,
443
- tags: ["sales", "analytics", "kpi", "monitoring", "horizontal"],
479
+ tags: ['sales', 'analytics', 'kpi', 'monitoring', 'horizontal'],
444
480
  enabled: true,
445
481
  icon: 'graph',
446
482
  emoji: '📈',
@@ -448,7 +484,10 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
448
484
  agentSpecId: 'comprehensive-sales-analytics:0.0.1',
449
485
  orchestrationProtocol: 'datalayer',
450
486
  executionMode: 'sequential',
451
- supervisor: { name: 'Sales Analytics Supervisor', model: 'anthropic-claude-opus-4' },
487
+ supervisor: {
488
+ name: 'Sales Analytics Supervisor',
489
+ model: 'anthropic-claude-opus-4',
490
+ },
452
491
  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).`,
453
492
  validation: { timeout: '300s', retryOnFailure: true, maxRetries: 3 },
454
493
  agents: [
@@ -459,7 +498,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
459
498
  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).`,
460
499
  model: 'openai-gpt-4-1',
461
500
  mcpServer: 'CRM Data Server',
462
- tools: ["get_sales_data", "get_customer_list", "API Connector"],
501
+ tools: ['get_sales_data', 'get_customer_list', 'API Connector'],
463
502
  trigger: 'Schedule: Daily at 7:30 AM',
464
503
  approval: 'auto',
465
504
  },
@@ -470,7 +509,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
470
509
  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.`,
471
510
  model: 'anthropic-claude-sonnet-4',
472
511
  mcpServer: 'Analytics Server',
473
- tools: ["run_analysis", "Statistical Analysis", "ML Predictor"],
512
+ tools: ['run_analysis', 'Statistical Analysis', 'ML Predictor'],
474
513
  trigger: 'On completion of KPI Data Collector',
475
514
  approval: 'auto',
476
515
  },
@@ -481,7 +520,7 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
481
520
  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.`,
482
521
  model: 'anthropic-claude-sonnet-4',
483
522
  mcpServer: 'Analytics Server',
484
- tools: ["run_analysis", "generate_charts", "Forecaster"],
523
+ tools: ['run_analysis', 'generate_charts', 'Forecaster'],
485
524
  trigger: 'On completion of KPI Data Collector',
486
525
  approval: 'auto',
487
526
  },
@@ -492,52 +531,53 @@ export const COMPREHENSIVE_SALES_ANALYTICS_TEAM_SPEC_0_0_1 = {
492
531
  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.`,
493
532
  model: 'openai-gpt-4-1',
494
533
  mcpServer: 'Document Generation MCP',
495
- tools: ["PDF Generator", "Chart Builder", "Email Sender", "Slack Notifier"],
534
+ tools: [
535
+ 'PDF Generator',
536
+ 'Chart Builder',
537
+ 'Email Sender',
538
+ 'Slack Notifier',
539
+ ],
496
540
  trigger: 'On completion of Anomaly Detector & Trend Analyzer',
497
541
  approval: 'manual',
498
542
  },
499
543
  ],
500
544
  reactionRules: [
501
545
  {
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
- }
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
+ },
519
563
  ],
520
564
  healthMonitoring: {
521
- "heartbeatInterval": "30s",
522
- "staleThreshold": "120s",
523
- "unresponsiveThreshold": "300s",
524
- "stuckThreshold": "600s",
525
- "maxRestartAttempts": 3
565
+ heartbeatInterval: '30s',
566
+ staleThreshold: '120s',
567
+ unresponsiveThreshold: '300s',
568
+ stuckThreshold: '600s',
569
+ maxRestartAttempts: 3,
526
570
  },
527
571
  notifications: {
528
- "on_start": true,
529
- "on_completion": true,
530
- "on_failure": true,
531
- "on_escalation": true
572
+ on_start: true,
573
+ on_completion: true,
574
+ on_failure: true,
575
+ on_escalation: true,
532
576
  },
533
577
  output: {
534
- "formats": [
535
- "pdf",
536
- "xlsx",
537
- "json"
538
- ],
539
- "template": "Executive Sales Dashboard",
540
- "storage": "s3://reports/sales-analytics/"
578
+ formats: ['pdf', 'xlsx', 'json'],
579
+ template: 'Executive Sales Dashboard',
580
+ storage: 's3://reports/sales-analytics/',
541
581
  },
542
582
  };
543
583
  export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
@@ -545,7 +585,14 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
545
585
  version: '0.0.1',
546
586
  name: 'Optimize Grid Operations',
547
587
  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%.`,
548
- tags: ["energy", "utilities", "smart-grid", "iot", "predictive-maintenance", "sustainability"],
588
+ tags: [
589
+ 'energy',
590
+ 'utilities',
591
+ 'smart-grid',
592
+ 'iot',
593
+ 'predictive-maintenance',
594
+ 'sustainability',
595
+ ],
549
596
  enabled: true,
550
597
  icon: 'zap',
551
598
  emoji: '⚡',
@@ -553,7 +600,10 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
553
600
  agentSpecId: 'optimize-grid-operations:0.0.1',
554
601
  orchestrationProtocol: 'datalayer',
555
602
  executionMode: 'sequential',
556
- supervisor: { name: 'Grid Operations Orchestrator Agent', model: 'openai-gpt-4-1' },
603
+ supervisor: {
604
+ name: 'Grid Operations Orchestrator Agent',
605
+ model: 'openai-gpt-4-1',
606
+ },
557
607
  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.`,
558
608
  validation: { timeout: '600s', retryOnFailure: true, maxRetries: 3 },
559
609
  agents: [
@@ -564,7 +614,12 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
564
614
  goal: `Ingest and process real-time telemetry from SCADA, smart meters, and IoT gateways`,
565
615
  model: 'openai-gpt-4-1',
566
616
  mcpServer: 'SCADA MCP',
567
- tools: ["SCADA Connector", "Smart Meter Reader", "IoT Gateway Adapter", "Time Series Processor"],
617
+ tools: [
618
+ 'SCADA Connector',
619
+ 'Smart Meter Reader',
620
+ 'IoT Gateway Adapter',
621
+ 'Time Series Processor',
622
+ ],
568
623
  trigger: 'Schedule: Every 5 minutes',
569
624
  approval: 'auto',
570
625
  },
@@ -575,7 +630,12 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
575
630
  goal: `Detect vibration, temperature, and voltage anomalies across all grid assets`,
576
631
  model: 'openai-gpt-4-1',
577
632
  mcpServer: 'Monitoring MCP',
578
- tools: ["Vibration Analyzer", "Temperature Anomaly Detector", "Voltage Pattern Scanner", "Historical Comparator"],
633
+ tools: [
634
+ 'Vibration Analyzer',
635
+ 'Temperature Anomaly Detector',
636
+ 'Voltage Pattern Scanner',
637
+ 'Historical Comparator',
638
+ ],
579
639
  trigger: 'On completion of Sensor Ingestion Agent',
580
640
  approval: 'auto',
581
641
  },
@@ -586,7 +646,12 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
586
646
  goal: `Predict equipment failures 2–4 weeks in advance using anomaly patterns and failure history`,
587
647
  model: 'anthropic-claude-sonnet-4',
588
648
  mcpServer: 'Predictive Analytics MCP',
589
- tools: ["Failure Correlation Engine", "Risk Scorer", "Maintenance Scheduler", "Work Order Generator"],
649
+ tools: [
650
+ 'Failure Correlation Engine',
651
+ 'Risk Scorer',
652
+ 'Maintenance Scheduler',
653
+ 'Work Order Generator',
654
+ ],
590
655
  trigger: 'On completion of Anomaly Detector Agent',
591
656
  approval: 'manual',
592
657
  },
@@ -597,52 +662,53 @@ export const OPTIMIZE_GRID_OPERATIONS_TEAM_SPEC_0_0_1 = {
597
662
  goal: `Optimise real-time load balancing across renewable and conventional generation sources`,
598
663
  model: 'openai-gpt-4-1',
599
664
  mcpServer: 'Grid Control MCP',
600
- tools: ["Load Forecaster", "Renewable Integration Model", "Dispatch Optimiser", "Grid Stability Checker"],
665
+ tools: [
666
+ 'Load Forecaster',
667
+ 'Renewable Integration Model',
668
+ 'Dispatch Optimiser',
669
+ 'Grid Stability Checker',
670
+ ],
601
671
  trigger: 'On completion of Failure Predictor Agent',
602
672
  approval: 'auto',
603
673
  },
604
674
  ],
605
675
  reactionRules: [
606
676
  {
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
- }
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
+ },
624
694
  ],
625
695
  healthMonitoring: {
626
- "heartbeatInterval": "10s",
627
- "staleThreshold": "30s",
628
- "unresponsiveThreshold": "60s",
629
- "stuckThreshold": "120s",
630
- "maxRestartAttempts": 5
696
+ heartbeatInterval: '10s',
697
+ staleThreshold: '30s',
698
+ unresponsiveThreshold: '60s',
699
+ stuckThreshold: '120s',
700
+ maxRestartAttempts: 5,
631
701
  },
632
702
  notifications: {
633
- "on_start": true,
634
- "on_completion": true,
635
- "on_failure": true,
636
- "on_escalation": true
703
+ on_start: true,
704
+ on_completion: true,
705
+ on_failure: true,
706
+ on_escalation: true,
637
707
  },
638
708
  output: {
639
- "formats": [
640
- "json",
641
- "csv",
642
- "pdf"
643
- ],
644
- "template": "Grid Operations Dashboard",
645
- "storage": "s3://reports/grid-operations/"
709
+ formats: ['json', 'csv', 'pdf'],
710
+ template: 'Grid Operations Dashboard',
711
+ storage: 's3://reports/grid-operations/',
646
712
  },
647
713
  };
648
714
  export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
@@ -650,7 +716,14 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
650
716
  version: '0.0.1',
651
717
  name: 'Process Citizen Requests',
652
718
  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.`,
653
- tags: ["government", "public-sector", "civic", "policy", "compliance", "transparency"],
719
+ tags: [
720
+ 'government',
721
+ 'public-sector',
722
+ 'civic',
723
+ 'policy',
724
+ 'compliance',
725
+ 'transparency',
726
+ ],
654
727
  enabled: true,
655
728
  icon: 'organization',
656
729
  emoji: '🏛️',
@@ -658,7 +731,10 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
658
731
  agentSpecId: 'process-citizen-requests:0.0.1',
659
732
  orchestrationProtocol: 'datalayer',
660
733
  executionMode: 'sequential',
661
- supervisor: { name: 'Citizen Services Orchestrator Agent', model: 'openai-gpt-4-1' },
734
+ supervisor: {
735
+ name: 'Citizen Services Orchestrator Agent',
736
+ model: 'openai-gpt-4-1',
737
+ },
662
738
  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.`,
663
739
  validation: { timeout: '300s', retryOnFailure: true, maxRetries: 2 },
664
740
  agents: [
@@ -669,7 +745,12 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
669
745
  goal: `Classify, triage, and route citizen submissions from web portals, email, and documents`,
670
746
  model: 'openai-gpt-4-1',
671
747
  mcpServer: 'Citizen Portal MCP',
672
- tools: ["Request Classifier", "Urgency Assessor", "Jurisdiction Router", "OCR Scanner"],
748
+ tools: [
749
+ 'Request Classifier',
750
+ 'Urgency Assessor',
751
+ 'Jurisdiction Router',
752
+ 'OCR Scanner',
753
+ ],
673
754
  trigger: 'Event: new citizen request received',
674
755
  approval: 'auto',
675
756
  },
@@ -680,7 +761,12 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
680
761
  goal: `Process and route requests to appropriate departments with required documentation`,
681
762
  model: 'openai-gpt-4-1',
682
763
  mcpServer: 'Case Management MCP',
683
- tools: ["Case Creator", "Document Assembler", "Department Router", "Status Tracker"],
764
+ tools: [
765
+ 'Case Creator',
766
+ 'Document Assembler',
767
+ 'Department Router',
768
+ 'Status Tracker',
769
+ ],
684
770
  trigger: 'On completion of Intake Agent',
685
771
  approval: 'auto',
686
772
  },
@@ -691,7 +777,12 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
691
777
  goal: `Model policy outcomes across population datasets with scenario simulation`,
692
778
  model: 'anthropic-claude-sonnet-4',
693
779
  mcpServer: 'Policy Analytics MCP',
694
- tools: ["Monte Carlo Simulator", "Demographic Analyzer", "Budget Impact Model", "Scenario Comparator"],
780
+ tools: [
781
+ 'Monte Carlo Simulator',
782
+ 'Demographic Analyzer',
783
+ 'Budget Impact Model',
784
+ 'Scenario Comparator',
785
+ ],
695
786
  trigger: 'On completion of Case Processor Agent',
696
787
  approval: 'manual',
697
788
  },
@@ -702,51 +793,53 @@ export const PROCESS_CITIZEN_REQUESTS_TEAM_SPEC_0_0_1 = {
702
793
  goal: `Generate explainable decision documentation with full audit trail for public record`,
703
794
  model: 'openai-gpt-4-1',
704
795
  mcpServer: 'Compliance MCP',
705
- tools: ["Decision Explainer", "Audit Trail Builder", "FOIA Compliance Checker", "Public Record Generator"],
796
+ tools: [
797
+ 'Decision Explainer',
798
+ 'Audit Trail Builder',
799
+ 'FOIA Compliance Checker',
800
+ 'Public Record Generator',
801
+ ],
706
802
  trigger: 'On completion of Policy Impact Analyst Agent',
707
803
  approval: 'auto',
708
804
  },
709
805
  ],
710
806
  reactionRules: [
711
807
  {
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
- }
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
+ },
729
825
  ],
730
826
  healthMonitoring: {
731
- "heartbeatInterval": "30s",
732
- "staleThreshold": "120s",
733
- "unresponsiveThreshold": "300s",
734
- "stuckThreshold": "600s",
735
- "maxRestartAttempts": 3
827
+ heartbeatInterval: '30s',
828
+ staleThreshold: '120s',
829
+ unresponsiveThreshold: '300s',
830
+ stuckThreshold: '600s',
831
+ maxRestartAttempts: 3,
736
832
  },
737
833
  notifications: {
738
- "on_start": false,
739
- "on_completion": true,
740
- "on_failure": true,
741
- "on_escalation": true
834
+ on_start: false,
835
+ on_completion: true,
836
+ on_failure: true,
837
+ on_escalation: true,
742
838
  },
743
839
  output: {
744
- "formats": [
745
- "pdf",
746
- "json"
747
- ],
748
- "template": "Citizen Request Processing Report",
749
- "storage": "s3://reports/citizen-requests/"
840
+ formats: ['pdf', 'json'],
841
+ template: 'Citizen Request Processing Report',
842
+ storage: 's3://reports/citizen-requests/',
750
843
  },
751
844
  };
752
845
  export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
@@ -754,7 +847,13 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
754
847
  version: '0.0.1',
755
848
  name: 'Process Clinical Trial Data',
756
849
  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.`,
757
- tags: ["healthcare", "pharma", "clinical-trials", "patient-data", "compliance"],
850
+ tags: [
851
+ 'healthcare',
852
+ 'pharma',
853
+ 'clinical-trials',
854
+ 'patient-data',
855
+ 'compliance',
856
+ ],
758
857
  enabled: true,
759
858
  icon: 'heart',
760
859
  emoji: '🏥',
@@ -762,7 +861,10 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
762
861
  agentSpecId: 'process-clinical-trial-data:0.0.1',
763
862
  orchestrationProtocol: 'datalayer',
764
863
  executionMode: 'sequential',
765
- supervisor: { name: 'Clinical Data Orchestrator Agent', model: 'anthropic-claude-sonnet-4' },
864
+ supervisor: {
865
+ name: 'Clinical Data Orchestrator Agent',
866
+ model: 'anthropic-claude-sonnet-4',
867
+ },
766
868
  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.`,
767
869
  validation: { timeout: '600s', retryOnFailure: true, maxRetries: 2 },
768
870
  agents: [
@@ -773,7 +875,12 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
773
875
  goal: `Ingest patient records, lab results, and CRFs from clinical sites`,
774
876
  model: 'openai-gpt-4-1',
775
877
  mcpServer: 'Clinical EDC MCP',
776
- tools: ["Medidata Connector", "Veeva Vault Reader", "Oracle Clinical Adapter", "Format Detector"],
878
+ tools: [
879
+ 'Medidata Connector',
880
+ 'Veeva Vault Reader',
881
+ 'Oracle Clinical Adapter',
882
+ 'Format Detector',
883
+ ],
777
884
  trigger: 'Event: new data batch received from site',
778
885
  approval: 'auto',
779
886
  },
@@ -784,7 +891,12 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
784
891
  goal: `Standardise all data to CDISC SDTM format with MedDRA coding`,
785
892
  model: 'openai-gpt-4-1',
786
893
  mcpServer: 'Data Standards MCP',
787
- tools: ["SDTM Mapper", "MedDRA Coder", "Unit Converter", "Site Normaliser"],
894
+ tools: [
895
+ 'SDTM Mapper',
896
+ 'MedDRA Coder',
897
+ 'Unit Converter',
898
+ 'Site Normaliser',
899
+ ],
788
900
  trigger: 'On completion of Data Ingestion Agent',
789
901
  approval: 'auto',
790
902
  },
@@ -795,7 +907,12 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
795
907
  goal: `Screen every data point for adverse events and safety signals`,
796
908
  model: 'anthropic-claude-sonnet-4',
797
909
  mcpServer: 'Safety Database MCP',
798
- tools: ["AE Classifier", "Signal Detector", "SAE Escalator", "Evidence Trail Builder"],
910
+ tools: [
911
+ 'AE Classifier',
912
+ 'Signal Detector',
913
+ 'SAE Escalator',
914
+ 'Evidence Trail Builder',
915
+ ],
799
916
  trigger: 'On completion of Harmonisation Agent',
800
917
  approval: 'manual',
801
918
  },
@@ -806,52 +923,53 @@ export const PROCESS_CLINICAL_TRIAL_DATA_TEAM_SPEC_0_0_1 = {
806
923
  goal: `Assemble submission-ready SDTM datasets with validation and define.xml`,
807
924
  model: 'openai-gpt-4-1',
808
925
  mcpServer: 'Submission MCP',
809
- tools: ["Dataset Validator", "Define.xml Generator", "PDF Report Builder", "Compliance Checker"],
926
+ tools: [
927
+ 'Dataset Validator',
928
+ 'Define.xml Generator',
929
+ 'PDF Report Builder',
930
+ 'Compliance Checker',
931
+ ],
810
932
  trigger: 'On completion of Safety Monitor Agent',
811
933
  approval: 'auto',
812
934
  },
813
935
  ],
814
936
  reactionRules: [
815
937
  {
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
- }
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
+ },
833
955
  ],
834
956
  healthMonitoring: {
835
- "heartbeatInterval": "10s",
836
- "staleThreshold": "45s",
837
- "unresponsiveThreshold": "90s",
838
- "stuckThreshold": "180s",
839
- "maxRestartAttempts": 2
957
+ heartbeatInterval: '10s',
958
+ staleThreshold: '45s',
959
+ unresponsiveThreshold: '90s',
960
+ stuckThreshold: '180s',
961
+ maxRestartAttempts: 2,
840
962
  },
841
963
  notifications: {
842
- "on_start": true,
843
- "on_completion": true,
844
- "on_failure": true,
845
- "on_escalation": true
964
+ on_start: true,
965
+ on_completion: true,
966
+ on_failure: true,
967
+ on_escalation: true,
846
968
  },
847
969
  output: {
848
- "formats": [
849
- "pdf",
850
- "json",
851
- "xml"
852
- ],
853
- "template": "Clinical Trial Data Report",
854
- "storage": "s3://reports/clinical-trials/"
970
+ formats: ['pdf', 'json', 'xml'],
971
+ template: 'Clinical Trial Data Report',
972
+ storage: 's3://reports/clinical-trials/',
855
973
  },
856
974
  };
857
975
  export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
@@ -859,7 +977,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
859
977
  version: '0.0.1',
860
978
  name: 'Sync CRM Contacts',
861
979
  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.`,
862
- tags: ["sales", "crm", "data-sync", "deduplication"],
980
+ tags: ['sales', 'crm', 'data-sync', 'deduplication'],
863
981
  enabled: true,
864
982
  icon: 'people',
865
983
  emoji: '🔄',
@@ -867,7 +985,10 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
867
985
  agentSpecId: 'sync-crm-contacts:0.0.1',
868
986
  orchestrationProtocol: 'datalayer',
869
987
  executionMode: 'sequential',
870
- supervisor: { name: 'CRM Orchestrator Agent', model: 'anthropic-claude-opus-4' },
988
+ supervisor: {
989
+ name: 'CRM Orchestrator Agent',
990
+ model: 'anthropic-claude-opus-4',
991
+ },
871
992
  routingInstructions: `Route data collection tasks to the Data Collector first, then analysis, then sync, then reporting. Escalate to human if sync fails 3 times.`,
872
993
  validation: { timeout: '300s', retryOnFailure: true, maxRetries: 3 },
873
994
  agents: [
@@ -878,7 +999,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
878
999
  goal: `Collect and aggregate contact data from multiple CRM sources`,
879
1000
  model: 'openai-gpt-4-1',
880
1001
  mcpServer: 'Data Processing MCP',
881
- tools: ["API Connector", "Data Parser"],
1002
+ tools: ['API Connector', 'Data Parser'],
882
1003
  trigger: 'Schedule: Daily at 2:00 AM',
883
1004
  approval: 'auto',
884
1005
  },
@@ -889,7 +1010,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
889
1010
  goal: `Analyze collected data and identify patterns and duplicates`,
890
1011
  model: 'anthropic-claude-opus-4',
891
1012
  mcpServer: 'Analytics MCP',
892
- tools: ["Statistical Analysis", "ML Predictor", "Deduplicator"],
1013
+ tools: ['Statistical Analysis', 'ML Predictor', 'Deduplicator'],
893
1014
  trigger: 'On completion of Data Collector',
894
1015
  approval: 'manual',
895
1016
  },
@@ -900,7 +1021,7 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
900
1021
  goal: `Write cleaned and merged contacts back to the CRM systems`,
901
1022
  model: 'openai-gpt-4-1',
902
1023
  mcpServer: 'CRM Write MCP',
903
- tools: ["Salesforce Connector", "HubSpot Connector"],
1024
+ tools: ['Salesforce Connector', 'HubSpot Connector'],
904
1025
  trigger: 'On completion of Analyzer',
905
1026
  approval: 'manual',
906
1027
  },
@@ -911,51 +1032,48 @@ export const SYNC_CRM_CONTACTS_TEAM_SPEC_0_0_1 = {
911
1032
  goal: `Generate sync summary reports and send notifications`,
912
1033
  model: 'openai-gpt-4-1',
913
1034
  mcpServer: 'Document Generation MCP',
914
- tools: ["PDF Generator", "Chart Builder", "Email Sender"],
1035
+ tools: ['PDF Generator', 'Chart Builder', 'Email Sender'],
915
1036
  trigger: 'On completion of Sync Writer',
916
1037
  approval: 'auto',
917
1038
  },
918
1039
  ],
919
1040
  reactionRules: [
920
1041
  {
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
- }
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
+ },
938
1059
  ],
939
1060
  healthMonitoring: {
940
- "heartbeatInterval": "30s",
941
- "staleThreshold": "120s",
942
- "unresponsiveThreshold": "300s",
943
- "stuckThreshold": "600s",
944
- "maxRestartAttempts": 3
1061
+ heartbeatInterval: '30s',
1062
+ staleThreshold: '120s',
1063
+ unresponsiveThreshold: '300s',
1064
+ stuckThreshold: '600s',
1065
+ maxRestartAttempts: 3,
945
1066
  },
946
1067
  notifications: {
947
- "on_start": false,
948
- "on_completion": true,
949
- "on_failure": true,
950
- "on_escalation": false
1068
+ on_start: false,
1069
+ on_completion: true,
1070
+ on_failure: true,
1071
+ on_escalation: false,
951
1072
  },
952
1073
  output: {
953
- "formats": [
954
- "json",
955
- "csv"
956
- ],
957
- "template": "CRM Sync Summary",
958
- "storage": "s3://reports/crm-sync/"
1074
+ formats: ['json', 'csv'],
1075
+ template: 'CRM Sync Summary',
1076
+ storage: 's3://reports/crm-sync/',
959
1077
  },
960
1078
  };
961
1079
  // ============================================================================
@@ -996,5 +1114,7 @@ export function getTeamSpec(teamId) {
996
1114
  */
997
1115
  export function listTeamSpecs(prefix) {
998
1116
  const specs = Object.values(TEAM_SPECS);
999
- return prefix !== undefined ? specs.filter(s => s.id.startsWith(prefix)) : specs;
1117
+ return prefix !== undefined
1118
+ ? specs.filter(s => s.id.startsWith(prefix))
1119
+ : specs;
1000
1120
  }