@datalayer/agent-runtimes 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +157 -10
  2. package/lib/AgentNode.d.ts +3 -0
  3. package/lib/AgentNode.js +676 -0
  4. package/lib/agent-node/themeStore.d.ts +3 -0
  5. package/lib/agent-node/themeStore.js +156 -0
  6. package/lib/agent-node-main.d.ts +1 -0
  7. package/lib/agent-node-main.js +14 -0
  8. package/lib/chat/Chat.js +16 -10
  9. package/lib/chat/ChatFloating.js +1 -1
  10. package/lib/chat/ChatSidebar.js +81 -49
  11. package/lib/chat/base/ChatBase.js +388 -74
  12. package/lib/chat/display/FloatingBrandButton.js +8 -1
  13. package/lib/chat/header/ChatHeader.d.ts +3 -1
  14. package/lib/chat/header/ChatHeader.js +15 -12
  15. package/lib/chat/header/ChatHeaderBase.d.ts +29 -9
  16. package/lib/chat/header/ChatHeaderBase.js +26 -3
  17. package/lib/chat/indicators/SandboxStatusIndicator.js +82 -47
  18. package/lib/chat/messages/ChatMessageList.js +46 -1
  19. package/lib/chat/messages/ChatMessages.js +6 -2
  20. package/lib/chat/prompt/InputFooter.d.ts +3 -1
  21. package/lib/chat/prompt/InputFooter.js +8 -5
  22. package/lib/chat/prompt/InputPrompt.d.ts +3 -1
  23. package/lib/chat/prompt/InputPrompt.js +2 -2
  24. package/lib/chat/prompt/InputPromptFooter.d.ts +3 -1
  25. package/lib/chat/prompt/InputPromptFooter.js +3 -3
  26. package/lib/client/AgentsMixin.js +14 -0
  27. package/lib/config/AgentConfiguration.d.ts +22 -0
  28. package/lib/config/AgentConfiguration.js +319 -64
  29. package/lib/examples/AgUiSharedStateExample.js +2 -1
  30. package/lib/examples/AgentCheckpointsExample.js +3 -3
  31. package/lib/examples/AgentCodemodeExample.d.ts +3 -3
  32. package/lib/examples/AgentCodemodeExample.js +24 -12
  33. package/lib/examples/AgentEvalsExample.js +330 -40
  34. package/lib/examples/AgentGuardrailsExample.js +16 -5
  35. package/lib/examples/AgentHooksExample.js +27 -9
  36. package/lib/examples/AgentInferenceProviderExample.d.ts +3 -0
  37. package/lib/examples/AgentInferenceProviderExample.js +329 -0
  38. package/lib/examples/AgentMCPExample.js +6 -5
  39. package/lib/examples/AgentMemoryExample.d.ts +1 -2
  40. package/lib/examples/AgentMemoryExample.js +71 -22
  41. package/lib/examples/AgentMonitoringExample.js +5 -5
  42. package/lib/examples/AgentNotificationsExample.d.ts +1 -2
  43. package/lib/examples/AgentNotificationsExample.js +71 -22
  44. package/lib/examples/AgentOtelExample.js +31 -40
  45. package/lib/examples/AgentOutputsExample.d.ts +1 -1
  46. package/lib/examples/AgentOutputsExample.js +67 -16
  47. package/lib/examples/AgentParametersExample.js +10 -8
  48. package/lib/examples/AgentSandboxExample.d.ts +1 -1
  49. package/lib/examples/AgentSandboxExample.js +7 -6
  50. package/lib/examples/AgentSkillsExample.js +6 -6
  51. package/lib/examples/AgentSubagentsExample.d.ts +1 -1
  52. package/lib/examples/AgentSubagentsExample.js +6 -6
  53. package/lib/examples/AgentToolApprovalsExample.js +27 -11
  54. package/lib/examples/AgentTriggersExample.js +5 -5
  55. package/lib/examples/{AgentSpecsExample.d.ts → AgentspecsExample.d.ts} +2 -2
  56. package/lib/examples/AgentspecsExample.js +1096 -0
  57. package/lib/examples/ChatCustomExample.js +6 -5
  58. package/lib/examples/ChatExample.js +6 -5
  59. package/lib/examples/Lexical2Example.js +1 -1
  60. package/lib/examples/LexicalAgentExample.js +1 -1
  61. package/lib/examples/NotebookAgentExample.js +3 -3
  62. package/lib/examples/components/ExampleWrapper.d.ts +6 -7
  63. package/lib/examples/components/ExampleWrapper.js +27 -10
  64. package/lib/examples/example-selector.js +2 -1
  65. package/lib/examples/index.d.ts +2 -1
  66. package/lib/examples/index.js +2 -1
  67. package/lib/examples/lexical/initial-content.json +6 -6
  68. package/lib/examples/main.js +56 -16
  69. package/lib/examples/utils/agentId.d.ts +1 -1
  70. package/lib/examples/utils/agentId.js +1 -1
  71. package/lib/examples/utils/useExampleAgentRuntimesUrl.d.ts +5 -0
  72. package/lib/examples/utils/useExampleAgentRuntimesUrl.js +19 -0
  73. package/lib/hooks/useAIAgentsWebSocket.js +35 -0
  74. package/lib/hooks/useAgentRuntimes.d.ts +32 -3
  75. package/lib/hooks/useAgentRuntimes.js +114 -19
  76. package/lib/index.d.ts +1 -1
  77. package/lib/specs/agents/agents.d.ts +20 -13
  78. package/lib/specs/agents/agents.js +1267 -581
  79. package/lib/specs/benchmarks.d.ts +20 -0
  80. package/lib/specs/benchmarks.js +205 -0
  81. package/lib/specs/envvars.d.ts +0 -1
  82. package/lib/specs/envvars.js +0 -11
  83. package/lib/specs/evals.d.ts +10 -9
  84. package/lib/specs/evals.js +128 -88
  85. package/lib/specs/index.d.ts +0 -1
  86. package/lib/specs/index.js +0 -1
  87. package/lib/specs/models.d.ts +0 -2
  88. package/lib/specs/models.js +0 -15
  89. package/lib/specs/skills.d.ts +0 -1
  90. package/lib/specs/skills.js +0 -18
  91. package/lib/stores/agentRuntimeStore.d.ts +5 -1
  92. package/lib/stores/agentRuntimeStore.js +22 -8
  93. package/lib/stores/conversationStore.js +2 -2
  94. package/lib/types/agents-lifecycle.d.ts +18 -0
  95. package/lib/types/agents.d.ts +6 -0
  96. package/lib/types/agentspecs.d.ts +4 -0
  97. package/lib/types/benchmarks.d.ts +43 -0
  98. package/lib/types/benchmarks.js +5 -0
  99. package/lib/types/chat.d.ts +16 -0
  100. package/lib/types/evals.d.ts +26 -17
  101. package/lib/types/index.d.ts +1 -0
  102. package/lib/types/index.js +1 -0
  103. package/package.json +9 -5
  104. package/scripts/codegen/__pycache__/generate_agents.cpython-313.pyc +0 -0
  105. package/scripts/codegen/__pycache__/generate_benchmarks.cpython-313.pyc +0 -0
  106. package/scripts/codegen/__pycache__/generate_evals.cpython-313.pyc +0 -0
  107. package/scripts/codegen/generate_agents.py +89 -43
  108. package/scripts/codegen/generate_benchmarks.py +441 -0
  109. package/scripts/codegen/generate_evals.py +94 -16
  110. package/scripts/codegen/generate_events.py +0 -1
  111. package/lib/examples/AgentSpecsExample.js +0 -694
package/README.md CHANGED
@@ -36,6 +36,13 @@ Agent Runtimes solves the complexity of deploying AI agents by providing:
36
36
 
37
37
  ## 🌟 Features
38
38
 
39
+ ### Agent Node
40
+ - **Central registration**: Agent nodes register and heartbeat to Datalayer Runtimes APIs.
41
+ - **Node configuration**: Runtime mode (`private`, `shared`, `sleep`) and sharing metadata are tracked per node.
42
+ - **Tunnel routing**: Agent nodes maintain a tunnel with Datalayer Runtimes to route chat messages between central UI and nodes.
43
+ - **Dedicated UI**: Agent Node list/detail UX is available for node observability and operations.
44
+ - **End-to-end sync**: Local node state can be synchronized to central services for fleet visibility.
45
+
39
46
  ### Multi-Protocol Support
40
47
  - **ACP (Agent Client Protocol)**: WebSocket-based standard protocol
41
48
  - **Vercel AI SDK**: Compatible with Vercel's AI SDK for React/Next.js
@@ -57,22 +64,160 @@ Agent Runtimes solves the complexity of deploying AI agents by providing:
57
64
 
58
65
  ## Examples
59
66
 
60
- The examples will demonstrate how to use the Agent Runtimes functionality in various scenarios and frameworks.
67
+ The examples demonstrate how to use the Agent Runtimes functionality in various scenarios and frameworks.
68
+
69
+ ### Install
70
+
71
+ `make examples` starts both the Python agent server and the Vite dev server,
72
+ so you need both stacks installed once:
73
+
74
+ ```bash
75
+ # 1. Node dependencies for the React examples + Vite dev server.
76
+ npm install
77
+
78
+ # 2. Python package (editable) for the local agent-runtimes server.
79
+ # Use a virtualenv or conda env of your choice.
80
+ pip install -e .
81
+ ```
82
+
83
+ Optional extras (declared in `pyproject.toml`):
84
+
85
+ ```bash
86
+ pip install -e ".[examples]" # extra agent framework deps used by examples
87
+ pip install -e ".[test]" # pytest and test utilities
88
+ pip install -e ".[cli]" # CLI dependencies
89
+ pip install -e ".[chat]" # chat-related extras
90
+ pip install -e ".[docs]" # docs build dependencies
91
+ ```
92
+
93
+ ### Run
61
94
 
62
95
  ```bash
63
96
  make examples
64
97
  ```
65
98
 
99
+ ### Agent Node development (UI + server)
100
+
101
+ For focused Agent Node development, run:
102
+
103
+ ```bash
104
+ make agent-nodes
105
+ ```
106
+
107
+ This target starts both:
108
+
109
+ - the local Python server on port `8765`
110
+ - the Vite page for `html/agent-node.html`
111
+
112
+ Use this mode to iterate on Agent Node configuration flows and central registration behavior.
113
+
114
+ Expected central visibility semantics:
115
+
116
+ - show all nodes owned by the current user,
117
+ - show other users' nodes only when mode is `shared`.
118
+
119
+ ### Agent Node against local services (`plane local`)
120
+
121
+ To run Agent Node with local service URLs preconfigured, use:
122
+
123
+ ```bash
124
+ make agent-nodes:proxy
125
+ ```
126
+
127
+ This target applies the `PLANE_LOCAL_*_URL` mappings and exports both
128
+ `DATALAYER_*` and `VITE_*` variables so Agent Node sync/tunnel and UI calls are
129
+ wired to local services.
130
+
131
+ Prerequisites:
132
+
133
+ 1. Start the local Plane stack (`plane local`).
134
+ 2. Export `DATALAYER_API_KEY` for authenticated registration/tunnel calls.
135
+
136
+ Override any local service URL if needed:
137
+
138
+ ```bash
139
+ PLANE_LOCAL_RUNTIMES_URL=http://localhost:19500 make agent-nodes:proxy
140
+ ```
141
+
142
+ ### Docker build notes
143
+
144
+ Docker image build and release notes were moved to:
145
+
146
+ - [docker/README.md](docker/README.md)
147
+
148
+ By default, `make examples` boots the local Vite dev server with every
149
+ Datalayer service URLs set to local defaults for agent execution:
150
+
151
+ | Variable | Default | Notes |
152
+ | ----------------------------- | ----------------------- | ----------------------------------------------- |
153
+ | `VITE_BASE_URL` | `http://localhost:8765` | Local `agent-runtimes` server (`/api/v1/agents/*`) |
154
+ | `VITE_BASE_URL_NO_CODEMODE` | `http://localhost:8765` | Local no-codemode agent endpoint |
155
+ | `VITE_BASE_URL_CODEMODE` | `http://localhost:8766` | Local codemode agent endpoint |
156
+
157
+ This is the local-first workflow used during development. It avoids accidental
158
+ remote calls for the core agent routes even if your shell exports
159
+ `DATALAYER_*_URL` values.
160
+
161
+ ### Running with explicit production URLs
162
+
163
+ If you want to force production URLs for Datalayer services, use:
164
+
165
+ ```bash
166
+ make examples:prod
167
+ ```
168
+
169
+ This mode uses the `DATALAYER_*_URL` convention from
170
+ `datalayer-core` (specifically `datalayer_core/utils/urls.py`)
171
+ and propagates those values to the Vite HTML placeholders.
172
+
173
+ Override any URL on the command line:
174
+
175
+ ```bash
176
+ make examples:prod DATALAYER_RUN_URL=https://prod2.datalayer.run
177
+ ```
178
+
179
+ ### Running against a local `plane local` stack
180
+
181
+ If you are developing against a local Plane (`plane local`), use:
182
+
183
+ ```bash
184
+ make examples:proxy
185
+ ```
186
+
187
+ This points each `DATALAYER_*_URL` at the matching localhost port exposed by
188
+ `plane local` (see `services/plane/datalayer_plane/sbin/local.sh`):
189
+
190
+ | Variable | Default port |
191
+ | ------------------------------ | ----------------------------- |
192
+ | `PLANE_LOCAL_IAM_URL` | `http://localhost:9700` |
193
+ | `PLANE_LOCAL_RUNTIMES_URL` | `http://localhost:9500` |
194
+ | `PLANE_LOCAL_SPACER_URL` | `http://localhost:9900` |
195
+ | `PLANE_LOCAL_LIBRARY_URL` | `http://localhost:9800` |
196
+ | `PLANE_LOCAL_MANAGER_URL` | `http://localhost:2100` |
197
+ | `PLANE_LOCAL_AI_AGENTS_URL` | `http://localhost:4400` |
198
+ | `PLANE_LOCAL_AI_INFERENCE_URL` | `http://localhost:4450` |
199
+ | `PLANE_LOCAL_MCP_SERVERS_URL` | `http://localhost:4111` |
200
+ | `PLANE_LOCAL_GROWTH_URL` | `http://localhost:6660` |
201
+ | `PLANE_LOCAL_SUCCESS_URL` | `http://localhost:3300` |
202
+ | `PLANE_LOCAL_STATUS_URL` | `http://localhost:4785` |
203
+ | `PLANE_LOCAL_SUPPORT_URL` | `http://localhost:2200` |
204
+
205
+ Override any port on the command line, e.g.:
206
+
207
+ ```bash
208
+ PLANE_LOCAL_IAM_URL=http://localhost:9701 make examples:proxy
209
+ ```
210
+
66
211
  On the main page, you’ll find an example gallery (cards) that break things down into practical building blocks:
67
212
 
68
- UX patterns (aka GenUI) with protocols like A2UI and AG-UI
69
- Interactive or triggered workflows
70
- Agent Identity and Controls with guardrails, monitoring, tool approvals
71
- Programmatic tooling with Sandbox and Codemode for MCP and Skills
72
- Outputs and Notifications
73
- Real-time collaboration with users, subagents, and multi-agent teams
74
- Custom agents built from Agentspecs
75
- ...
213
+ - UX patterns (aka GenUI) with protocols like A2UI and AG-UI
214
+ - Interactive or triggered workflows
215
+ - Agent Identity and Controls with guardrails, monitoring, tool approvals
216
+ - Programmatic tooling with Sandbox and Codemode for MCP and Skills
217
+ - Outputs and Notifications
218
+ - Real-time collaboration with users, subagents, and multi-agent teams
219
+ - Custom agents built from Agentspecs
220
+ - ...
76
221
 
77
222
  Each of these concerns deserves more than a one-off solution—they need deep, composable, and pluggable implementations.
78
223
 
@@ -83,8 +228,10 @@ The detailed guides for architecture, use cases, interactive chat, key concepts,
83
228
  - [Agent Runtimes Overview](https://agent-runtimes.datalayer.tech/)
84
229
  - [Integrations](https://agent-runtimes.datalayer.tech/integrations)
85
230
  - [Chat](https://agent-runtimes.datalayer.tech/chat)
86
- - [Transports](https://agent-runtimes.datalayer.tech/transports)
231
+ - [Protocols](https://agent-runtimes.datalayer.tech/protocols)
87
232
  - [Programmatic Tools](https://agent-runtimes.datalayer.tech/programmatic-tools)
233
+ - [Agent Nodes](https://agent-runtimes.datalayer.tech/nodes)
234
+ - [Endpoints](https://agent-runtimes.datalayer.tech/endpoints)
88
235
  - [CLI](https://agent-runtimes.datalayer.tech/cli)
89
236
 
90
237
  ## Agentspecs
@@ -0,0 +1,3 @@
1
+ import '../style/primer-primitives.css';
2
+ export declare function AgentNode(): import("react/jsx-runtime").JSX.Element;
3
+ export default AgentNode;