@datalayer/agent-runtimes 0.0.10 → 0.0.11

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 (36) hide show
  1. package/lib/components/AgentConfiguration.d.ts +30 -0
  2. package/lib/components/AgentConfiguration.js +71 -16
  3. package/lib/components/chat/components/AgentDetails.js +159 -1
  4. package/lib/components/chat/components/ContextDistribution.js +2 -2
  5. package/lib/components/chat/components/ContextInspector.js +4 -2
  6. package/lib/components/chat/components/ContextPanel.js +1 -6
  7. package/lib/components/index.d.ts +2 -2
  8. package/lib/components/index.js +1 -1
  9. package/lib/config/agents/code-ai/agents.d.ts +25 -0
  10. package/lib/config/agents/code-ai/agents.js +70 -0
  11. package/lib/config/agents/code-ai/index.d.ts +1 -0
  12. package/lib/config/agents/code-ai/index.js +5 -0
  13. package/lib/config/{agents.d.ts → agents/codemode-paper/agents.d.ts} +1 -5
  14. package/lib/config/{agents.js → agents/codemode-paper/agents.js} +29 -165
  15. package/lib/config/agents/codemode-paper/index.d.ts +1 -0
  16. package/lib/config/agents/codemode-paper/index.js +5 -0
  17. package/lib/config/agents/datalayer-ai/agents.d.ts +29 -0
  18. package/lib/config/agents/datalayer-ai/agents.js +267 -0
  19. package/lib/config/agents/datalayer-ai/index.d.ts +1 -0
  20. package/lib/config/agents/datalayer-ai/index.js +5 -0
  21. package/lib/config/agents/index.d.ts +19 -0
  22. package/lib/config/agents/index.js +38 -0
  23. package/lib/config/envvars.d.ts +28 -0
  24. package/lib/config/envvars.js +115 -0
  25. package/lib/config/index.d.ts +1 -0
  26. package/lib/config/index.js +1 -0
  27. package/lib/config/mcpServers.js +26 -2
  28. package/lib/config/skills.d.ts +2 -0
  29. package/lib/config/skills.js +6 -0
  30. package/lib/examples/AgentSpaceFormExample.js +51 -9
  31. package/lib/types.d.ts +10 -2
  32. package/package.json +2 -2
  33. package/scripts/codegen/generate_agents.py +565 -154
  34. package/scripts/codegen/generate_envvars.py +302 -0
  35. package/scripts/codegen/generate_mcp_servers.py +28 -16
  36. package/scripts/codegen/generate_skills.py +19 -6
@@ -5,16 +5,12 @@
5
5
  * THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.
6
6
  * Generated from YAML specifications in specs/agents/
7
7
  */
8
- import type { AgentSpec } from '../types';
9
- export declare const CRAWLER_MCP_AGENT_SPEC: AgentSpec;
8
+ import type { AgentSpec } from '../../../types';
10
9
  export declare const CRAWLER_AGENT_SPEC: AgentSpec;
11
10
  export declare const DATA_ACQUISITION_AGENT_SPEC: AgentSpec;
12
11
  export declare const FINANCIAL_VIZ_AGENT_SPEC: AgentSpec;
13
- export declare const FINANCIAL_AGENT_SPEC: AgentSpec;
14
- export declare const GITHUB_AGENT_MCP_AGENT_SPEC: AgentSpec;
15
12
  export declare const GITHUB_AGENT_SPEC: AgentSpec;
16
13
  export declare const INFORMATION_ROUTING_AGENT_SPEC: AgentSpec;
17
- export declare const SIMPLE_AGENT_SPEC: AgentSpec;
18
14
  export declare const AGENT_SPECS: Record<string, AgentSpec>;
19
15
  /**
20
16
  * Get an agent specification by ID.
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) 2025-2026 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- import { ALPHAVANTAGE_MCP_SERVER, CHART_MCP_SERVER, FILESYSTEM_MCP_SERVER, GITHUB_MCP_SERVER, GOOGLE_WORKSPACE_MCP_SERVER, KAGGLE_MCP_SERVER, SLACK_MCP_SERVER, TAVILY_MCP_SERVER, } from './mcpServers';
6
- import { CRAWL_SKILL_SPEC, GITHUB_SKILL_SPEC, PDF_SKILL_SPEC } from './skills';
5
+ import { ALPHAVANTAGE_MCP_SERVER, CHART_MCP_SERVER, FILESYSTEM_MCP_SERVER, GITHUB_MCP_SERVER, GOOGLE_WORKSPACE_MCP_SERVER, KAGGLE_MCP_SERVER, SLACK_MCP_SERVER, TAVILY_MCP_SERVER, } from '../../mcpServers';
6
+ import { GITHUB_SKILL_SPEC } from '../../skills';
7
7
  // ============================================================================
8
8
  // MCP Server Lookup
9
9
  // ============================================================================
@@ -21,9 +21,7 @@ const MCP_SERVER_MAP = {
21
21
  * Map skill IDs to SkillSpec objects, converting to AgentSkillSpec shape.
22
22
  */
23
23
  const SKILL_MAP = {
24
- crawl: CRAWL_SKILL_SPEC,
25
24
  github: GITHUB_SKILL_SPEC,
26
- pdf: PDF_SKILL_SPEC,
27
25
  };
28
26
  function toAgentSkillSpec(skill) {
29
27
  return {
@@ -39,55 +37,19 @@ function toAgentSkillSpec(skill) {
39
37
  // ============================================================================
40
38
  // Agent Specs
41
39
  // ============================================================================
42
- export const CRAWLER_MCP_AGENT_SPEC = {
43
- id: 'crawler-mcp',
44
- name: 'Crawler Agent (MCP)',
45
- description: `Web crawling and research agent that searches the web and GitHub repositories for information.`,
46
- tags: ['web', 'search', 'research', 'crawler', 'github'],
47
- enabled: false,
48
- mcpServers: [MCP_SERVER_MAP['tavily'], MCP_SERVER_MAP['github']],
49
- skills: [],
50
- environmentName: 'ai-agents-env',
51
- icon: 'globe',
52
- color: '#10B981',
53
- suggestions: [
54
- 'Search the web for recent news about AI agents',
55
- 'Find trending open-source Python projects on GitHub',
56
- 'Research best practices for building RAG applications',
57
- 'Compare popular JavaScript frameworks in 2024',
58
- ],
59
- systemPrompt: `You are a web crawling and research assistant with access to Tavily search and GitHub tools. Use Tavily to search the web for current information and search GitHub repositories for relevant projects. Synthesize information from multiple sources and provide clear summaries with sources cited.
60
- `,
61
- systemPromptCodemode: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
62
- ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
63
- Use this to see what MCP servers you can access.
64
-
65
- 2. **search_tools** - Progressive tool discovery by natural language query
66
- Use this to find relevant tools before executing tasks.
67
-
68
- 3. **get_tool_details** - Get full tool schema and documentation
69
- Use this to understand tool parameters before calling them.
70
-
71
- 4. **execute_code** - Run Python code that composes multiple tools
72
- Use this for complex multi-step operations. Code runs in a PERSISTENT sandbox.
73
- Variables, functions, and state PERSIST between execute_code calls.
74
- Import tools using: \`from generated.servers.<server_name> import <function_name>\`
75
- NEVER use \`import *\` - always use explicit named imports.
76
-
77
- ## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check parameters 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
78
- ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
79
- `,
80
- };
40
+ // Codemode Paper Agents
41
+ // ============================================================================
81
42
  export const CRAWLER_AGENT_SPEC = {
82
- id: 'crawler',
43
+ id: 'codemode-paper/crawler',
83
44
  name: 'Crawler Agent',
84
45
  description: `Web crawling and research agent that searches the web and GitHub repositories for information.`,
85
46
  tags: ['web', 'search', 'research', 'crawler', 'github'],
86
47
  enabled: false,
87
- mcpServers: [MCP_SERVER_MAP['tavily']],
88
- skills: [toAgentSkillSpec(SKILL_MAP['github'])],
48
+ mcpServers: [MCP_SERVER_MAP['tavily'], MCP_SERVER_MAP['github']],
49
+ skills: [],
89
50
  environmentName: 'ai-agents-env',
90
51
  icon: 'globe',
52
+ emoji: '🌐',
91
53
  color: '#10B981',
92
54
  suggestions: [
93
55
  'Search the web for recent news about AI agents',
@@ -97,7 +59,7 @@ export const CRAWLER_AGENT_SPEC = {
97
59
  ],
98
60
  systemPrompt: `You are a web crawling and research assistant with access to Tavily search and GitHub tools. Use Tavily to search the web for current information and search GitHub repositories for relevant projects. Synthesize information from multiple sources and provide clear summaries with sources cited.
99
61
  `,
100
- systemPromptCodemode: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
62
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
101
63
  ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
102
64
  Use this to see what MCP servers you can access.
103
65
 
@@ -118,7 +80,7 @@ export const CRAWLER_AGENT_SPEC = {
118
80
  `,
119
81
  };
120
82
  export const DATA_ACQUISITION_AGENT_SPEC = {
121
- id: 'data-acquisition',
83
+ id: 'codemode-paper/data-acquisition',
122
84
  name: 'Data Acquisition Agent',
123
85
  description: `Acquires and manages data from various sources including Kaggle datasets and local filesystem operations.`,
124
86
  tags: ['data', 'acquisition', 'kaggle', 'filesystem'],
@@ -131,6 +93,7 @@ export const DATA_ACQUISITION_AGENT_SPEC = {
131
93
  skills: [toAgentSkillSpec(SKILL_MAP['github'])],
132
94
  environmentName: 'ai-agents-env',
133
95
  icon: 'database',
96
+ emoji: '📊',
134
97
  color: '#3B82F6',
135
98
  suggestions: [
136
99
  'Find popular machine learning datasets on Kaggle',
@@ -140,7 +103,7 @@ export const DATA_ACQUISITION_AGENT_SPEC = {
140
103
  ],
141
104
  systemPrompt: `You are a data acquisition specialist with access to Kaggle datasets and filesystem tools. You can search for datasets, download data, read and write files, and help users prepare data for analysis. Guide users through finding relevant datasets and organizing their workspace efficiently.
142
105
  `,
143
- systemPromptCodemode: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
106
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
144
107
  ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
145
108
  Use this to see what MCP servers you can access.
146
109
 
@@ -161,8 +124,8 @@ export const DATA_ACQUISITION_AGENT_SPEC = {
161
124
  `,
162
125
  };
163
126
  export const FINANCIAL_VIZ_AGENT_SPEC = {
164
- id: 'financial-viz',
165
- name: 'Financial Visualization Agent (Viz)',
127
+ id: 'codemode-paper/financial-viz',
128
+ name: 'Financial Visualization Agent',
166
129
  description: `Analyzes financial market data and creates visualizations and charts.`,
167
130
  tags: ['finance', 'stocks', 'visualization', 'charts'],
168
131
  enabled: false,
@@ -170,6 +133,7 @@ export const FINANCIAL_VIZ_AGENT_SPEC = {
170
133
  skills: [],
171
134
  environmentName: 'ai-agents-env',
172
135
  icon: 'trending-up',
136
+ emoji: '📈',
173
137
  color: '#F59E0B',
174
138
  suggestions: [
175
139
  'Show me the stock price history for AAPL',
@@ -179,7 +143,7 @@ export const FINANCIAL_VIZ_AGENT_SPEC = {
179
143
  ],
180
144
  systemPrompt: `You are a financial market analyst with access to Alpha Vantage market data and chart generation tools. You can fetch stock prices, analyze trading volumes, create visualizations, and track market trends. Provide clear insights with relevant data points and generate charts to illustrate patterns.
181
145
  `,
182
- systemPromptCodemode: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
146
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
183
147
  ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
184
148
  Use this to see what MCP servers you can access.
185
149
 
@@ -199,47 +163,8 @@ export const FINANCIAL_VIZ_AGENT_SPEC = {
199
163
  ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
200
164
  `,
201
165
  };
202
- export const FINANCIAL_AGENT_SPEC = {
203
- id: 'financial',
204
- name: 'Financial Visualization Agent',
205
- description: `Analyzes financial market data and creates visualizations and charts.`,
206
- tags: ['finance', 'stocks', 'visualization', 'charts'],
207
- enabled: false,
208
- mcpServers: [MCP_SERVER_MAP['alphavantage']],
209
- skills: [],
210
- environmentName: 'ai-agents-env',
211
- icon: 'trending-up',
212
- color: '#F59E0B',
213
- suggestions: [
214
- 'Show me the stock price history for AAPL',
215
- 'Create a chart comparing MSFT and GOOGL over the last year',
216
- 'Analyze the trading volume trends for Tesla',
217
- 'Get the latest market news for tech stocks',
218
- ],
219
- systemPrompt: `You are a financial market analyst with access to Alpha Vantage market data tools. You can fetch stock prices, analyze trading volumes, create visualizations, and track market trends. Provide clear insights with relevant data points and suggest visualization approaches when appropriate.
220
- `,
221
- systemPromptCodemode: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
222
- ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
223
- Use this to see what MCP servers you can access.
224
-
225
- 2. **search_tools** - Progressive tool discovery by natural language query
226
- Use this to find relevant tools before executing tasks.
227
-
228
- 3. **get_tool_details** - Get full tool schema and documentation
229
- Use this to understand tool parameters before calling them.
230
-
231
- 4. **execute_code** - Run Python code that composes multiple tools
232
- Use this for complex multi-step operations. Code runs in a PERSISTENT sandbox.
233
- Variables, functions, and state PERSIST between execute_code calls.
234
- Import tools using: \`from generated.servers.<server_name> import <function_name>\`
235
- NEVER use \`import *\` - always use explicit named imports.
236
-
237
- ## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check parameters 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
238
- ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
239
- `,
240
- };
241
- export const GITHUB_AGENT_MCP_AGENT_SPEC = {
242
- id: 'github-agent-mcp',
166
+ export const GITHUB_AGENT_SPEC = {
167
+ id: 'codemode-paper/github-agent',
243
168
  name: 'GitHub Agent',
244
169
  description: `Manages GitHub repositories, issues, and pull requests with email notification capabilities.`,
245
170
  tags: ['github', 'git', 'code', 'email'],
@@ -248,6 +173,7 @@ export const GITHUB_AGENT_MCP_AGENT_SPEC = {
248
173
  skills: [],
249
174
  environmentName: 'ai-agents-env',
250
175
  icon: 'git-branch',
176
+ emoji: '🐙',
251
177
  color: '#6366F1',
252
178
  suggestions: [
253
179
  'List my open pull requests across all repositories',
@@ -257,46 +183,7 @@ export const GITHUB_AGENT_MCP_AGENT_SPEC = {
257
183
  ],
258
184
  systemPrompt: `You are a GitHub assistant with access to GitHub repository tools and Google Workspace for email notifications. You can list and search repositories, issues, and pull requests, create new issues, review PRs, search code, and send email notifications. Always confirm repository names before creating issues/PRs and provide clear summaries when listing multiple items.
259
185
  `,
260
- systemPromptCodemode: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
261
- ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
262
- Use this to see what MCP servers you can access.
263
-
264
- 2. **search_tools** - Progressive tool discovery by natural language query
265
- Use this to find relevant tools before executing tasks.
266
-
267
- 3. **get_tool_details** - Get full tool schema and documentation
268
- Use this to understand tool parameters before calling them.
269
-
270
- 4. **execute_code** - Run Python code that composes multiple tools
271
- Use this for complex multi-step operations. Code runs in a PERSISTENT sandbox.
272
- Variables, functions, and state PERSIST between execute_code calls.
273
- Import tools using: \`from generated.servers.<server_name> import <function_name>\`
274
- NEVER use \`import *\` - always use explicit named imports.
275
-
276
- ## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check parameters 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
277
- ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
278
- `,
279
- };
280
- export const GITHUB_AGENT_SPEC = {
281
- id: 'github-agent',
282
- name: 'GitHub Agent',
283
- description: `Manages GitHub repositories, issues, and pull requests with email notification capabilities.`,
284
- tags: ['github', 'git', 'code', 'email'],
285
- enabled: false,
286
- mcpServers: [MCP_SERVER_MAP['google-workspace']],
287
- skills: [toAgentSkillSpec(SKILL_MAP['github'])],
288
- environmentName: 'ai-agents-env',
289
- icon: 'git-branch',
290
- color: '#6366F1',
291
- suggestions: [
292
- 'List my open pull requests across all repositories',
293
- 'Create an issue for a bug I found in datalayer/ui',
294
- 'Show recent commits on the main branch',
295
- 'Search for repositories related to Jupyter notebooks',
296
- ],
297
- systemPrompt: `You are a GitHub assistant with access to GitHub skills and Google Workspace for email notifications. You can list and search repositories, issues, and pull requests, create new issues, review PRs, search code, and send email notifications. Always confirm repository names before creating issues/PRs and provide clear summaries when listing multiple items.
298
- `,
299
- systemPromptCodemode: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
186
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
300
187
  ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
301
188
  Use this to see what MCP servers you can access.
302
189
 
@@ -317,7 +204,7 @@ export const GITHUB_AGENT_SPEC = {
317
204
  `,
318
205
  };
319
206
  export const INFORMATION_ROUTING_AGENT_SPEC = {
320
- id: 'information-routing',
207
+ id: 'codemode-paper/information-routing',
321
208
  name: 'Information Routing Agent',
322
209
  description: `Routes information between Google Drive and Slack, managing document workflows and team communication.`,
323
210
  tags: ['workflow', 'communication', 'gdrive', 'slack'],
@@ -326,6 +213,7 @@ export const INFORMATION_ROUTING_AGENT_SPEC = {
326
213
  skills: [],
327
214
  environmentName: 'ai-agents-env',
328
215
  icon: 'share-2',
216
+ emoji: '🔀',
329
217
  color: '#EC4899',
330
218
  suggestions: [
331
219
  'Find documents shared with me in Google Drive',
@@ -335,7 +223,7 @@ export const INFORMATION_ROUTING_AGENT_SPEC = {
335
223
  ],
336
224
  systemPrompt: `You are an information routing specialist with access to Google Drive and Slack tools. You can find and manage documents in Drive, send messages to Slack channels, and automate workflows between these platforms. Help users coordinate team communication and document management efficiently. Use "#" to denote Slack channels. Do not use file extension when referring to Google Drive documents.
337
225
  `,
338
- systemPromptCodemode: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
226
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
339
227
  ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
340
228
  Use this to see what MCP servers you can access.
341
229
 
@@ -355,40 +243,16 @@ export const INFORMATION_ROUTING_AGENT_SPEC = {
355
243
  ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
356
244
  `,
357
245
  };
358
- export const SIMPLE_AGENT_SPEC = {
359
- id: 'simple',
360
- name: 'A Simple Agent',
361
- description: `A simple conversational agent. No tools, no MCP servers, no skills — just a helpful AI assistant you can chat with.`,
362
- tags: ['simple', 'chat', 'assistant'],
363
- enabled: true,
364
- mcpServers: [],
365
- skills: [],
366
- environmentName: 'ai-agents-env',
367
- icon: 'share-2',
368
- color: '#6366F1',
369
- suggestions: [
370
- 'Tell me a joke',
371
- 'Explain quantum computing in simple terms',
372
- 'Help me brainstorm ideas for a weekend project',
373
- 'Summarize the key points of a topic I describe',
374
- ],
375
- systemPrompt: `You are a helpful, friendly AI assistant. You do not have access to any external tools, MCP servers, or skills. Answer questions using your training knowledge, be concise, and let the user know if a question is outside your knowledge.
376
- `,
377
- systemPromptCodemode: undefined,
378
- };
379
246
  // ============================================================================
380
247
  // Agent Specs Registry
381
248
  // ============================================================================
382
249
  export const AGENT_SPECS = {
383
- 'crawler-mcp': CRAWLER_MCP_AGENT_SPEC,
384
- crawler: CRAWLER_AGENT_SPEC,
385
- 'data-acquisition': DATA_ACQUISITION_AGENT_SPEC,
386
- 'financial-viz': FINANCIAL_VIZ_AGENT_SPEC,
387
- financial: FINANCIAL_AGENT_SPEC,
388
- 'github-agent-mcp': GITHUB_AGENT_MCP_AGENT_SPEC,
389
- 'github-agent': GITHUB_AGENT_SPEC,
390
- 'information-routing': INFORMATION_ROUTING_AGENT_SPEC,
391
- simple: SIMPLE_AGENT_SPEC,
250
+ // Codemode Paper
251
+ 'codemode-paper/crawler': CRAWLER_AGENT_SPEC,
252
+ 'codemode-paper/data-acquisition': DATA_ACQUISITION_AGENT_SPEC,
253
+ 'codemode-paper/financial-viz': FINANCIAL_VIZ_AGENT_SPEC,
254
+ 'codemode-paper/github-agent': GITHUB_AGENT_SPEC,
255
+ 'codemode-paper/information-routing': INFORMATION_ROUTING_AGENT_SPEC,
392
256
  };
393
257
  /**
394
258
  * Get an agent specification by ID.
@@ -0,0 +1 @@
1
+ export * from './agents';
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export * from './agents';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Agent Library.
3
+ *
4
+ * Predefined agent specifications that can be instantiated as AgentSpaces.
5
+ * THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.
6
+ * Generated from YAML specifications in specs/agents/
7
+ */
8
+ import type { AgentSpec } from '../../../types';
9
+ export declare const CRAWLER_AGENT_SPEC: AgentSpec;
10
+ export declare const DATA_ACQUISITION_AGENT_SPEC: AgentSpec;
11
+ export declare const FINANCIAL_AGENT_SPEC: AgentSpec;
12
+ export declare const GITHUB_AGENT_SPEC: AgentSpec;
13
+ export declare const SIMPLE_AGENT_SPEC: AgentSpec;
14
+ export declare const AGENT_SPECS: Record<string, AgentSpec>;
15
+ /**
16
+ * Get an agent specification by ID.
17
+ */
18
+ export declare function getAgentSpecs(agentId: string): AgentSpec | undefined;
19
+ /**
20
+ * List all available agent specifications.
21
+ */
22
+ export declare function listAgentSpecs(): AgentSpec[];
23
+ /**
24
+ * Collect all required environment variables for an agent spec.
25
+ *
26
+ * Iterates over the spec's MCP servers and skills and returns the
27
+ * deduplicated union of their `requiredEnvVars` arrays.
28
+ */
29
+ export declare function getAgentSpecRequiredEnvVars(spec: AgentSpec): string[];
@@ -0,0 +1,267 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ import { ALPHAVANTAGE_MCP_SERVER, FILESYSTEM_MCP_SERVER, GOOGLE_WORKSPACE_MCP_SERVER, KAGGLE_MCP_SERVER, TAVILY_MCP_SERVER, } from '../../mcpServers';
6
+ import { GITHUB_SKILL_SPEC } from '../../skills';
7
+ // ============================================================================
8
+ // MCP Server Lookup
9
+ // ============================================================================
10
+ const MCP_SERVER_MAP = {
11
+ alphavantage: ALPHAVANTAGE_MCP_SERVER,
12
+ filesystem: FILESYSTEM_MCP_SERVER,
13
+ 'google-workspace': GOOGLE_WORKSPACE_MCP_SERVER,
14
+ kaggle: KAGGLE_MCP_SERVER,
15
+ tavily: TAVILY_MCP_SERVER,
16
+ };
17
+ /**
18
+ * Map skill IDs to SkillSpec objects, converting to AgentSkillSpec shape.
19
+ */
20
+ const SKILL_MAP = {
21
+ github: GITHUB_SKILL_SPEC,
22
+ };
23
+ function toAgentSkillSpec(skill) {
24
+ return {
25
+ id: skill.id,
26
+ name: skill.name,
27
+ description: skill.description,
28
+ version: '1.0.0',
29
+ tags: skill.tags,
30
+ enabled: skill.enabled,
31
+ requiredEnvVars: skill.requiredEnvVars,
32
+ };
33
+ }
34
+ // ============================================================================
35
+ // Agent Specs
36
+ // ============================================================================
37
+ // Datalayer Ai Agents
38
+ // ============================================================================
39
+ export const CRAWLER_AGENT_SPEC = {
40
+ id: 'datalayer-ai/crawler',
41
+ name: 'Crawler Agent',
42
+ description: `Web crawling and research agent that searches the web and GitHub repositories for information.`,
43
+ tags: ['web', 'search', 'research', 'crawler', 'github'],
44
+ enabled: false,
45
+ mcpServers: [MCP_SERVER_MAP['tavily']],
46
+ skills: [toAgentSkillSpec(SKILL_MAP['github'])],
47
+ environmentName: 'ai-agents-env',
48
+ icon: 'globe',
49
+ emoji: '🌐',
50
+ color: '#10B981',
51
+ suggestions: [
52
+ 'Search the web for recent news about AI agents',
53
+ 'Find trending open-source Python projects on GitHub',
54
+ 'Research best practices for building RAG applications',
55
+ 'Compare popular JavaScript frameworks in 2024',
56
+ ],
57
+ systemPrompt: `You are a web crawling and research assistant with access to Tavily search and GitHub tools. Use Tavily to search the web for current information and search GitHub repositories for relevant projects. Synthesize information from multiple sources and provide clear summaries with sources cited.
58
+ `,
59
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
60
+ ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
61
+ Use this to see what MCP servers you can access.
62
+
63
+ 2. **search_tools** - Progressive tool discovery by natural language query
64
+ Use this to find relevant tools before executing tasks.
65
+
66
+ 3. **get_tool_details** - Get full tool schema and documentation
67
+ Use this to understand tool parameters before calling them.
68
+
69
+ 4. **execute_code** - Run Python code that composes multiple tools
70
+ Use this for complex multi-step operations. Code runs in a PERSISTENT sandbox.
71
+ Variables, functions, and state PERSIST between execute_code calls.
72
+ Import tools using: \`from generated.servers.<server_name> import <function_name>\`
73
+ NEVER use \`import *\` - always use explicit named imports.
74
+
75
+ ## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check parameters 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
76
+ ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
77
+ `,
78
+ };
79
+ export const DATA_ACQUISITION_AGENT_SPEC = {
80
+ id: 'datalayer-ai/data-acquisition',
81
+ name: 'Data Acquisition Agent',
82
+ description: `Acquires and manages data from various sources including Kaggle datasets and local filesystem operations.`,
83
+ tags: ['data', 'acquisition', 'kaggle', 'filesystem'],
84
+ enabled: true,
85
+ mcpServers: [
86
+ MCP_SERVER_MAP['kaggle'],
87
+ MCP_SERVER_MAP['filesystem'],
88
+ MCP_SERVER_MAP['tavily'],
89
+ ],
90
+ skills: [toAgentSkillSpec(SKILL_MAP['github'])],
91
+ environmentName: 'ai-agents-env',
92
+ icon: 'database',
93
+ emoji: '📊',
94
+ color: '#3B82F6',
95
+ suggestions: [
96
+ 'Find popular machine learning datasets on Kaggle',
97
+ 'Download and explore a dataset for sentiment analysis',
98
+ 'List available files in my workspace',
99
+ 'Search Kaggle for time series forecasting competitions',
100
+ ],
101
+ systemPrompt: `You are a data acquisition specialist with access to Kaggle datasets and filesystem tools. You can search for datasets, download data, read and write files, and help users prepare data for analysis. Guide users through finding relevant datasets and organizing their workspace efficiently.
102
+ `,
103
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
104
+ ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
105
+ Use this to see what MCP servers you can access.
106
+
107
+ 2. **search_tools** - Progressive tool discovery by natural language query
108
+ Use this to find relevant tools before executing tasks.
109
+
110
+ 3. **get_tool_details** - Get full tool schema and documentation
111
+ Use this to understand tool parameters before calling them.
112
+
113
+ 4. **execute_code** - Run Python code that composes multiple tools
114
+ Use this for complex multi-step operations. Code runs in a PERSISTENT sandbox.
115
+ Variables, functions, and state PERSIST between execute_code calls.
116
+ Import tools using: \`from generated.servers.<server_name> import <function_name>\`
117
+ NEVER use \`import *\` - always use explicit named imports.
118
+
119
+ ## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check parameters 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
120
+ ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
121
+ `,
122
+ };
123
+ export const FINANCIAL_AGENT_SPEC = {
124
+ id: 'datalayer-ai/financial',
125
+ name: 'Financial Visualization Agent',
126
+ description: `Analyzes financial market data and creates visualizations and charts.`,
127
+ tags: ['finance', 'stocks', 'visualization', 'charts'],
128
+ enabled: false,
129
+ mcpServers: [MCP_SERVER_MAP['alphavantage']],
130
+ skills: [],
131
+ environmentName: 'ai-agents-env',
132
+ icon: 'trending-up',
133
+ emoji: '📈',
134
+ color: '#F59E0B',
135
+ suggestions: [
136
+ 'Show me the stock price history for AAPL',
137
+ 'Create a chart comparing MSFT and GOOGL over the last year',
138
+ 'Analyze the trading volume trends for Tesla',
139
+ 'Get the latest market news for tech stocks',
140
+ ],
141
+ systemPrompt: `You are a financial market analyst with access to Alpha Vantage market data tools. You can fetch stock prices, analyze trading volumes, create visualizations, and track market trends. Provide clear insights with relevant data points and suggest visualization approaches when appropriate.
142
+ `,
143
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
144
+ ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
145
+ Use this to see what MCP servers you can access.
146
+
147
+ 2. **search_tools** - Progressive tool discovery by natural language query
148
+ Use this to find relevant tools before executing tasks.
149
+
150
+ 3. **get_tool_details** - Get full tool schema and documentation
151
+ Use this to understand tool parameters before calling them.
152
+
153
+ 4. **execute_code** - Run Python code that composes multiple tools
154
+ Use this for complex multi-step operations. Code runs in a PERSISTENT sandbox.
155
+ Variables, functions, and state PERSIST between execute_code calls.
156
+ Import tools using: \`from generated.servers.<server_name> import <function_name>\`
157
+ NEVER use \`import *\` - always use explicit named imports.
158
+
159
+ ## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check parameters 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
160
+ ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
161
+ `,
162
+ };
163
+ export const GITHUB_AGENT_SPEC = {
164
+ id: 'datalayer-ai/github-agent',
165
+ name: 'GitHub Agent',
166
+ description: `Manages GitHub repositories, issues, and pull requests with email notification capabilities.`,
167
+ tags: ['github', 'git', 'code', 'email'],
168
+ enabled: false,
169
+ mcpServers: [MCP_SERVER_MAP['google-workspace']],
170
+ skills: [toAgentSkillSpec(SKILL_MAP['github'])],
171
+ environmentName: 'ai-agents-env',
172
+ icon: 'git-branch',
173
+ emoji: '🐙',
174
+ color: '#6366F1',
175
+ suggestions: [
176
+ 'List my open pull requests across all repositories',
177
+ 'Create an issue for a bug I found in datalayer/ui',
178
+ 'Show recent commits on the main branch',
179
+ 'Search for repositories related to Jupyter notebooks',
180
+ ],
181
+ systemPrompt: `You are a GitHub assistant with access to GitHub skills and Google Workspace for email notifications. You can list and search repositories, issues, and pull requests, create new issues, review PRs, search code, and send email notifications. Always confirm repository names before creating issues/PRs and provide clear summaries when listing multiple items.
182
+ `,
183
+ systemPromptCodemodeAddons: `## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
184
+ ## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
185
+ Use this to see what MCP servers you can access.
186
+
187
+ 2. **search_tools** - Progressive tool discovery by natural language query
188
+ Use this to find relevant tools before executing tasks.
189
+
190
+ 3. **get_tool_details** - Get full tool schema and documentation
191
+ Use this to understand tool parameters before calling them.
192
+
193
+ 4. **execute_code** - Run Python code that composes multiple tools
194
+ Use this for complex multi-step operations. Code runs in a PERSISTENT sandbox.
195
+ Variables, functions, and state PERSIST between execute_code calls.
196
+ Import tools using: \`from generated.servers.<server_name> import <function_name>\`
197
+ NEVER use \`import *\` - always use explicit named imports.
198
+
199
+ ## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check parameters 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
200
+ ## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
201
+ `,
202
+ };
203
+ export const SIMPLE_AGENT_SPEC = {
204
+ id: 'datalayer-ai/simple',
205
+ name: 'A Simple Agent',
206
+ description: `A simple conversational agent. No tools, no MCP servers, no skills — just a helpful AI assistant you can chat with.`,
207
+ tags: ['simple', 'chat', 'assistant'],
208
+ enabled: true,
209
+ mcpServers: [],
210
+ skills: [],
211
+ environmentName: 'ai-agents-env',
212
+ icon: 'share-2',
213
+ emoji: '🤖',
214
+ color: '#6366F1',
215
+ suggestions: [
216
+ 'Tell me a joke',
217
+ 'Explain quantum computing in simple terms',
218
+ 'Help me brainstorm ideas for a weekend project',
219
+ 'Summarize the key points of a topic I describe',
220
+ ],
221
+ systemPrompt: `You are a helpful, friendly AI assistant. You do not have access to any external tools, MCP servers, or skills. Answer questions using your training knowledge, be concise, and let the user know if a question is outside your knowledge.
222
+ `,
223
+ systemPromptCodemodeAddons: undefined,
224
+ };
225
+ // ============================================================================
226
+ // Agent Specs Registry
227
+ // ============================================================================
228
+ export const AGENT_SPECS = {
229
+ // Datalayer Ai
230
+ 'datalayer-ai/crawler': CRAWLER_AGENT_SPEC,
231
+ 'datalayer-ai/data-acquisition': DATA_ACQUISITION_AGENT_SPEC,
232
+ 'datalayer-ai/financial': FINANCIAL_AGENT_SPEC,
233
+ 'datalayer-ai/github-agent': GITHUB_AGENT_SPEC,
234
+ 'datalayer-ai/simple': SIMPLE_AGENT_SPEC,
235
+ };
236
+ /**
237
+ * Get an agent specification by ID.
238
+ */
239
+ export function getAgentSpecs(agentId) {
240
+ return AGENT_SPECS[agentId];
241
+ }
242
+ /**
243
+ * List all available agent specifications.
244
+ */
245
+ export function listAgentSpecs() {
246
+ return Object.values(AGENT_SPECS);
247
+ }
248
+ /**
249
+ * Collect all required environment variables for an agent spec.
250
+ *
251
+ * Iterates over the spec's MCP servers and skills and returns the
252
+ * deduplicated union of their `requiredEnvVars` arrays.
253
+ */
254
+ export function getAgentSpecRequiredEnvVars(spec) {
255
+ const vars = new Set();
256
+ for (const server of spec.mcpServers) {
257
+ for (const v of server.requiredEnvVars ?? []) {
258
+ vars.add(v);
259
+ }
260
+ }
261
+ for (const skill of spec.skills) {
262
+ for (const v of skill.requiredEnvVars ?? []) {
263
+ vars.add(v);
264
+ }
265
+ }
266
+ return Array.from(vars);
267
+ }
@@ -0,0 +1 @@
1
+ export * from './agents';
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export * from './agents';