@datalayer/agent-runtimes 1.0.0 → 1.0.2

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 (62) hide show
  1. package/lib/Agent.js +1 -2
  2. package/lib/AgentLexical.js +1 -2
  3. package/lib/AgentNotebook.js +1 -2
  4. package/lib/components/McpServerManager.d.ts +1 -1
  5. package/lib/components/McpServerManager.js +1 -1
  6. package/lib/components/chat/components/Chat.d.ts +1 -1
  7. package/lib/components/chat/components/ChatFloating.d.ts +4 -2
  8. package/lib/components/chat/components/ChatFloating.js +1 -1
  9. package/lib/components/chat/components/base/ChatBase.d.ts +1 -1
  10. package/lib/components/chat/components/base/ChatBase.js +4 -2
  11. package/lib/components/chat/store/conversationStore.d.ts +1 -1
  12. package/lib/components/chat/store/conversationStore.js +2 -2
  13. package/lib/examples/A2UiRestaurantExample.js +2 -2
  14. package/lib/examples/AgUiAgenticExample.js +3 -3
  15. package/lib/examples/AgUiBackendToolRenderingExample.js +4 -3
  16. package/lib/examples/AgUiHaikuGenUIExample.js +4 -3
  17. package/lib/examples/AgUiHumanInTheLoopExample.js +4 -3
  18. package/lib/examples/AgUiSharedStateExample.js +4 -3
  19. package/lib/examples/AgUiToolsBasedGenUIExample.js +4 -3
  20. package/lib/examples/AgentRuntimeChatExample.js +3 -3
  21. package/lib/examples/AgentRuntimeCustomExample.js +2 -2
  22. package/lib/examples/AgentRuntimeFormExample.js +2 -2
  23. package/lib/examples/AgentRuntimeLexical2Example.js +3 -2
  24. package/lib/examples/AgentRuntimeLexicalExample.js +4 -3
  25. package/lib/examples/AgentRuntimeLexicalSidebarExample.js +3 -2
  26. package/lib/examples/AgentRuntimeNotebookExample.js +4 -3
  27. package/lib/examples/AgentRuntimeNotebookSidebarExample.js +3 -2
  28. package/lib/examples/AgentRuntimeStandaloneExample.js +3 -3
  29. package/lib/examples/CopilotKitLexicalExample.js +3 -2
  30. package/lib/examples/CopilotKitNotebookExample.js +3 -2
  31. package/lib/examples/DatalayerNotebookExample.js +3 -2
  32. package/lib/examples/JupyterCellExample.js +3 -2
  33. package/lib/examples/JupyterNotebookExample.js +3 -2
  34. package/lib/examples/main.js +68 -18
  35. package/lib/examples/stores/themeStore.d.ts +33 -0
  36. package/lib/examples/stores/themeStore.js +38 -0
  37. package/lib/examples/stores/themedProvider.d.ts +45 -0
  38. package/lib/examples/stores/themedProvider.js +54 -0
  39. package/lib/hooks/index.d.ts +8 -0
  40. package/lib/hooks/index.js +8 -0
  41. package/lib/hooks/useAgentRuntimes.d.ts +350 -0
  42. package/lib/hooks/useAgentRuntimes.js +78 -0
  43. package/lib/hooks/useAgentStore.d.ts +30 -0
  44. package/lib/hooks/useAgentStore.js +22 -0
  45. package/lib/specs/agents/codeai/agents.d.ts +1 -1
  46. package/lib/specs/agents/codeai/agents.js +28 -0
  47. package/lib/specs/agents/codemode-paper/agents.d.ts +1 -1
  48. package/lib/specs/agents/codemode-paper/agents.js +71 -1
  49. package/lib/specs/agents/datalayer-ai/agents.d.ts +1 -1
  50. package/lib/specs/agents/datalayer-ai/agents.js +70 -0
  51. package/lib/specs/agents/index.js +2 -0
  52. package/lib/specs/agents/mocks/agents.d.ts +43 -0
  53. package/lib/specs/agents/mocks/agents.js +2293 -0
  54. package/lib/specs/agents/mocks/index.d.ts +1 -0
  55. package/lib/specs/agents/mocks/index.js +5 -0
  56. package/lib/specs/mcpServers.d.ts +1 -0
  57. package/lib/specs/mcpServers.js +16 -0
  58. package/lib/specs/models.d.ts +2 -2
  59. package/lib/specs/models.js +5 -5
  60. package/lib/types/Types.d.ts +29 -1
  61. package/package.json +4 -3
  62. package/scripts/codegen/generate_agents.py +95 -2
@@ -0,0 +1,350 @@
1
+ import type { AgentSpec } from '../types';
2
+ /**
3
+ * Agent Runtime data type (mapped from runtimes service).
4
+ *
5
+ * Backend RuntimePod fields: pod_name, environment_name, environment_title, uid,
6
+ * type, given_name, token, ingress, reservation_id, started_at, expired_at, burning_rate.
7
+ *
8
+ * We map 'ingress' to 'url' for consistency with the UI.
9
+ */
10
+ export type AgentRuntimeData = {
11
+ pod_name: string;
12
+ id: string;
13
+ name: string;
14
+ environment_name: string;
15
+ environment_title?: string;
16
+ given_name: string;
17
+ phase?: string;
18
+ type: string;
19
+ started_at?: string;
20
+ expired_at?: string;
21
+ burning_rate?: number;
22
+ status: 'starting' | 'running' | 'paused' | 'terminated' | 'archived';
23
+ messageCount: number;
24
+ ingress?: string;
25
+ url?: string;
26
+ token?: string;
27
+ agentSpec?: AgentSpec;
28
+ agent_spec_id?: string;
29
+ };
30
+ /**
31
+ * Hook to access all agent runtime operations from the centralized cache.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * const {
36
+ * useAgentRuntime,
37
+ * useAgentRuntimes,
38
+ * useCreateAgentRuntime,
39
+ * useDeleteAgentRuntime,
40
+ * useRefreshAgentRuntimes,
41
+ * } = useAgentRuntimesCache();
42
+ * ```
43
+ */
44
+ export declare function useAgentRuntimesCache(): {
45
+ useAgentRuntime: (podName: string | undefined) => import("@tanstack/react-query").UseQueryResult<{
46
+ status: "running" | "paused" | "starting" | "terminated" | "archived";
47
+ name: string;
48
+ id: string;
49
+ url: string | undefined;
50
+ messageCount: number;
51
+ agent_spec_id: string | undefined;
52
+ pod_name: string;
53
+ environment_name: string;
54
+ environment_title?: string;
55
+ given_name: string;
56
+ phase?: string;
57
+ type: string;
58
+ started_at?: string;
59
+ expired_at?: string;
60
+ burning_rate?: number;
61
+ ingress?: string;
62
+ token?: string;
63
+ agentSpec?: any;
64
+ }, Error>;
65
+ useAgentRuntimes: () => import("@tanstack/react-query").UseQueryResult<{
66
+ status: "running" | "paused" | "starting" | "terminated" | "archived";
67
+ name: string;
68
+ id: string;
69
+ url: string | undefined;
70
+ messageCount: number;
71
+ agent_spec_id: string | undefined;
72
+ pod_name: string;
73
+ environment_name: string;
74
+ environment_title?: string;
75
+ given_name: string;
76
+ phase?: string;
77
+ type: string;
78
+ started_at?: string;
79
+ expired_at?: string;
80
+ burning_rate?: number;
81
+ ingress?: string;
82
+ token?: string;
83
+ agentSpec?: any;
84
+ }[], Error>;
85
+ useCreateAgentRuntime: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
86
+ environmentName?: string;
87
+ givenName?: string;
88
+ creditsLimit?: number;
89
+ type?: string;
90
+ editorVariant?: string;
91
+ enableCodemode?: boolean;
92
+ agentSpecId?: string;
93
+ }, unknown>;
94
+ useDeleteAgentRuntime: () => import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
95
+ useRefreshAgentRuntimes: () => () => void;
96
+ queryKeys: {
97
+ readonly auth: {
98
+ readonly me: () => readonly ["auth", "me"];
99
+ readonly whoami: () => readonly ["auth", "whoami"];
100
+ };
101
+ readonly users: {
102
+ readonly all: () => readonly ["users"];
103
+ readonly lists: () => readonly ["users", "list"];
104
+ readonly list: (filters?: string) => readonly ["users", "list", {
105
+ readonly filters: string | undefined;
106
+ }];
107
+ readonly details: () => readonly ["users", "detail"];
108
+ readonly detail: (id: string) => readonly ["users", "detail", string];
109
+ readonly byHandle: (handle: string) => readonly ["users", "handle", string];
110
+ readonly search: (pattern: string) => readonly ["users", "search", string];
111
+ readonly settings: (userId: string) => readonly ["users", "detail", string, "settings"];
112
+ readonly onboarding: (userId: string) => readonly ["users", "detail", string, "onboarding"];
113
+ readonly surveys: (userId: string) => readonly ["users", "detail", string, "surveys"];
114
+ readonly credits: (userId: string) => readonly ["users", "detail", string, "credits"];
115
+ };
116
+ readonly organizations: {
117
+ readonly all: () => readonly ["organizations"];
118
+ readonly lists: () => readonly ["organizations", "list"];
119
+ readonly details: () => readonly ["organizations", "detail"];
120
+ readonly detail: (id: string) => readonly ["organizations", "detail", string];
121
+ readonly byHandle: (handle: string) => readonly ["organizations", "handle", string];
122
+ readonly userOrgs: () => readonly ["organizations", "user"];
123
+ readonly members: (orgId: string) => readonly ["organizations", "detail", string, "members"];
124
+ };
125
+ readonly teams: {
126
+ readonly all: () => readonly ["teams"];
127
+ readonly details: () => readonly ["teams", "detail"];
128
+ readonly detail: (id: string) => readonly ["teams", "detail", string];
129
+ readonly byHandle: (handle: string) => readonly ["teams", "handle", string];
130
+ readonly byOrganization: (orgId: string) => readonly ["teams", "organization", string];
131
+ readonly members: (teamId: string) => readonly ["teams", "detail", string, "members"];
132
+ };
133
+ readonly spaces: {
134
+ readonly all: () => readonly ["spaces"];
135
+ readonly details: () => readonly ["spaces", "detail"];
136
+ readonly detail: (id: string) => readonly ["spaces", "detail", string];
137
+ readonly byHandle: (handle: string) => readonly ["spaces", "handle", string];
138
+ readonly byOrganization: (orgId: string) => readonly ["spaces", "organization", string];
139
+ readonly orgSpaceByHandle: (orgId: string, handle: string) => readonly ["spaces", "organization", string, "handle", string];
140
+ readonly byOrganizationAndHandle: (orgHandle: string, spaceHandle: string) => readonly ["spaces", "organization", string, "space", string];
141
+ readonly userSpaces: () => readonly ["spaces", "user"];
142
+ readonly items: (spaceId: string) => readonly ["spaces", "detail", string, "items"];
143
+ readonly members: (spaceId: string) => readonly ["spaces", "detail", string, "members"];
144
+ };
145
+ readonly notebooks: {
146
+ readonly all: () => readonly ["notebooks"];
147
+ readonly details: () => readonly ["notebooks", "detail"];
148
+ readonly detail: (id: string) => readonly ["notebooks", "detail", string];
149
+ readonly bySpace: (spaceId: string) => readonly ["notebooks", "space", string];
150
+ readonly model: (notebookId: string) => readonly ["notebooks", "detail", string, "model"];
151
+ };
152
+ readonly documents: {
153
+ readonly all: () => readonly ["documents"];
154
+ readonly details: () => readonly ["documents", "detail"];
155
+ readonly detail: (id: string) => readonly ["documents", "detail", string];
156
+ readonly bySpace: (spaceId: string) => readonly ["documents", "space", string];
157
+ readonly model: (documentId: string) => readonly ["documents", "detail", string, "model"];
158
+ };
159
+ readonly cells: {
160
+ readonly all: () => readonly ["cells"];
161
+ readonly details: () => readonly ["cells", "detail"];
162
+ readonly detail: (id: string) => readonly ["cells", "detail", string];
163
+ readonly bySpace: (spaceId: string) => readonly ["cells", "space", string];
164
+ };
165
+ readonly datasets: {
166
+ readonly all: () => readonly ["datasets"];
167
+ readonly details: () => readonly ["datasets", "detail"];
168
+ readonly detail: (id: string) => readonly ["datasets", "detail", string];
169
+ readonly bySpace: (spaceId: string) => readonly ["datasets", "space", string];
170
+ };
171
+ readonly lessons: {
172
+ readonly all: () => readonly ["lessons"];
173
+ readonly details: () => readonly ["lessons", "detail"];
174
+ readonly detail: (id: string) => readonly ["lessons", "detail", string];
175
+ readonly bySpace: (spaceId: string) => readonly ["lessons", "space", string];
176
+ };
177
+ readonly exercises: {
178
+ readonly all: () => readonly ["exercises"];
179
+ readonly details: () => readonly ["exercises", "detail"];
180
+ readonly detail: (id: string) => readonly ["exercises", "detail", string];
181
+ readonly bySpace: (spaceId: string) => readonly ["exercises", "space", string];
182
+ };
183
+ readonly assignments: {
184
+ readonly all: () => readonly ["assignments"];
185
+ readonly details: () => readonly ["assignments", "detail"];
186
+ readonly detail: (id: string) => readonly ["assignments", "detail", string];
187
+ readonly bySpace: (spaceId: string) => readonly ["assignments", "space", string];
188
+ readonly forStudent: (assignmentId: string, courseId: string, studentId: string) => readonly ["assignments", "detail", string, "course", string, "student", string];
189
+ readonly studentVersion: (assignmentId: string) => readonly ["assignments", "detail", string, "studentVersion"];
190
+ };
191
+ readonly environments: {
192
+ readonly all: () => readonly ["environments"];
193
+ readonly details: () => readonly ["environments", "detail"];
194
+ readonly detail: (id: string) => readonly ["environments", "detail", string];
195
+ readonly bySpace: (spaceId: string) => readonly ["environments", "space", string];
196
+ };
197
+ readonly pages: {
198
+ readonly all: () => readonly ["pages"];
199
+ readonly details: () => readonly ["pages", "detail"];
200
+ readonly detail: (id: string) => readonly ["pages", "detail", string];
201
+ };
202
+ readonly datasources: {
203
+ readonly all: () => readonly ["datasources"];
204
+ readonly details: () => readonly ["datasources", "detail"];
205
+ readonly detail: (id: string) => readonly ["datasources", "detail", string];
206
+ };
207
+ readonly secrets: {
208
+ readonly all: () => readonly ["secrets"];
209
+ readonly details: () => readonly ["secrets", "detail"];
210
+ readonly detail: (id: string) => readonly ["secrets", "detail", string];
211
+ };
212
+ readonly tokens: {
213
+ readonly all: () => readonly ["tokens"];
214
+ readonly details: () => readonly ["tokens", "detail"];
215
+ readonly detail: (id: string) => readonly ["tokens", "detail", string];
216
+ };
217
+ readonly contacts: {
218
+ readonly all: () => readonly ["contacts"];
219
+ readonly lists: () => readonly ["contacts", "list"];
220
+ readonly details: () => readonly ["contacts", "detail"];
221
+ readonly detail: (id: string) => readonly ["contacts", "detail", string];
222
+ readonly byHandle: (handle: string) => readonly ["contacts", "handle", string];
223
+ readonly search: (query: string) => readonly ["contacts", "search", string];
224
+ };
225
+ readonly invites: {
226
+ readonly all: () => readonly ["invites"];
227
+ readonly byToken: (token: string) => readonly ["invites", "token", string];
228
+ readonly byAccount: (accountId: string) => readonly ["invites", "account", string];
229
+ };
230
+ readonly courses: {
231
+ readonly all: () => readonly ["courses"];
232
+ readonly details: () => readonly ["courses", "detail"];
233
+ readonly detail: (id: string) => readonly ["courses", "detail", string];
234
+ readonly public: () => readonly ["courses", "public"];
235
+ readonly instructor: (instructorId: string) => readonly ["courses", "instructor", string];
236
+ readonly enrollments: () => readonly ["courses", "enrollments", "me"];
237
+ readonly students: (courseId: string) => readonly ["courses", "detail", string, "students"];
238
+ readonly student: (courseId: string, studentId: string) => readonly ["courses", "detail", string, "student", string];
239
+ };
240
+ readonly schools: {
241
+ readonly all: () => readonly ["schools"];
242
+ };
243
+ readonly inbounds: {
244
+ readonly all: () => readonly ["inbounds"];
245
+ readonly detail: (id: string) => readonly ["inbounds", string];
246
+ readonly byHandle: (handle: string) => readonly ["inbounds", "handle", string];
247
+ };
248
+ readonly outbounds: {
249
+ readonly all: () => readonly ["outbounds"];
250
+ readonly detail: (id: string) => readonly ["outbounds", string];
251
+ };
252
+ readonly items: {
253
+ readonly all: () => readonly ["items"];
254
+ readonly public: () => readonly ["items", "public"];
255
+ readonly bySpace: (spaceId: string) => readonly ["items", "space", string];
256
+ readonly search: (opts: import("@datalayer/core").ISearchOpts) => readonly ["items", "search", import("@datalayer/core").ISearchOpts];
257
+ };
258
+ readonly agentRuntimes: {
259
+ readonly all: () => readonly ["agentRuntimes"];
260
+ readonly lists: () => readonly ["agentRuntimes", "list"];
261
+ readonly details: () => readonly ["agentRuntimes", "detail"];
262
+ readonly detail: (podName: string) => readonly ["agentRuntimes", "detail", string];
263
+ };
264
+ readonly layout: {
265
+ readonly byAccount: (accountHandle: string, spaceHandle?: string) => readonly ["layout", string, string] | readonly ["layout", string];
266
+ };
267
+ readonly usages: {
268
+ readonly user: () => readonly ["usages", "user"];
269
+ readonly userById: (userId: string) => readonly ["usages", "user", string];
270
+ readonly platform: () => readonly ["usages", "platform"];
271
+ };
272
+ readonly prices: {
273
+ readonly stripe: () => readonly ["prices", "stripe"];
274
+ };
275
+ readonly growth: {
276
+ readonly kpi: () => readonly ["growth", "kpi"];
277
+ };
278
+ readonly oauth2: {
279
+ readonly authorizationUrl: (queryArgs: Record<string, string>) => readonly ["oauth2", "authz", "url", Record<string, string>];
280
+ readonly authorizationLinkUrl: (queryArgs: Record<string, string>) => readonly ["oauth2", "authz", "url", "link", Record<string, string>];
281
+ };
282
+ };
283
+ };
284
+ /**
285
+ * Hook to fetch user's agent runtimes (running agent instances).
286
+ * Used by the sidebar to show running/paused/terminated agents.
287
+ */
288
+ export declare function useAgentRuntimes(): import("@tanstack/react-query").UseQueryResult<{
289
+ status: "running" | "paused" | "starting" | "terminated" | "archived";
290
+ name: string;
291
+ id: string;
292
+ url: string | undefined;
293
+ messageCount: number;
294
+ agent_spec_id: string | undefined;
295
+ pod_name: string;
296
+ environment_name: string;
297
+ environment_title?: string;
298
+ given_name: string;
299
+ phase?: string;
300
+ type: string;
301
+ started_at?: string;
302
+ expired_at?: string;
303
+ burning_rate?: number;
304
+ ingress?: string;
305
+ token?: string;
306
+ agentSpec?: any;
307
+ }[], Error>;
308
+ /**
309
+ * Hook to fetch a single agent runtime by pod name.
310
+ */
311
+ export declare function useAgentRuntimeByPodName(podName: string | undefined): import("@tanstack/react-query").UseQueryResult<{
312
+ status: "running" | "paused" | "starting" | "terminated" | "archived";
313
+ name: string;
314
+ id: string;
315
+ url: string | undefined;
316
+ messageCount: number;
317
+ agent_spec_id: string | undefined;
318
+ pod_name: string;
319
+ environment_name: string;
320
+ environment_title?: string;
321
+ given_name: string;
322
+ phase?: string;
323
+ type: string;
324
+ started_at?: string;
325
+ expired_at?: string;
326
+ burning_rate?: number;
327
+ ingress?: string;
328
+ token?: string;
329
+ agentSpec?: any;
330
+ }, Error>;
331
+ /**
332
+ * Hook to create a new agent runtime.
333
+ */
334
+ export declare function useCreateAgentRuntime(): import("@tanstack/react-query").UseMutationResult<any, Error, {
335
+ environmentName?: string;
336
+ givenName?: string;
337
+ creditsLimit?: number;
338
+ type?: string;
339
+ editorVariant?: string;
340
+ enableCodemode?: boolean;
341
+ agentSpecId?: string;
342
+ }, unknown>;
343
+ /**
344
+ * Hook to delete an agent runtime.
345
+ */
346
+ export declare function useDeleteAgentRuntime(): import("@tanstack/react-query").UseMutationResult<any, Error, string, unknown>;
347
+ /**
348
+ * Hook to refresh agent runtimes list.
349
+ */
350
+ export declare function useRefreshAgentRuntimes(): () => void;
@@ -0,0 +1,78 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ /**
6
+ * Hooks for managing Agent Runtimes (running agent instances).
7
+ *
8
+ * Agent Runtimes are backed by the datalayer-runtimes service (K8s pods).
9
+ * A project (space with variant="project") can have an agent runtime attached
10
+ * via its `attachedAgentPodName` field.
11
+ *
12
+ * @module hooks/useAgentRuntimes
13
+ */
14
+ import { useCache } from '@datalayer/core/lib/hooks';
15
+ /**
16
+ * Hook to access all agent runtime operations from the centralized cache.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * const {
21
+ * useAgentRuntime,
22
+ * useAgentRuntimes,
23
+ * useCreateAgentRuntime,
24
+ * useDeleteAgentRuntime,
25
+ * useRefreshAgentRuntimes,
26
+ * } = useAgentRuntimesCache();
27
+ * ```
28
+ */
29
+ export function useAgentRuntimesCache() {
30
+ const cache = useCache();
31
+ return {
32
+ useAgentRuntime: cache.useAgentRuntime,
33
+ useAgentRuntimes: cache.useAgentRuntimes,
34
+ useCreateAgentRuntime: cache.useCreateAgentRuntime,
35
+ useDeleteAgentRuntime: cache.useDeleteAgentRuntime,
36
+ useRefreshAgentRuntimes: cache.useRefreshAgentRuntimes,
37
+ queryKeys: cache.queryKeys,
38
+ };
39
+ }
40
+ // ============================================================================
41
+ // Agent Runtimes Hooks (from datalayer-runtimes service)
42
+ // ============================================================================
43
+ /**
44
+ * Hook to fetch user's agent runtimes (running agent instances).
45
+ * Used by the sidebar to show running/paused/terminated agents.
46
+ */
47
+ export function useAgentRuntimes() {
48
+ const { useAgentRuntimes: hook } = useCache();
49
+ return hook();
50
+ }
51
+ /**
52
+ * Hook to fetch a single agent runtime by pod name.
53
+ */
54
+ export function useAgentRuntimeByPodName(podName) {
55
+ const { useAgentRuntime: hook } = useCache();
56
+ return hook(podName);
57
+ }
58
+ /**
59
+ * Hook to create a new agent runtime.
60
+ */
61
+ export function useCreateAgentRuntime() {
62
+ const { useCreateAgentRuntime: hook } = useCache();
63
+ return hook();
64
+ }
65
+ /**
66
+ * Hook to delete an agent runtime.
67
+ */
68
+ export function useDeleteAgentRuntime() {
69
+ const { useDeleteAgentRuntime: hook } = useCache();
70
+ return hook();
71
+ }
72
+ /**
73
+ * Hook to refresh agent runtimes list.
74
+ */
75
+ export function useRefreshAgentRuntimes() {
76
+ const { useRefreshAgentRuntimes: hook } = useCache();
77
+ return hook();
78
+ }
@@ -0,0 +1,30 @@
1
+ import type { AgentSpec } from '../types';
2
+ import type { AgentRuntimeData } from './useAgentRuntimes';
3
+ /**
4
+ * Centralised Zustand store for agents.
5
+ *
6
+ * Two collections are maintained:
7
+ *
8
+ * 1. **agentSpecs** – the static catalogue of available agent blueprints
9
+ * (from `@datalayer/agent-runtimes/lib/specs`).
10
+ * Populated once at import time; call `refreshSpecs()` to re-read.
11
+ *
12
+ * 2. **runningAgents** – live agent runtimes fetched from the runtimes
13
+ * service. Updated via `setRunningAgents()` whenever the TanStack
14
+ * query refreshes.
15
+ *
16
+ * The store is consumed by `AgentAssignMenu` to show two action groups:
17
+ * • **Running Agents** – already-running runtimes that can be re-attached
18
+ * • **New Agents** – agent specs that can be instantiated
19
+ */
20
+ export type AgentStoreState = {
21
+ /** Static catalogue of agent blueprints. */
22
+ agentSpecs: AgentSpec[];
23
+ /** Live agent runtimes (running / starting). */
24
+ runningAgents: AgentRuntimeData[];
25
+ /** Re-read agent specs from the config. */
26
+ refreshSpecs: () => void;
27
+ /** Replace the running agents list (call from TanStack query effect). */
28
+ setRunningAgents: (agents: AgentRuntimeData[]) => void;
29
+ };
30
+ export declare const useAgentCatalogStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AgentStoreState>>;
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ import { create } from 'zustand';
6
+ import { listAgentSpecs } from '../specs';
7
+ // ── Store ──────────────────────────────────────────────────────────────────
8
+ export const useAgentCatalogStore = create()(set => ({
9
+ agentSpecs: listAgentSpecs('datalayer-ai/'),
10
+ runningAgents: [],
11
+ refreshSpecs: () => set({ agentSpecs: listAgentSpecs('datalayer-ai/') }),
12
+ setRunningAgents: agents => set(state => ({
13
+ runningAgents: agents.map(agent => {
14
+ if (agent.agentSpec)
15
+ return agent;
16
+ if (!agent.agent_spec_id)
17
+ return agent;
18
+ const spec = state.agentSpecs.find(s => s.id === agent.agent_spec_id);
19
+ return spec ? { ...agent, agentSpec: spec } : agent;
20
+ }),
21
+ })),
22
+ }));
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Agent Library.
3
3
  *
4
- * Predefined agent specifications that can be instantiated as AgentSpaces.
4
+ * Predefined agent specifications that can be instantiated as Agent Runtimes.
5
5
  * THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.
6
6
  * Generated from YAML specifications in specs/agents/
7
7
  */
@@ -79,6 +79,20 @@ export const DATA_ACQUISITION_AGENT_SPEC = {
79
79
  ## 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
80
80
  ## 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.
81
81
  `,
82
+ goal: undefined,
83
+ protocol: undefined,
84
+ uiExtension: undefined,
85
+ trigger: undefined,
86
+ modelConfig: undefined,
87
+ mcpServerTools: undefined,
88
+ guardrails: undefined,
89
+ evals: undefined,
90
+ codemode: undefined,
91
+ output: undefined,
92
+ advanced: undefined,
93
+ authorizationPolicy: undefined,
94
+ notifications: undefined,
95
+ team: undefined,
82
96
  };
83
97
  export const SIMPLE_AGENT_SPEC = {
84
98
  id: 'codeai/simple',
@@ -103,6 +117,20 @@ export const SIMPLE_AGENT_SPEC = {
103
117
  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.
104
118
  `,
105
119
  systemPromptCodemodeAddons: undefined,
120
+ goal: undefined,
121
+ protocol: undefined,
122
+ uiExtension: undefined,
123
+ trigger: undefined,
124
+ modelConfig: undefined,
125
+ mcpServerTools: undefined,
126
+ guardrails: undefined,
127
+ evals: undefined,
128
+ codemode: undefined,
129
+ output: undefined,
130
+ advanced: undefined,
131
+ authorizationPolicy: undefined,
132
+ notifications: undefined,
133
+ team: undefined,
106
134
  };
107
135
  // ============================================================================
108
136
  // Agent Specs Registry
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Agent Library.
3
3
  *
4
- * Predefined agent specifications that can be instantiated as AgentSpaces.
4
+ * Predefined agent specifications that can be instantiated as Agent Runtimes.
5
5
  * THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.
6
6
  * Generated from YAML specifications in specs/agents/
7
7
  */
@@ -85,6 +85,20 @@ export const CRAWLER_AGENT_SPEC = {
85
85
  ## Token Efficiency Always 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.
86
86
  For huggingface tools, use search_doc tool to understand other tools return's schema.
87
87
  `,
88
+ goal: undefined,
89
+ protocol: undefined,
90
+ uiExtension: undefined,
91
+ trigger: undefined,
92
+ modelConfig: undefined,
93
+ mcpServerTools: undefined,
94
+ guardrails: undefined,
95
+ evals: undefined,
96
+ codemode: undefined,
97
+ output: undefined,
98
+ advanced: undefined,
99
+ authorizationPolicy: undefined,
100
+ notifications: undefined,
101
+ team: undefined,
88
102
  };
89
103
  export const DATA_ACQUISITION_AGENT_SPEC = {
90
104
  id: 'codemode-paper/data-acquisition',
@@ -131,6 +145,20 @@ export const DATA_ACQUISITION_AGENT_SPEC = {
131
145
  ## 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
132
146
  ## 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.
133
147
  `,
148
+ goal: undefined,
149
+ protocol: undefined,
150
+ uiExtension: undefined,
151
+ trigger: undefined,
152
+ modelConfig: undefined,
153
+ mcpServerTools: undefined,
154
+ guardrails: undefined,
155
+ evals: undefined,
156
+ codemode: undefined,
157
+ output: undefined,
158
+ advanced: undefined,
159
+ authorizationPolicy: undefined,
160
+ notifications: undefined,
161
+ team: undefined,
134
162
  };
135
163
  export const FINANCIAL_VIZ_AGENT_SPEC = {
136
164
  id: 'codemode-paper/financial-viz',
@@ -173,6 +201,20 @@ export const FINANCIAL_VIZ_AGENT_SPEC = {
173
201
  ## 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
174
202
  ## 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.
175
203
  `,
204
+ goal: undefined,
205
+ protocol: undefined,
206
+ uiExtension: undefined,
207
+ trigger: undefined,
208
+ modelConfig: undefined,
209
+ mcpServerTools: undefined,
210
+ guardrails: undefined,
211
+ evals: undefined,
212
+ codemode: undefined,
213
+ output: undefined,
214
+ advanced: undefined,
215
+ authorizationPolicy: undefined,
216
+ notifications: undefined,
217
+ team: undefined,
176
218
  };
177
219
  export const GITHUB_AGENT_SPEC = {
178
220
  id: 'codemode-paper/github-agent',
@@ -215,6 +257,20 @@ export const GITHUB_AGENT_SPEC = {
215
257
  ## 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
216
258
  ## Token Efficiency Always 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.
217
259
  `,
260
+ goal: undefined,
261
+ protocol: undefined,
262
+ uiExtension: undefined,
263
+ trigger: undefined,
264
+ modelConfig: undefined,
265
+ mcpServerTools: undefined,
266
+ guardrails: undefined,
267
+ evals: undefined,
268
+ codemode: undefined,
269
+ output: undefined,
270
+ advanced: undefined,
271
+ authorizationPolicy: undefined,
272
+ notifications: undefined,
273
+ team: undefined,
218
274
  };
219
275
  export const INFORMATION_ROUTING_AGENT_SPEC = {
220
276
  id: 'codemode-paper/information-routing',
@@ -222,7 +278,7 @@ export const INFORMATION_ROUTING_AGENT_SPEC = {
222
278
  description: `Routes information between Google Drive and other services, managing document workflows and information sharing.`,
223
279
  tags: ['workflow', 'communication', 'gdrive'],
224
280
  enabled: false,
225
- model: 'bedrock:us.anthropic.claude-sonnet-4-5-20250929-v1:0',
281
+ model: 'bedrock:us.anthropic.claude-opus-4-6-v1',
226
282
  mcpServers: [MCP_SERVER_MAP['google-workspace'], MCP_SERVER_MAP['github']],
227
283
  skills: [],
228
284
  environmentName: 'ai-agents-env',
@@ -257,6 +313,20 @@ export const INFORMATION_ROUTING_AGENT_SPEC = {
257
313
  ## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check input and output schemas 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
258
314
  ## Token Efficiency Always 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!!!!
259
315
  `,
316
+ goal: undefined,
317
+ protocol: undefined,
318
+ uiExtension: undefined,
319
+ trigger: undefined,
320
+ modelConfig: undefined,
321
+ mcpServerTools: undefined,
322
+ guardrails: undefined,
323
+ evals: undefined,
324
+ codemode: undefined,
325
+ output: undefined,
326
+ advanced: undefined,
327
+ authorizationPolicy: undefined,
328
+ notifications: undefined,
329
+ team: undefined,
260
330
  };
261
331
  // ============================================================================
262
332
  // Agent Specs Registry
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Agent Library.
3
3
  *
4
- * Predefined agent specifications that can be instantiated as AgentSpaces.
4
+ * Predefined agent specifications that can be instantiated as Agent Runtimes.
5
5
  * THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.
6
6
  * Generated from YAML specifications in specs/agents/
7
7
  */