@datalayer/agent-runtimes 1.0.19 → 1.0.21
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.
- package/README.md +11 -3
- package/lib/AgentNode.js +141 -40
- package/lib/App.js +2 -2
- package/lib/agent-node/AgentNodeGallery.js +188 -25
- package/lib/api/runtimes/runtimes.d.ts +57 -0
- package/lib/api/runtimes/runtimes.js +55 -1
- package/lib/chat/Chat.d.ts +1 -1
- package/lib/chat/Chat.js +2 -2
- package/lib/chat/base/ChatBase.js +50 -13
- package/lib/chat/document/EphemeralDocument.d.ts +5 -1
- package/lib/chat/document/EphemeralDocument.js +7 -5
- package/lib/chat/header/ChatHeaderBase.d.ts +3 -1
- package/lib/chat/header/ChatHeaderBase.js +5 -3
- package/lib/chat/messages/ChatMessageList.d.ts +19 -0
- package/lib/chat/messages/ChatMessageList.js +180 -9
- package/lib/chat/notebook/EphemeralNotebook.d.ts +5 -1
- package/lib/chat/notebook/EphemeralNotebook.js +9 -6
- package/lib/chat/prompt/InputPrompt.js +1 -1
- package/lib/chat/tools/SubagentActivity.d.ts +20 -0
- package/lib/chat/tools/SubagentActivity.js +154 -0
- package/lib/chat/tools/index.d.ts +1 -0
- package/lib/chat/tools/index.js +1 -0
- package/lib/chat/usage/TokenUsageBar.js +3 -3
- package/lib/client/AgentRuntimesClient.d.ts +5 -0
- package/lib/client/AgentsMixin.js +3 -1
- package/lib/client/mixins/RuntimesMixin.d.ts +12 -0
- package/lib/client/mixins/RuntimesMixin.js +24 -1
- package/lib/components/AgentSummary.d.ts +1 -0
- package/lib/components/AgentSummary.js +66 -10
- package/lib/components/runtimes/RuntimePickerBase.js +64 -29
- package/lib/components/runtimes/RuntimePickerCell.js +1 -1
- package/lib/components/runtimes/RuntimePickerNotebook.js +1 -1
- package/lib/components/runtimes/RuntimeSimplePicker.js +3 -2
- package/lib/components/runtimes/RuntimeUtils.js +2 -2
- package/lib/context/GraphFlowChart.js +1 -1
- package/lib/context/TokenUsageChart.js +1 -1
- package/lib/context/TurnGraphChart.js +2 -2
- package/lib/examples/A2UiAgentExample.js +4 -4
- package/lib/examples/A2UiComponentsGalleryExample.js +3 -3
- package/lib/examples/A2UiContactCardExample.js +3 -3
- package/lib/examples/A2UiRestaurantExample.js +2 -2
- package/lib/examples/A2UiViewerExample.js +3 -3
- package/lib/examples/AgUiAgenticExample.js +3 -3
- package/lib/examples/AgUiBackendToolRenderingExample.js +2 -2
- package/lib/examples/AgUiHaikuGenUiExample.js +3 -3
- package/lib/examples/AgUiHumanInTheLoopExample.js +5 -5
- package/lib/examples/AgUiSharedStateExample.js +3 -3
- package/lib/examples/AgUiToolsBasedGenUiExample.js +7 -5
- package/lib/examples/AgentCheckpointsExample.js +6 -5
- package/lib/examples/{AgentSandboxExample.d.ts → AgentCodeSandboxExample.d.ts} +4 -4
- package/lib/examples/{AgentSandboxExample.js → AgentCodeSandboxExample.js} +10 -9
- package/lib/examples/AgentCodeSandboxesExample.js +2 -2
- package/lib/examples/AgentCodemodeExample.js +3 -3
- package/lib/examples/AgentCompactionExample.d.ts +12 -0
- package/lib/examples/AgentCompactionExample.js +244 -0
- package/lib/examples/AgentEvalsExample.js +10 -20
- package/lib/examples/AgentGuardrailsExample.js +2 -2
- package/lib/examples/AgentHooksExample.js +1 -1
- package/lib/examples/AgentInferenceProviderExample.js +6 -8
- package/lib/examples/AgentLoopExample.js +3 -3
- package/lib/examples/AgentMCPExample.js +3 -3
- package/lib/examples/AgentMemoryExample.d.ts +4 -2
- package/lib/examples/AgentMemoryExample.js +93 -10
- package/lib/examples/AgentMonitoringExample.js +2 -2
- package/lib/examples/AgentNotificationsExample.js +1 -1
- package/lib/examples/AgentOtelExample.d.ts +2 -3
- package/lib/examples/AgentOtelExample.js +7 -12
- package/lib/examples/AgentOutputsExample.js +5 -5
- package/lib/examples/AgentParametersExample.js +3 -3
- package/lib/examples/AgentSkillsExample.js +4 -4
- package/lib/examples/AgentSubagentsExample.d.ts +2 -2
- package/lib/examples/AgentSubagentsExample.js +43 -34
- package/lib/examples/AgentToolApprovalsExample.js +1 -1
- package/lib/examples/AgentTriggersExample.js +9 -11
- package/lib/examples/AgentspecsExample.js +13 -5
- package/lib/examples/CellExample.d.ts +6 -0
- package/lib/examples/CellExample.js +84 -0
- package/lib/examples/ChatCustomExample.js +1 -1
- package/lib/examples/ChatExample.js +1 -1
- package/lib/examples/ChatStandaloneExample.js +2 -2
- package/lib/examples/HomeExample.js +29 -28
- package/lib/examples/Lexical2Example.js +2 -2
- package/lib/examples/LexicalAgentExample.js +1 -1
- package/lib/examples/LexicalAgentSidebarExample.js +2 -2
- package/lib/examples/NotebookAgentSidebarExample.d.ts +1 -1
- package/lib/examples/NotebookAgentSidebarExample.js +5 -4
- package/lib/examples/NotebookCollaborationExample.js +3 -3
- package/lib/examples/NotebookExample.js +2 -2
- package/lib/examples/components/ExampleWrapper.js +5 -0
- package/lib/examples/components/Header.js +2 -2
- package/lib/examples/components/HeaderControls.js +1 -1
- package/lib/examples/components/LexicalEditor.js +1 -1
- package/lib/examples/components/MainContent.js +1 -1
- package/lib/examples/components/MockFileBrowser.js +8 -8
- package/lib/examples/components/TimeTravel.js +1 -1
- package/lib/examples/components/haiku/HaikuDisplay.js +2 -2
- package/lib/examples/example-selector.js +4 -3
- package/lib/examples/hooks/useExampleAgentRuntime.js +11 -1
- package/lib/examples/hooks/useExampleAgentRuntimes.d.ts +7 -0
- package/lib/examples/hooks/useExampleAgentRuntimes.js +82 -0
- package/lib/examples/index.d.ts +2 -1
- package/lib/examples/index.js +2 -1
- package/lib/examples/main.js +359 -46
- package/lib/examples/utils/agentSummaryStore.d.ts +17 -0
- package/lib/examples/utils/themedProvider.js +32 -2
- package/lib/examples/utils/useExampleAgentRuntimesUrl.js +2 -1
- package/lib/examples2/NotebookMutationsKernel.js +6 -3
- package/lib/examples2/NotebookMutationsServiceManager.js +6 -3
- package/lib/examples2/ReactRouterExample.js +5 -5
- package/lib/examples2/main.js +38 -0
- package/lib/hooks/useAIAgentsWebSocket.js +35 -0
- package/lib/hooks/useAgentRuntimes.d.ts +22 -0
- package/lib/hooks/useAgentRuntimes.js +192 -5
- package/lib/hooks/useCheckpoints.js +2 -2
- package/lib/hooks/useToolApprovals.d.ts +10 -4
- package/lib/hooks/useToolApprovals.js +11 -5
- package/lib/models/Runtime.d.ts +10 -8
- package/lib/models/RuntimeDTO.d.ts +5 -3
- package/lib/models/RuntimeDTO.js +3 -3
- package/lib/runtimes/actions.js +3 -1
- package/lib/runtimes/apis.d.ts +7 -0
- package/lib/specs/agents/agents.d.ts +51 -0
- package/lib/specs/agents/agents.js +3389 -94
- package/lib/specs/models.d.ts +2 -0
- package/lib/specs/models.js +37 -0
- package/lib/stores/agentRuntimeStore.d.ts +32 -1
- package/lib/stores/agentRuntimeStore.js +65 -1
- package/lib/stores/index.d.ts +1 -1
- package/lib/stores/index.js +1 -1
- package/lib/types/agents.d.ts +9 -3
- package/lib/types/agentspecs.d.ts +2 -0
- package/lib/types/chat.d.ts +12 -0
- package/lib/types/models.d.ts +5 -0
- package/lib/types/stream.d.ts +58 -1
- package/package.json +4 -4
- package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
- package/scripts/codegen/generate_agents.py +7 -0
- package/scripts/codegen/generate_models.py +22 -9
- package/scripts/gen_workers.py +340 -0
- package/lib/examples/CellSimpleExample.d.ts +0 -6
- package/lib/examples/CellSimpleExample.js +0 -20
|
@@ -104,6 +104,11 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
|
|
|
104
104
|
else:
|
|
105
105
|
env_vars_formatted = "[]"
|
|
106
106
|
|
|
107
|
+
tokens_limit = spec.get("tokens_limit")
|
|
108
|
+
tokens_limit_formatted = (
|
|
109
|
+
str(tokens_limit) if tokens_limit is not None else "None"
|
|
110
|
+
)
|
|
111
|
+
|
|
107
112
|
lines.extend(
|
|
108
113
|
[
|
|
109
114
|
f"{const_name} = AIModel(",
|
|
@@ -114,6 +119,7 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
|
|
|
114
119
|
f' provider="{spec["provider"]}",',
|
|
115
120
|
f" default={spec.get('default', False)},",
|
|
116
121
|
f" required_env_vars={env_vars_formatted},",
|
|
122
|
+
f" tokens_limit={tokens_limit_formatted},",
|
|
117
123
|
")",
|
|
118
124
|
"",
|
|
119
125
|
]
|
|
@@ -288,20 +294,27 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
|
|
|
288
294
|
# Escape description for TypeScript
|
|
289
295
|
description = spec.get("description", "").replace("'", "\\'")
|
|
290
296
|
|
|
291
|
-
|
|
297
|
+
tokens_limit = spec.get("tokens_limit")
|
|
298
|
+
|
|
299
|
+
model_lines = [
|
|
300
|
+
f"export const {const_name}: AIModel = {{",
|
|
301
|
+
f" id: '{spec['id']}',",
|
|
302
|
+
f" version: '{spec['version']}',",
|
|
303
|
+
f" name: '{spec['name']}',",
|
|
304
|
+
f" description: '{description}',",
|
|
305
|
+
f" provider: '{spec['provider']}',",
|
|
306
|
+
f" default: {str(spec.get('default', False)).lower()},",
|
|
307
|
+
f" requiredEnvVars: {env_vars_formatted},",
|
|
308
|
+
]
|
|
309
|
+
if tokens_limit is not None:
|
|
310
|
+
model_lines.append(f" tokensLimit: {tokens_limit},")
|
|
311
|
+
model_lines.extend(
|
|
292
312
|
[
|
|
293
|
-
f"export const {const_name}: AIModel = {{",
|
|
294
|
-
f" id: '{spec['id']}',",
|
|
295
|
-
f" version: '{spec['version']}',",
|
|
296
|
-
f" name: '{spec['name']}',",
|
|
297
|
-
f" description: '{description}',",
|
|
298
|
-
f" provider: '{spec['provider']}',",
|
|
299
|
-
f" default: {str(spec.get('default', False)).lower()},",
|
|
300
|
-
f" requiredEnvVars: {env_vars_formatted},",
|
|
301
313
|
"};",
|
|
302
314
|
"",
|
|
303
315
|
]
|
|
304
316
|
)
|
|
317
|
+
lines.extend(model_lines)
|
|
305
318
|
|
|
306
319
|
# Generate catalog object
|
|
307
320
|
lines.extend(
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
# Copyright (c) 2025-2026 Datalayer, Inc.
|
|
2
|
+
# Distributed under the terms of the Modified BSD License.
|
|
3
|
+
"""One-off generator for the workers-* agent specs (9 verticals).
|
|
4
|
+
|
|
5
|
+
Creates one YAML spec per worker example from the Agent Workers portfolio.
|
|
6
|
+
Skips the three flagship workers that already exist as hand-authored specs.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
AGENTS_DIR = Path(__file__).resolve().parent.parent / "agentspecs" / "agentspecs" / "agents"
|
|
12
|
+
|
|
13
|
+
# Per-vertical defaults: label, emoji, icon, color, mcp servers, skills, envvars.
|
|
14
|
+
VERTICALS = {
|
|
15
|
+
"earth-observation": {
|
|
16
|
+
"emoji": "🛰️", "icon": "globe", "color": "#10B981",
|
|
17
|
+
"mcp": ["earthdata:0.0.1", "tavily:0.0.1"],
|
|
18
|
+
"skills": ["text-summarizer:0.0.1", "crawl:0.0.1"],
|
|
19
|
+
"envvars": ["TAVILY_API_KEY:0.0.1"],
|
|
20
|
+
},
|
|
21
|
+
"accounting": {
|
|
22
|
+
"emoji": "🧾", "icon": "credit-card", "color": "#F59E0B",
|
|
23
|
+
"mcp": ["odoo:0.0.1"],
|
|
24
|
+
"skills": ["accounting:0.0.1", "pdf:0.0.1"],
|
|
25
|
+
"envvars": [],
|
|
26
|
+
},
|
|
27
|
+
"energy": {
|
|
28
|
+
"emoji": "⚡", "icon": "zap", "color": "#EAB308",
|
|
29
|
+
"mcp": ["tavily:0.0.1", "chart:0.0.1"],
|
|
30
|
+
"skills": ["text-summarizer:0.0.1"],
|
|
31
|
+
"envvars": ["TAVILY_API_KEY:0.0.1"],
|
|
32
|
+
},
|
|
33
|
+
"insurance": {
|
|
34
|
+
"emoji": "🛡️", "icon": "shield", "color": "#EF4444",
|
|
35
|
+
"mcp": ["earthdata:0.0.1", "tavily:0.0.1"],
|
|
36
|
+
"skills": ["text-summarizer:0.0.1", "pdf:0.0.1"],
|
|
37
|
+
"envvars": ["TAVILY_API_KEY:0.0.1"],
|
|
38
|
+
},
|
|
39
|
+
"life-sciences": {
|
|
40
|
+
"emoji": "🧬", "icon": "beaker", "color": "#06B6D4",
|
|
41
|
+
"mcp": ["huggingface:0.0.1", "kaggle:0.0.1"],
|
|
42
|
+
"skills": ["text-summarizer:0.0.1", "pdf:0.0.1"],
|
|
43
|
+
"envvars": ["HF_TOKEN:0.0.1", "KAGGLE_TOKEN:0.0.1"],
|
|
44
|
+
},
|
|
45
|
+
"capital-markets": {
|
|
46
|
+
"emoji": "📈", "icon": "graph", "color": "#3B82F6",
|
|
47
|
+
"mcp": ["alphavantage:0.0.1", "chart:0.0.1"],
|
|
48
|
+
"skills": ["text-summarizer:0.0.1"],
|
|
49
|
+
"envvars": ["ALPHAVANTAGE_API_KEY:0.0.1"],
|
|
50
|
+
},
|
|
51
|
+
"personal-assistant": {
|
|
52
|
+
"emoji": "🤖", "icon": "person", "color": "#A855F7",
|
|
53
|
+
"mcp": ["tavily:0.0.1", "google-workspace:0.0.1"],
|
|
54
|
+
"skills": ["text-summarizer:0.0.1", "crawl:0.0.1", "events:0.0.1"],
|
|
55
|
+
"envvars": ["TAVILY_API_KEY:0.0.1"],
|
|
56
|
+
},
|
|
57
|
+
"marketing": {
|
|
58
|
+
"emoji": "📣", "icon": "megaphone", "color": "#8B5CF6",
|
|
59
|
+
"mcp": ["tavily:0.0.1", "slack:0.0.1"],
|
|
60
|
+
"skills": ["text-summarizer:0.0.1", "crawl:0.0.1", "events:0.0.1"],
|
|
61
|
+
"envvars": ["TAVILY_API_KEY:0.0.1", "SLACK_BOT_TOKEN:0.0.1"],
|
|
62
|
+
},
|
|
63
|
+
"market-analyst": {
|
|
64
|
+
"emoji": "🔎", "icon": "search", "color": "#EC4899",
|
|
65
|
+
"mcp": ["tavily:0.0.1", "salesforce:0.0.1"],
|
|
66
|
+
"skills": ["text-summarizer:0.0.1", "crawl:0.0.1"],
|
|
67
|
+
"envvars": ["TAVILY_API_KEY:0.0.1"],
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# worker slug -> (vertical, name, description, goal). Renamed flagships excluded.
|
|
72
|
+
WORKERS = {
|
|
73
|
+
# Earth Observation
|
|
74
|
+
"change-detection": ("earth-observation", "Change Detection Worker",
|
|
75
|
+
"Detects environmental and land-use change between satellite image time periods and produces evidence-backed change maps.",
|
|
76
|
+
"Compare imagery across time periods, detect meaningful land-use and environmental change, and deliver annotated maps and reports."),
|
|
77
|
+
"crop-monitoring": ("earth-observation", "Crop Monitoring Worker",
|
|
78
|
+
"Monitors crop health, growth stages, and field conditions using multi-temporal satellite imagery.",
|
|
79
|
+
"Track crop vigor and growth over time from satellite imagery and flag fields that need attention."),
|
|
80
|
+
"disaster-assessment": ("earth-observation", "Disaster Assessment Worker",
|
|
81
|
+
"Assesses affected areas after natural disasters by comparing pre- and post-event satellite imagery.",
|
|
82
|
+
"Rapidly estimate affected areas and damage extent after a disaster and produce a response-ready assessment."),
|
|
83
|
+
"infrastructure-monitoring": ("earth-observation", "Infrastructure Monitoring Worker",
|
|
84
|
+
"Monitors infrastructure and physical assets from satellite imagery and detects anomalies over time.",
|
|
85
|
+
"Continuously monitor infrastructure from satellite imagery and surface anomalies with supporting evidence."),
|
|
86
|
+
"environmental-compliance": ("earth-observation", "Environmental Compliance Worker",
|
|
87
|
+
"Tracks environmental compliance from Earth observation data and generates recurring, auditable reports.",
|
|
88
|
+
"Detect potential environmental compliance issues from EO data and produce traceable evidence-backed reports."),
|
|
89
|
+
# Accounting (Odoo)
|
|
90
|
+
"ap-invoice": ("accounting", "AP Invoice Worker",
|
|
91
|
+
"Extracts, codes, and matches supplier invoices to purchase orders and receipts in Odoo.",
|
|
92
|
+
"Extract and code supplier invoices, match them to POs and receipts, and prepare them for approval."),
|
|
93
|
+
"bank-reconciliation": ("accounting", "Bank Reconciliation Worker",
|
|
94
|
+
"Reconciles bank statements against the ledger, matches transactions, and investigates exceptions.",
|
|
95
|
+
"Reconcile bank feeds against the ledger, auto-match transactions, and flag exceptions for review."),
|
|
96
|
+
"month-end-close": ("accounting", "Month-End Close Worker",
|
|
97
|
+
"Prepares close checklists, suggests accruals, and reconciles intercompany balances for month-end close.",
|
|
98
|
+
"Drive the month-end close checklist, suggest accruals, and surface remaining reconciliation gaps."),
|
|
99
|
+
"collections": ("accounting", "Collections Worker",
|
|
100
|
+
"Follows up on overdue receivables and drafts collection communications for approval.",
|
|
101
|
+
"Prioritize overdue receivables and draft tailored collection follow-ups for human approval."),
|
|
102
|
+
"expense-audit": ("accounting", "Expense Audit Worker",
|
|
103
|
+
"Audits employee expenses for duplicates, anomalies, and policy violations.",
|
|
104
|
+
"Review expenses for duplicates, anomalies, and policy breaches, and summarize findings."),
|
|
105
|
+
"audit-pack-builder": ("accounting", "Audit-Pack Builder",
|
|
106
|
+
"Assembles auditable evidence packs from invoices, approvals, and postings across Odoo.",
|
|
107
|
+
"Assemble a complete, traceable audit-evidence pack for a given period or transaction set."),
|
|
108
|
+
# Energy and Utilities
|
|
109
|
+
"renewable-asset-performance": ("energy", "Renewable Asset Performance Worker",
|
|
110
|
+
"Compares expected versus actual generation, adjusts for weather, and investigates performance anomalies.",
|
|
111
|
+
"Compare expected vs actual generation, weather-adjust performance, and investigate underperformance."),
|
|
112
|
+
"grid-forecast": ("energy", "Grid Forecast Worker",
|
|
113
|
+
"Forecasts electricity demand and prices to support grid operations and planning.",
|
|
114
|
+
"Produce demand and price forecasts for grid operations with clear assumptions and confidence."),
|
|
115
|
+
"curtailment-investigator": ("energy", "Curtailment Investigator",
|
|
116
|
+
"Analyzes curtailment events, quantifies lost generation, and investigates root causes.",
|
|
117
|
+
"Investigate curtailment events, quantify lost generation, and explain the primary drivers."),
|
|
118
|
+
"energy-trading-analyst": ("energy", "Energy Trading Analyst",
|
|
119
|
+
"Analyzes power markets, price signals, and trading opportunities across energy markets.",
|
|
120
|
+
"Analyze power-market signals and surface evidence-backed trading opportunities and risks."),
|
|
121
|
+
"predictive-maintenance": ("energy", "Predictive Maintenance Worker",
|
|
122
|
+
"Detects equipment degradation and anomalies to predict failures and prioritize maintenance.",
|
|
123
|
+
"Detect degradation and anomalies, predict likely failures, and prioritize maintenance work."),
|
|
124
|
+
# Insurance
|
|
125
|
+
"cat-exposure": ("insurance", "CAT Exposure Worker",
|
|
126
|
+
"Geocodes insurance portfolios and overlays hazard data to analyze catastrophe exposure.",
|
|
127
|
+
"Geocode portfolios, overlay hazard layers, and quantify catastrophe exposure with lineage."),
|
|
128
|
+
"event-response": ("insurance", "Event Response Worker",
|
|
129
|
+
"Assesses live catastrophe events against insured portfolios to estimate exposure and losses.",
|
|
130
|
+
"Assess a live catastrophe event against the portfolio and publish an auditable exposure estimate."),
|
|
131
|
+
"portfolio-accumulation": ("insurance", "Portfolio Accumulation Worker",
|
|
132
|
+
"Analyzes accumulation and concentration risk across an insurance portfolio.",
|
|
133
|
+
"Analyze accumulation and concentration risk and highlight where limits are approached."),
|
|
134
|
+
"exposure-data-quality": ("insurance", "Exposure Data Quality Worker",
|
|
135
|
+
"Cleanses exposure data, validates geocoding, and improves data quality for risk analysis.",
|
|
136
|
+
"Cleanse and validate exposure data and geocoding, and report remaining data-quality gaps."),
|
|
137
|
+
"model-comparison": ("insurance", "Model Comparison Worker",
|
|
138
|
+
"Compares catastrophe models and scenarios and explains differences in loss drivers.",
|
|
139
|
+
"Compare catastrophe models and scenarios and explain the drivers behind divergent results."),
|
|
140
|
+
# Life Sciences
|
|
141
|
+
"rna-seq": ("life-sciences", "RNA-Seq Worker",
|
|
142
|
+
"Runs RNA-seq quality control and differential expression analysis with reproducible pipelines.",
|
|
143
|
+
"Run RNA-seq QC and differential expression analysis and produce reproducible, documented results."),
|
|
144
|
+
"variant-analysis": ("life-sciences", "Variant Analysis Worker",
|
|
145
|
+
"Analyzes genomic variants, annotates findings, and prepares interpretable reports.",
|
|
146
|
+
"Analyze and annotate genomic variants and produce an interpretable, provenance-tracked report."),
|
|
147
|
+
"single-cell-processing": ("life-sciences", "Single-Cell Processing Worker",
|
|
148
|
+
"Processes, clusters, and annotates single-cell datasets with reproducible workflows.",
|
|
149
|
+
"Process and cluster single-cell data and deliver annotated, reproducible outputs."),
|
|
150
|
+
"cohort-comparison": ("life-sciences", "Cohort Comparison Worker",
|
|
151
|
+
"Compares cohorts, validates statistical results, and checks reproducibility.",
|
|
152
|
+
"Compare cohorts, validate the statistics, and confirm results are reproducible."),
|
|
153
|
+
"pipeline-debugger": ("life-sciences", "Pipeline Debugger",
|
|
154
|
+
"Troubleshoots bioinformatics pipeline failures and suggests corrective actions.",
|
|
155
|
+
"Diagnose bioinformatics pipeline failures and recommend concrete fixes with evidence."),
|
|
156
|
+
"compute-cost-optimizer": ("life-sciences", "Compute-Cost Optimizer",
|
|
157
|
+
"Optimizes pipeline runtime and compute cost while preserving reproducibility.",
|
|
158
|
+
"Analyze pipeline runs and recommend runtime and cost optimizations without breaking reproducibility."),
|
|
159
|
+
# Capital Markets
|
|
160
|
+
"quant-research": ("capital-markets", "Quant Research Worker",
|
|
161
|
+
"Constructs datasets and researches factors for quantitative strategies with point-in-time care.",
|
|
162
|
+
"Construct clean datasets and research factors, respecting point-in-time correctness."),
|
|
163
|
+
"portfolio-risk": ("capital-markets", "Portfolio Risk Worker",
|
|
164
|
+
"Computes exposures and generates recurring, auditable portfolio risk reports.",
|
|
165
|
+
"Compute portfolio exposures and produce recurring, auditable risk reports."),
|
|
166
|
+
"backtest-auditor": ("capital-markets", "Backtest Auditor",
|
|
167
|
+
"Audits backtests for look-ahead leakage, survivorship bias, and methodological errors.",
|
|
168
|
+
"Audit a backtest for leakage, survivorship bias, and other flaws, and report findings."),
|
|
169
|
+
"factor-analysis": ("capital-markets", "Factor Analysis Worker",
|
|
170
|
+
"Analyzes factor exposures and returns across a portfolio or strategy.",
|
|
171
|
+
"Analyze factor exposures and returns and explain the primary contributors."),
|
|
172
|
+
"performance-attribution": ("capital-markets", "Performance Attribution Worker",
|
|
173
|
+
"Attributes portfolio performance to its underlying drivers and produces clear reports.",
|
|
174
|
+
"Attribute portfolio performance to its drivers and produce a clear, auditable report."),
|
|
175
|
+
"scenario-testing": ("capital-markets", "Scenario Testing Worker",
|
|
176
|
+
"Runs stress tests and scenario analysis to quantify portfolio sensitivity to shocks.",
|
|
177
|
+
"Run stress tests and scenarios and quantify portfolio sensitivity to defined shocks."),
|
|
178
|
+
# Personal Assistant (news-aggregator excluded, already exists)
|
|
179
|
+
"travel-recommender": ("personal-assistant", "Travel Recommender",
|
|
180
|
+
"Researches travel options and builds personalized itineraries with source comparison.",
|
|
181
|
+
"Research travel options and build a personalized itinerary, comparing sources and prices."),
|
|
182
|
+
"trends-seeker": ("personal-assistant", "Trends Seeker",
|
|
183
|
+
"Tracks emerging trends across sources and summarizes what is gaining momentum.",
|
|
184
|
+
"Track emerging trends across sources and summarize what is worth attention and why."),
|
|
185
|
+
"product-finder": ("personal-assistant", "Product Finder",
|
|
186
|
+
"Researches and compares products against a user's criteria and budget.",
|
|
187
|
+
"Research and compare products against the user's criteria and recommend the best fit."),
|
|
188
|
+
"job-hunter": ("personal-assistant", "Job Hunter",
|
|
189
|
+
"Searches for relevant jobs and prepares tailored application materials.",
|
|
190
|
+
"Find relevant roles and prepare tailored application materials for review."),
|
|
191
|
+
"coding-tutor": ("personal-assistant", "Coding Tutor",
|
|
192
|
+
"Teaches coding through interactive, executable exercises and step-by-step feedback.",
|
|
193
|
+
"Teach coding interactively with executable exercises and give clear, incremental feedback."),
|
|
194
|
+
"mail-triage": ("personal-assistant", "Mail Triage Worker",
|
|
195
|
+
"Classifies the inbox, drafts replies, and extracts follow-up tasks, with approval for sending.",
|
|
196
|
+
"Classify the inbox, draft replies, and extract tasks, requiring approval before sending anything."),
|
|
197
|
+
# Marketing (social-marketer excluded, already exists)
|
|
198
|
+
"campaign-planning": ("marketing", "Campaign Planning Worker",
|
|
199
|
+
"Plans content calendars and campaign tasks across channels.",
|
|
200
|
+
"Plan a content calendar and campaign tasks aligned to goals and channels."),
|
|
201
|
+
"content-repurposing": ("marketing", "Content Repurposing Worker",
|
|
202
|
+
"Adapts existing content and assets across channels and formats.",
|
|
203
|
+
"Repurpose existing content into channel-specific formats while keeping brand voice."),
|
|
204
|
+
"social-listening": ("marketing", "Social Listening Worker",
|
|
205
|
+
"Monitors conversations across platforms and surfaces actionable insights.",
|
|
206
|
+
"Monitor conversations at scale and surface actionable, evidence-backed insights."),
|
|
207
|
+
"community-response": ("marketing", "Community Response Worker",
|
|
208
|
+
"Triages comments and messages and drafts community replies for approval.",
|
|
209
|
+
"Triage community comments and draft on-brand replies for human approval."),
|
|
210
|
+
# Market Analyst (customer-interviewer excluded, already exists)
|
|
211
|
+
"interview-guide": ("market-analyst", "Interview Guide Worker",
|
|
212
|
+
"Generates research plans and structured interview guides from research objectives.",
|
|
213
|
+
"Turn research objectives into a structured research plan and interview guide."),
|
|
214
|
+
"research-recruiter": ("market-analyst", "Research Recruiter",
|
|
215
|
+
"Selects and schedules research participants and manages consent.",
|
|
216
|
+
"Select suitable participants, schedule sessions, and manage consent."),
|
|
217
|
+
"thematic-analysis": ("market-analyst", "Thematic Analysis Worker",
|
|
218
|
+
"Codes transcripts, extracts themes, and organizes qualitative evidence.",
|
|
219
|
+
"Code transcripts, extract themes, and organize the supporting evidence."),
|
|
220
|
+
"competitive-intelligence": ("market-analyst", "Competitive Intelligence Worker",
|
|
221
|
+
"Researches competitors and market dynamics and synthesizes findings.",
|
|
222
|
+
"Research competitors and market dynamics and synthesize evidence-backed findings."),
|
|
223
|
+
"evidence-repository": ("market-analyst", "Evidence Repository Worker",
|
|
224
|
+
"Organizes research evidence for traceability from qualitative findings to conclusions.",
|
|
225
|
+
"Organize research evidence so every conclusion traces back to its source."),
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
TEMPLATE = """# Copyright (c) 2025-2026 Datalayer, Inc.
|
|
229
|
+
# Distributed under the terms of the Modified BSD License.
|
|
230
|
+
|
|
231
|
+
# Agent Specification: {name}
|
|
232
|
+
# {vertical_label} vertical worker.
|
|
233
|
+
|
|
234
|
+
id: workers-{slug}
|
|
235
|
+
version: 0.0.1
|
|
236
|
+
name: {name}
|
|
237
|
+
domain: {vertical}
|
|
238
|
+
description: >-
|
|
239
|
+
{description}
|
|
240
|
+
|
|
241
|
+
tags:
|
|
242
|
+
{tags}
|
|
243
|
+
|
|
244
|
+
enabled: true
|
|
245
|
+
model: "bedrock:us.anthropic.claude-sonnet-4-6"
|
|
246
|
+
|
|
247
|
+
sandbox_variant: jupyter
|
|
248
|
+
|
|
249
|
+
# Durable memory to retain context across sessions
|
|
250
|
+
memory: mem0
|
|
251
|
+
|
|
252
|
+
# MCP servers used by this agent
|
|
253
|
+
mcp_servers:
|
|
254
|
+
{mcp}
|
|
255
|
+
|
|
256
|
+
# Skills available to this agent
|
|
257
|
+
skills:
|
|
258
|
+
{skills}
|
|
259
|
+
|
|
260
|
+
# Runtime tools — sensitive actions require human approval
|
|
261
|
+
tools:
|
|
262
|
+
- runtime-echo:0.0.1
|
|
263
|
+
- runtime-sensitive-echo:0.0.1
|
|
264
|
+
frontend_tools:
|
|
265
|
+
- jupyter-notebook:0.0.1
|
|
266
|
+
- lexical-document:0.0.1
|
|
267
|
+
{envvars}
|
|
268
|
+
# Runtime environment
|
|
269
|
+
environment_name: ai-agents-env
|
|
270
|
+
|
|
271
|
+
# UI customization
|
|
272
|
+
icon: {icon}
|
|
273
|
+
emoji: "{emoji}"
|
|
274
|
+
color: "{color}"
|
|
275
|
+
|
|
276
|
+
# Goal / Prompt (Step 4 in the UI — the user-facing objective)
|
|
277
|
+
goal: >-
|
|
278
|
+
{goal}
|
|
279
|
+
|
|
280
|
+
# Protocols & UI Extensions
|
|
281
|
+
protocol: vercel-ai
|
|
282
|
+
ui_extension: a2ui
|
|
283
|
+
|
|
284
|
+
# Model configuration
|
|
285
|
+
model_config:
|
|
286
|
+
temperature: 0.5
|
|
287
|
+
max_tokens: 4096
|
|
288
|
+
|
|
289
|
+
# Codemode
|
|
290
|
+
codemode:
|
|
291
|
+
enabled: true
|
|
292
|
+
|
|
293
|
+
# System prompt
|
|
294
|
+
system_prompt: >-
|
|
295
|
+
{system_prompt}
|
|
296
|
+
"""
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def yaml_list(items):
|
|
300
|
+
return "\n".join(f" - {i}" for i in items)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
def main():
|
|
304
|
+
written = 0
|
|
305
|
+
for slug, (vertical, name, description, goal) in WORKERS.items():
|
|
306
|
+
cfg = VERTICALS[vertical]
|
|
307
|
+
tags = [vertical, "agent-worker"]
|
|
308
|
+
envvars_block = ""
|
|
309
|
+
if cfg["envvars"]:
|
|
310
|
+
envvars_block = "\n# Secrets / environment variables\nenvvars:\n" + yaml_list(cfg["envvars"]) + "\n"
|
|
311
|
+
system_prompt = (
|
|
312
|
+
f"You are the {name}, an autonomous agent worker in the "
|
|
313
|
+
f"{vertical.replace('-', ' ')} domain. {description} "
|
|
314
|
+
"Work step by step, show your reasoning and evidence, and require "
|
|
315
|
+
"explicit human approval before any external or irreversible action."
|
|
316
|
+
)
|
|
317
|
+
content = TEMPLATE.format(
|
|
318
|
+
name=name,
|
|
319
|
+
slug=slug,
|
|
320
|
+
vertical=vertical,
|
|
321
|
+
vertical_label=vertical.replace("-", " ").title(),
|
|
322
|
+
description=description,
|
|
323
|
+
tags=yaml_list(tags),
|
|
324
|
+
mcp=yaml_list(cfg["mcp"]),
|
|
325
|
+
skills=yaml_list(cfg["skills"]),
|
|
326
|
+
envvars=envvars_block,
|
|
327
|
+
icon=cfg["icon"],
|
|
328
|
+
emoji=cfg["emoji"],
|
|
329
|
+
color=cfg["color"],
|
|
330
|
+
goal=goal,
|
|
331
|
+
system_prompt=system_prompt,
|
|
332
|
+
)
|
|
333
|
+
path = AGENTS_DIR / f"workers-{slug}.yaml"
|
|
334
|
+
path.write_text(content, encoding="utf-8")
|
|
335
|
+
written += 1
|
|
336
|
+
print(f"Wrote {written} worker specs to {AGENTS_DIR}")
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
if __name__ == "__main__":
|
|
340
|
+
main()
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ServiceManager } from '@jupyterlab/services';
|
|
2
|
-
type IJupyterCellExampleProps = {
|
|
3
|
-
serviceManager?: ServiceManager.IManager;
|
|
4
|
-
};
|
|
5
|
-
export declare const JupyterCellExample: (props: IJupyterCellExampleProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default JupyterCellExample;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Cell, KernelIndicator, useJupyter, useKernelsStore, useCellsStore, } from '@datalayer/jupyter-react';
|
|
3
|
-
import { ThemedJupyterProvider } from './utils/themedProvider';
|
|
4
|
-
import { Button, Label } from '@primer/react';
|
|
5
|
-
import { Box } from '@datalayer/primer-addons';
|
|
6
|
-
const CELL_ID = 'cell-example-1';
|
|
7
|
-
const DEFAULT_SOURCE = `from IPython.display import display
|
|
8
|
-
|
|
9
|
-
for i in range(10):
|
|
10
|
-
display('I am a long string which is repeatedly added to the dom in separated divs: %d' % i)`;
|
|
11
|
-
const JupyterCellExampleContent = () => {
|
|
12
|
-
const { defaultKernel } = useJupyter({ startDefaultKernel: true });
|
|
13
|
-
const cellsStore = useCellsStore();
|
|
14
|
-
const kernelsStore = useKernelsStore();
|
|
15
|
-
return (_jsxs(Box, { p: 4, children: [_jsx(Box, { as: "h1", children: "Jupyter Cell Example" }), _jsxs(Box, { children: ["Source: ", cellsStore.getSource(CELL_ID)] }), _jsxs(Box, { children: ["Outputs Count: ", cellsStore.getOutputsCount(CELL_ID)] }), _jsxs(Box, { children: ["Kernel State:", ' ', _jsx(Label, { children: defaultKernel && kernelsStore.getExecutionState(defaultKernel.id) })] }), _jsxs(Box, { children: ["Kernel Phase:", ' ', _jsx(Label, { children: defaultKernel && kernelsStore.getExecutionPhase(defaultKernel.id) })] }), _jsxs(Box, { display: "flex", children: [_jsx(Box, { children: "Kernel Indicator:" }), _jsx(Box, { ml: 3, children: _jsx(KernelIndicator, { kernel: defaultKernel && defaultKernel.connection }) })] }), _jsx(Box, { children: _jsx(Button, { onClick: () => cellsStore.execute(CELL_ID), children: "Run cell" }) }), _jsx(Cell, { source: DEFAULT_SOURCE, id: CELL_ID, kernel: defaultKernel })] }));
|
|
16
|
-
};
|
|
17
|
-
export const JupyterCellExample = (props) => {
|
|
18
|
-
return (_jsx(ThemedJupyterProvider, { children: _jsx(JupyterCellExampleContent, {}) }));
|
|
19
|
-
};
|
|
20
|
-
export default JupyterCellExample;
|