@datalayer/agent-runtimes 1.0.10 → 1.0.18
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 +82 -1
- package/lib/{AgentLexical.d.ts → AgentDocument.d.ts} +5 -5
- package/lib/{AgentLexical.js → AgentDocument.js} +156 -26
- package/lib/AgentNode.js +32 -31
- package/lib/AgentNotebook.js +172 -17
- package/lib/AppExamples2.css +47 -0
- package/lib/AppExamples2.d.ts +3 -0
- package/lib/AppExamples2.js +21 -0
- package/lib/{agent-lexical-main.js → agent-document-main.js} +2 -2
- package/lib/agents/AgentRuntimeChat.d.ts +73 -0
- package/lib/agents/AgentRuntimeChat.js +198 -0
- package/lib/api/index.d.ts +12 -0
- package/lib/api/index.js +46 -0
- package/lib/api/runtimes/checkpoints.d.ts +122 -0
- package/lib/api/runtimes/checkpoints.js +118 -0
- package/lib/api/runtimes/environments.d.ts +9 -0
- package/lib/api/runtimes/environments.js +29 -0
- package/lib/api/runtimes/healthz.d.ts +15 -0
- package/lib/api/runtimes/healthz.js +44 -0
- package/lib/api/runtimes/index.d.ts +12 -0
- package/lib/api/runtimes/index.js +16 -0
- package/lib/api/runtimes/runtimes.d.ts +138 -0
- package/lib/api/runtimes/runtimes.js +230 -0
- package/lib/api/runtimes/snapshots.d.ts +38 -0
- package/lib/api/runtimes/snapshots.js +82 -0
- package/lib/api/scheduler/index.d.ts +6 -0
- package/lib/api/scheduler/index.js +10 -0
- package/lib/api/scheduler/schedules.d.ts +85 -0
- package/lib/api/scheduler/schedules.js +78 -0
- package/lib/api/spacer/documents.d.ts +12 -0
- package/lib/api/spacer/documents.js +43 -0
- package/lib/api/spacer/healthz.d.ts +15 -0
- package/lib/api/spacer/healthz.js +44 -0
- package/lib/api/spacer/index.d.ts +15 -0
- package/lib/api/spacer/index.js +19 -0
- package/lib/api/spacer/items.d.ts +25 -0
- package/lib/api/spacer/items.js +55 -0
- package/lib/api/spacer/lexicals.d.ts +34 -0
- package/lib/api/spacer/lexicals.js +89 -0
- package/lib/api/spacer/notebooks.d.ts +34 -0
- package/lib/api/spacer/notebooks.js +89 -0
- package/lib/api/spacer/spaces.d.ts +84 -0
- package/lib/api/spacer/spaces.js +170 -0
- package/lib/api/spacer/users.d.ts +9 -0
- package/lib/api/spacer/users.js +29 -0
- package/lib/chat/Chat.d.ts +1 -1
- package/lib/chat/Chat.js +54 -54
- package/lib/chat/ChatFloating.d.ts +2 -2
- package/lib/chat/ChatFloating.js +136 -25
- package/lib/chat/ChatSidebar.js +20 -22
- package/lib/chat/base/ChatBase.js +429 -39
- package/lib/chat/display/EmptyState.js +21 -21
- package/lib/chat/document/EphemeralDocument.d.ts +23 -0
- package/lib/chat/document/EphemeralDocument.js +270 -0
- package/lib/chat/header/ChatHeaderBase.d.ts +12 -2
- package/lib/chat/header/ChatHeaderBase.js +78 -23
- package/lib/chat/index.d.ts +1 -0
- package/lib/chat/index.js +2 -0
- package/lib/chat/notebook/EphemeralNotebook.d.ts +24 -0
- package/lib/chat/notebook/EphemeralNotebook.js +252 -0
- package/lib/chat/prompt/InputFooter.js +4 -1
- package/lib/client/AgentRuntimesClient.d.ts +127 -0
- package/lib/client/AgentRuntimesClient.js +36 -0
- package/lib/client/AgentsMixin.js +28 -28
- package/lib/client/SdkAgentRuntimesClient.d.ts +1 -1
- package/lib/client/SdkAgentRuntimesClient.js +1 -1
- package/lib/client/mixins/RuntimesMixin.d.ts +93 -0
- package/lib/client/mixins/RuntimesMixin.js +229 -0
- package/lib/client/mixins/SpacerMixin.d.ts +210 -0
- package/lib/client/mixins/SpacerMixin.js +615 -0
- package/lib/client/utils/spacerUtils.d.ts +18 -0
- package/lib/client/utils/spacerUtils.js +32 -0
- package/lib/collaboration/DatalayerCollaboration.d.ts +13 -0
- package/lib/collaboration/DatalayerCollaboration.js +28 -0
- package/lib/collaboration/DatalayerCollaborationProvider.d.ts +58 -0
- package/lib/collaboration/DatalayerCollaborationProvider.js +148 -0
- package/lib/collaboration/index.d.ts +2 -0
- package/lib/collaboration/index.js +6 -0
- package/lib/components/AgentSummary.d.ts +19 -0
- package/lib/components/AgentSummary.js +89 -0
- package/lib/components/a2ui/A2uiSurfaceComposed.d.ts +13 -0
- package/lib/components/a2ui/A2uiSurfaceComposed.js +110 -0
- package/lib/components/a2ui/index.d.ts +2 -0
- package/lib/components/a2ui/index.js +6 -0
- package/lib/components/a2ui/styles.d.ts +14 -0
- package/lib/components/a2ui/styles.js +142 -0
- package/lib/components/context/SpaceSelect.d.ts +2 -0
- package/lib/components/context/SpaceSelect.js +42 -0
- package/lib/components/flashes/FlashDisclaimer.d.ts +2 -0
- package/lib/components/flashes/FlashDisclaimer.js +17 -0
- package/lib/components/icons/ArtifactIcon.d.ts +10 -0
- package/lib/components/icons/ArtifactIcon.js +58 -0
- package/lib/components/icons/index.d.ts +1 -0
- package/lib/components/icons/index.js +5 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.js +5 -0
- package/lib/components/nbgrader/NbGradesDetails.d.ts +5 -0
- package/lib/components/nbgrader/NbGradesDetails.js +19 -0
- package/lib/components/nbgrader/index.d.ts +1 -0
- package/lib/components/nbgrader/index.js +5 -0
- package/lib/components/progress/CreditsIndicator.d.ts +33 -0
- package/lib/components/progress/CreditsIndicator.js +23 -0
- package/lib/components/progress/index.d.ts +2 -0
- package/lib/components/progress/index.js +6 -0
- package/lib/components/runtimes/RuntimeCellVariables.d.ts +39 -0
- package/lib/components/runtimes/RuntimeCellVariables.js +172 -0
- package/lib/components/runtimes/RuntimeCellVariablesDialog.d.ts +37 -0
- package/lib/components/runtimes/RuntimeCellVariablesDialog.js +101 -0
- package/lib/components/runtimes/RuntimeLauncherDialog.d.ts +57 -0
- package/lib/components/runtimes/RuntimeLauncherDialog.js +275 -0
- package/lib/components/runtimes/RuntimePickerBase.d.ts +69 -0
- package/lib/components/runtimes/RuntimePickerBase.js +122 -0
- package/lib/components/runtimes/RuntimePickerCell.d.ts +34 -0
- package/lib/components/runtimes/RuntimePickerCell.js +104 -0
- package/lib/components/runtimes/RuntimePickerNotebook.d.ts +42 -0
- package/lib/components/runtimes/RuntimePickerNotebook.js +232 -0
- package/lib/components/runtimes/RuntimeReservationControl.d.ts +47 -0
- package/lib/components/runtimes/RuntimeReservationControl.js +42 -0
- package/lib/components/runtimes/RuntimeSimplePicker.d.ts +38 -0
- package/lib/components/runtimes/RuntimeSimplePicker.js +155 -0
- package/lib/components/runtimes/RuntimeTransfer.d.ts +16 -0
- package/lib/components/runtimes/RuntimeTransfer.js +5 -0
- package/lib/components/runtimes/RuntimeUtils.d.ts +17 -0
- package/lib/components/runtimes/RuntimeUtils.js +178 -0
- package/lib/components/runtimes/RuntimeVariables.d.ts +38 -0
- package/lib/components/runtimes/RuntimeVariables.js +75 -0
- package/lib/components/runtimes/index.d.ts +11 -0
- package/lib/components/runtimes/index.js +15 -0
- package/lib/components/scheduler/ScheduleMenu.d.ts +54 -0
- package/lib/components/scheduler/ScheduleMenu.js +154 -0
- package/lib/components/scheduler/index.d.ts +1 -0
- package/lib/components/scheduler/index.js +5 -0
- package/lib/components/snapshots/SandboxSnapshotMenu.d.ts +33 -0
- package/lib/components/snapshots/SandboxSnapshotMenu.js +169 -0
- package/lib/components/snapshots/index.d.ts +1 -0
- package/lib/components/snapshots/index.js +5 -0
- package/lib/components/snippets/SnippetDialog.d.ts +42 -0
- package/lib/components/snippets/SnippetDialog.js +42 -0
- package/lib/components/students/StudentItemStatus.d.ts +7 -0
- package/lib/components/students/StudentItemStatus.js +68 -0
- package/lib/components/students/index.d.ts +1 -0
- package/lib/components/students/index.js +5 -0
- package/lib/components/tokens/SpaceVariantToken.d.ts +5 -0
- package/lib/components/tokens/SpaceVariantToken.js +23 -0
- package/lib/components/tokens/index.d.ts +1 -0
- package/lib/components/tokens/index.js +5 -0
- package/lib/components/toolbars/AssignmentEditorToolbar.d.ts +4 -0
- package/lib/components/toolbars/AssignmentEditorToolbar.js +18 -0
- package/lib/components/toolbars/DocumentEditorToolbar.d.ts +2 -0
- package/lib/components/toolbars/DocumentEditorToolbar.js +12 -0
- package/lib/components/toolbars/NotebookEditorToolbar.d.ts +29 -0
- package/lib/components/toolbars/NotebookEditorToolbar.js +30 -0
- package/lib/context/ContextInspector.d.ts +1 -14
- package/lib/context/ContextInspector.js +3 -73
- package/lib/context/CostUsageChart.d.ts +4 -3
- package/lib/context/CostUsageChart.js +236 -35
- package/lib/context/MessageHistory.d.ts +30 -0
- package/lib/context/MessageHistory.js +129 -0
- package/lib/context/TokenUsageChart.d.ts +4 -3
- package/lib/context/TokenUsageChart.js +180 -30
- package/lib/context/TurnGraphChart.d.ts +1 -1
- package/lib/context/TurnGraphChart.js +6 -6
- package/lib/examples/A2UiAgentExample.d.ts +22 -0
- package/lib/examples/A2UiAgentExample.js +442 -0
- package/lib/examples/A2UiComponentsGalleryExample.d.ts +3 -0
- package/lib/examples/A2UiComponentsGalleryExample.js +863 -0
- package/lib/examples/A2UiContactCardExample.js +9 -5
- package/lib/examples/A2UiRestaurantExample.js +23 -8
- package/lib/examples/A2UiViewerExample.js +75 -3
- package/lib/examples/AgUiAgenticExample.d.ts +1 -12
- package/lib/examples/AgUiAgenticExample.js +52 -8
- package/lib/examples/AgUiBackendToolRenderingExample.d.ts +1 -16
- package/lib/examples/AgUiBackendToolRenderingExample.js +32 -17
- package/lib/examples/AgUiHaikuGenUiExample.d.ts +1 -17
- package/lib/examples/AgUiHaikuGenUiExample.js +49 -33
- package/lib/examples/AgUiHumanInTheLoopExample.d.ts +1 -12
- package/lib/examples/AgUiHumanInTheLoopExample.js +21 -6
- package/lib/examples/AgUiSharedStateExample.d.ts +1 -14
- package/lib/examples/AgUiSharedStateExample.js +21 -6
- package/lib/examples/AgUiToolsBasedGenUiExample.d.ts +1 -14
- package/lib/examples/AgUiToolsBasedGenUiExample.js +21 -6
- package/lib/examples/AgentCheckpointsExample.d.ts +1 -1
- package/lib/examples/AgentCheckpointsExample.js +9 -10
- package/lib/examples/AgentCodeSandboxesExample.d.ts +3 -0
- package/lib/examples/AgentCodeSandboxesExample.js +192 -0
- package/lib/examples/AgentCodemodeExample.js +3 -3
- package/lib/examples/AgentEvalsExample.js +5 -5
- package/lib/examples/AgentGuardrailsExample.js +17 -12
- package/lib/examples/AgentHooksExample.js +14 -55
- package/lib/examples/AgentInferenceProviderExample.js +4 -4
- package/lib/examples/AgentLoopExample.d.ts +10 -0
- package/lib/examples/AgentLoopExample.js +304 -0
- package/lib/examples/AgentMCPExample.js +7 -7
- package/lib/examples/AgentMemoryExample.js +4 -4
- package/lib/examples/AgentMonitoringExample.js +114 -44
- package/lib/examples/AgentNotificationsExample.js +4 -4
- package/lib/examples/AgentOtelExample.d.ts +3 -3
- package/lib/examples/AgentOtelExample.js +15 -10
- package/lib/examples/AgentOutputsExample.js +6 -6
- package/lib/examples/AgentParametersExample.js +21 -33
- package/lib/examples/AgentSandboxExample.js +5 -5
- package/lib/examples/AgentSkillsExample.js +7 -7
- package/lib/examples/AgentSubagentsExample.js +4 -4
- package/lib/examples/AgentToolApprovalsExample.js +5 -5
- package/lib/examples/AgentTriggersExample.js +9 -9
- package/lib/examples/AgentspecsExample.js +63 -41
- package/lib/examples/ChatCustomExample.js +23 -77
- package/lib/examples/ChatExample.js +13 -44
- package/lib/examples/LexicalAgentExample.js +43 -91
- package/lib/examples/LexicalAgentSidebarExample.js +45 -73
- package/lib/examples/NotebookAgentExample.js +52 -81
- package/lib/examples/NotebookAgentSidebarExample.js +43 -71
- package/lib/examples/NotebookCollaborationExample.js +11 -9
- package/lib/examples/NotebookExample.js +5 -2
- package/lib/examples/components/AuthRequiredView.js +1 -1
- package/lib/examples/components/ExampleErrorBoundary.d.ts +46 -0
- package/lib/examples/components/ExampleErrorBoundary.js +67 -0
- package/lib/examples/components/haiku/haiku-card.css +11 -0
- package/lib/examples/components/weather/weather-card.css +11 -0
- package/lib/examples/example-selector.js +4 -1
- package/lib/examples/hooks/useExampleAgentRuntime.d.ts +35 -0
- package/lib/examples/hooks/useExampleAgentRuntime.js +82 -0
- package/lib/examples/hooks/useSpecRenderToolResult.d.ts +30 -0
- package/lib/examples/hooks/useSpecRenderToolResult.js +61 -0
- package/lib/examples/index.d.ts +4 -1
- package/lib/examples/index.js +4 -1
- package/lib/examples/main.js +340 -93
- package/lib/examples/utils/a2ui.d.ts +2 -0
- package/lib/examples/utils/a2ui.js +97 -2
- package/lib/examples/utils/agentSummaryStore.d.ts +21 -0
- package/lib/examples/utils/agentSummaryStore.js +23 -0
- package/lib/examples/utils/notebooks/Empty.ipynb.json +30 -30
- package/lib/examples/utils/runtimeTargetStore.d.ts +9 -0
- package/lib/examples/utils/runtimeTargetStore.js +27 -0
- package/lib/examples/utils/teardownAgents.d.ts +13 -0
- package/lib/examples/utils/teardownAgents.js +78 -0
- package/lib/examples/utils/useExampleAgentRuntimesUrl.d.ts +2 -0
- package/lib/examples/utils/useExampleAgentRuntimesUrl.js +26 -7
- package/lib/examples2/CellExample.d.ts +6 -0
- package/lib/examples2/CellExample.js +20 -0
- package/lib/examples2/DatalayerNotebookExample.d.ts +16 -0
- package/lib/examples2/DatalayerNotebookExample.js +109 -0
- package/lib/examples2/NativeNavigationExample.d.ts +8 -0
- package/lib/examples2/NativeNavigationExample.js +97 -0
- package/lib/examples2/NotebookExample.d.ts +6 -0
- package/lib/examples2/NotebookExample.js +19 -0
- package/lib/examples2/NotebookMutationsKernel.d.ts +2 -0
- package/lib/examples2/NotebookMutationsKernel.js +105 -0
- package/lib/examples2/NotebookMutationsServiceManager.d.ts +2 -0
- package/lib/examples2/NotebookMutationsServiceManager.js +109 -0
- package/lib/examples2/ReactRouterExample.d.ts +6 -0
- package/lib/examples2/ReactRouterExample.js +175 -0
- package/lib/examples2/example-selector.d.ts +22 -0
- package/lib/examples2/example-selector.js +45 -0
- package/lib/examples2/index.d.ts +2 -0
- package/lib/examples2/index.js +6 -0
- package/lib/examples2/lexical-theme.css +436 -0
- package/lib/examples2/main.d.ts +2 -0
- package/lib/examples2/main.js +330 -0
- package/lib/examples2/notebooks/IPyWidgetsExample.ipynb.json +101 -0
- package/lib/examples2/notebooks/IPyWidgetsExampleWithState.ipynb.json +112 -0
- package/lib/examples2/notebooks/Lite.ipynb.json +128 -0
- package/lib/examples2/notebooks/Matplotlib.ipynb.json +137 -0
- package/lib/examples2/notebooks/NotebookExample1.ipynb.json +126 -0
- package/lib/examples2/notebooks/NotebookExample2.ipynb.json +48 -0
- package/lib/examples2/notebooks/NotebookOutputs.ipynb.json +49 -0
- package/lib/examples2/notebooks/NotebookToCExample.ipynb.json +102 -0
- package/lib/examples2/notebooks/OutputIPyWidgetsExample.d.ts +145 -0
- package/lib/examples2/notebooks/OutputIPyWidgetsExample.js +153 -0
- package/lib/examples2/notebooks/PyGWalker.ipynb.json +55 -0
- package/lib/hooks/index.d.ts +9 -1
- package/lib/hooks/index.js +13 -1
- package/lib/hooks/useAIAgentsWebSocket.d.ts +1 -1
- package/lib/hooks/useAIAgentsWebSocket.js +39 -3
- package/lib/hooks/useAgentRuntimes.d.ts +15 -3
- package/lib/hooks/useAgentRuntimes.js +186 -27
- package/lib/hooks/useAgentsService.js +5 -5
- package/lib/hooks/useCellOutputshot.d.ts +4 -0
- package/lib/hooks/useCellOutputshot.js +25 -0
- package/lib/hooks/useCheckpoints.d.ts +8 -8
- package/lib/hooks/useCheckpoints.js +36 -26
- package/lib/hooks/useConfig.d.ts +1 -1
- package/lib/hooks/useMonitoring.d.ts +7 -5
- package/lib/hooks/useMonitoring.js +16 -10
- package/lib/hooks/useNotifications.d.ts +11 -11
- package/lib/hooks/useNotifications.js +1 -1
- package/lib/hooks/useProgressStore.d.ts +25 -0
- package/lib/hooks/useProgressStore.js +58 -0
- package/lib/hooks/useProgressTask.d.ts +9 -0
- package/lib/hooks/useProgressTask.js +41 -0
- package/lib/hooks/useProjects.d.ts +628 -0
- package/lib/hooks/useProjects.js +190 -0
- package/lib/hooks/useRuntimes.d.ts +5 -0
- package/lib/hooks/useRuntimes.js +34 -0
- package/lib/hooks/useToolApprovals.d.ts +6 -6
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/jupyter/exec/Python.d.ts +5 -0
- package/lib/jupyter/exec/Python.js +100 -0
- package/lib/jupyter/exec/Snippets.d.ts +105 -0
- package/lib/jupyter/exec/Snippets.js +101 -0
- package/lib/jupyter/exec/index.d.ts +2 -0
- package/lib/jupyter/exec/index.js +6 -0
- package/lib/jupyter/index.d.ts +2 -0
- package/lib/jupyter/index.js +6 -0
- package/lib/jupyter/kernelsHandler.d.ts +8 -0
- package/lib/jupyter/kernelsHandler.js +39 -0
- package/lib/mocks/models/CourseMock.d.ts +6 -0
- package/lib/mocks/models/CourseMock.js +29 -0
- package/lib/mocks/models/SpaceMock.d.ts +6 -0
- package/lib/mocks/models/SpaceMock.js +25 -0
- package/lib/models/Assignment.d.ts +7 -0
- package/lib/models/Assignment.js +5 -0
- package/lib/models/Cell.d.ts +8 -0
- package/lib/models/Cell.js +5 -0
- package/lib/models/CodeBlock.d.ts +10 -0
- package/lib/models/CodeBlock.js +5 -0
- package/lib/models/CodeSandboxSnapshot.d.ts +92 -0
- package/lib/models/CodeSandboxSnapshot.js +13 -0
- package/lib/models/CodeSandboxSnapshotDTO.d.ts +173 -0
- package/lib/models/CodeSandboxSnapshotDTO.js +139 -0
- package/lib/models/CodefeedBlocks.d.ts +7 -0
- package/lib/models/CodefeedBlocks.js +5 -0
- package/lib/models/Content.d.ts +5 -0
- package/lib/models/Content.js +5 -0
- package/lib/models/Course.d.ts +17 -0
- package/lib/models/Course.js +5 -0
- package/lib/models/Dataset.d.ts +16 -0
- package/lib/models/Dataset.js +5 -0
- package/lib/models/Document.d.ts +8 -0
- package/lib/models/Document.js +5 -0
- package/lib/models/Environment.d.ts +86 -0
- package/lib/models/Environment.js +5 -0
- package/lib/models/EnvironmentDTO.d.ts +125 -0
- package/lib/models/EnvironmentDTO.js +88 -0
- package/lib/models/Exercise.d.ts +16 -0
- package/lib/models/Exercise.js +5 -0
- package/lib/models/Item.d.ts +20 -0
- package/lib/models/Item.js +5 -0
- package/lib/models/ItemDTO.d.ts +74 -0
- package/lib/models/ItemDTO.js +186 -0
- package/lib/models/ItemType.d.ts +2 -0
- package/lib/models/ItemType.js +5 -0
- package/lib/models/Lesson.d.ts +5 -0
- package/lib/models/Lesson.js +5 -0
- package/lib/models/LexicalDTO.d.ts +155 -0
- package/lib/models/LexicalDTO.js +157 -0
- package/lib/models/Library.d.ts +10 -0
- package/lib/models/Library.js +5 -0
- package/lib/models/Notebook.d.ts +11 -0
- package/lib/models/Notebook.js +5 -0
- package/lib/models/NotebookDTO.d.ts +96 -0
- package/lib/models/NotebookDTO.js +153 -0
- package/lib/models/Page.d.ts +41 -0
- package/lib/models/Page.js +25 -0
- package/lib/models/PageTag.d.ts +19 -0
- package/lib/models/PageTag.js +94 -0
- package/lib/models/ProjectDTO.d.ts +89 -0
- package/lib/models/ProjectDTO.js +131 -0
- package/lib/models/Runtime.d.ts +160 -0
- package/lib/models/Runtime.js +18 -0
- package/lib/models/RuntimeDTO.d.ts +172 -0
- package/lib/models/RuntimeDTO.js +204 -0
- package/lib/models/Space.d.ts +35 -0
- package/lib/models/Space.js +66 -0
- package/lib/models/SpaceDTO.d.ts +334 -0
- package/lib/models/SpaceDTO.js +244 -0
- package/lib/models/SpaceItem.d.ts +10 -0
- package/lib/models/SpaceItem.js +5 -0
- package/lib/models/SpaceMember.d.ts +6 -0
- package/lib/models/SpaceMember.js +5 -0
- package/lib/models/StudentItem.d.ts +21 -0
- package/lib/models/StudentItem.js +5 -0
- package/lib/models/index.d.ts +32 -0
- package/lib/models/index.js +39 -0
- package/lib/protocols/AGUIAdapter.js +1 -1
- package/lib/runtimes/actions.d.ts +102 -0
- package/lib/runtimes/actions.js +249 -0
- package/lib/runtimes/apis.d.ts +273 -0
- package/lib/runtimes/apis.js +5 -0
- package/lib/runtimes/index.d.ts +5 -0
- package/lib/runtimes/index.js +9 -0
- package/lib/runtimes/settings.d.ts +15 -0
- package/lib/runtimes/settings.js +31 -0
- package/lib/runtimes/snapshots.d.ts +25 -0
- package/lib/runtimes/snapshots.js +150 -0
- package/lib/runtimes/utils.d.ts +7 -0
- package/lib/runtimes/utils.js +14 -0
- package/lib/services/DatalayerServiceManager.d.ts +23 -0
- package/lib/services/DatalayerServiceManager.js +90 -0
- package/lib/services/reconnectToRuntime.d.ts +32 -0
- package/lib/services/reconnectToRuntime.js +59 -0
- package/lib/services/sandboxServiceManagers.d.ts +31 -0
- package/lib/services/sandboxServiceManagers.js +57 -0
- package/lib/specs/agents/agents.d.ts +78 -26
- package/lib/specs/agents/agents.js +4434 -1639
- package/lib/specs/index.d.ts +1 -0
- package/lib/specs/index.js +1 -0
- package/lib/specs/loops.d.ts +34 -0
- package/lib/specs/loops.js +188 -0
- package/lib/specs/mcpServers.d.ts +1 -0
- package/lib/specs/mcpServers.js +17 -0
- package/lib/specs/models.d.ts +4 -0
- package/lib/specs/models.js +30 -0
- package/lib/specs/skills.d.ts +1 -0
- package/lib/specs/skills.js +18 -0
- package/lib/specs/tools.d.ts +15 -0
- package/lib/specs/tools.js +285 -0
- package/lib/state/index.d.ts +4 -0
- package/lib/state/index.js +10 -0
- package/lib/state/substates/CellState.d.ts +12 -0
- package/lib/state/substates/CellState.js +22 -0
- package/lib/state/substates/DocumentState.d.ts +10 -0
- package/lib/state/substates/DocumentState.js +14 -0
- package/lib/state/substates/GradeState.d.ts +10 -0
- package/lib/state/substates/GradeState.js +14 -0
- package/lib/state/substates/JupyterLabState.d.ts +16 -0
- package/lib/state/substates/JupyterLabState.js +17 -0
- package/lib/state/substates/NbformatState.d.ts +13 -0
- package/lib/state/substates/NbformatState.js +16 -0
- package/lib/state/substates/RuntimesState.d.ts +87 -0
- package/lib/state/substates/RuntimesState.js +192 -0
- package/lib/state/substates/SpaceState.d.ts +11 -0
- package/lib/state/substates/SpaceState.js +16 -0
- package/lib/state/substates/index.d.ts +8 -0
- package/lib/state/substates/index.js +14 -0
- package/lib/stores/agentRuntimeStore.d.ts +25 -2
- package/lib/stores/agentRuntimeStore.js +114 -19
- package/lib/stories/Button.stories.d.ts +1 -1
- package/lib/stories/Header.stories.d.ts +3 -3
- package/lib/test-setup.js +10 -0
- package/lib/types/agents-lifecycle.d.ts +5 -5
- package/lib/types/agents.d.ts +3 -3
- package/lib/types/agentspecs.d.ts +4 -2
- package/lib/types/chat.d.ts +135 -3
- package/lib/types/config.d.ts +19 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/loops.d.ts +64 -0
- package/lib/types/loops.js +5 -0
- package/lib/types/tools.d.ts +16 -0
- package/lib/utils/Cells.d.ts +2 -0
- package/lib/utils/Cells.js +28 -0
- package/package.json +24 -18
- package/scripts/codegen/__pycache__/generate_sandbox_agents.cpython-313.pyc +0 -0
- package/scripts/codegen/__pycache__/versioning.cpython-313.pyc +0 -0
- package/scripts/codegen/generate_agents.py +21 -4
- package/scripts/codegen/generate_loops.py +443 -0
- package/scripts/codegen/generate_sandbox_agents.py +145 -0
- package/lib/examples/A2UiComponentGalleryExample.d.ts +0 -3
- package/lib/examples/A2UiComponentGalleryExample.js +0 -361
- /package/lib/{agent-lexical-main.d.ts → agent-document-main.d.ts} +0 -0
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import { Box } from '@datalayer/primer-addons';
|
|
8
8
|
import { Button, Text } from '@primer/react';
|
|
9
|
-
import {
|
|
9
|
+
import { A2UI_RENDER_SCOPE_SX, A2uiSurfaceComposed } from '../components/a2ui';
|
|
10
10
|
import { ThemedProvider } from './utils/themedProvider';
|
|
11
11
|
import { A2uiMarkdownProvider } from './utils/a2uiMarkdownProvider';
|
|
12
12
|
import { createSceneMessages, useA2uiProcessor } from './utils/a2ui';
|
|
@@ -121,7 +121,7 @@ const CONTACT_CARD_MESSAGES = createSceneMessages({
|
|
|
121
121
|
},
|
|
122
122
|
});
|
|
123
123
|
function ContactCardContent({ onAction, }) {
|
|
124
|
-
const { surfaces, processMessages, resetSurfaces } = useA2uiProcessor(onAction);
|
|
124
|
+
const { surfaces, processMessages, resetSurfaces, themeStyle } = useA2uiProcessor(onAction);
|
|
125
125
|
const loadCard = useCallback(() => {
|
|
126
126
|
resetSurfaces();
|
|
127
127
|
processMessages(CONTACT_CARD_MESSAGES);
|
|
@@ -129,18 +129,22 @@ function ContactCardContent({ onAction, }) {
|
|
|
129
129
|
useEffect(() => {
|
|
130
130
|
loadCard();
|
|
131
131
|
}, [loadCard]);
|
|
132
|
-
return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 3, px: 3, pb: 3 }, children: [_jsxs(Box, { sx: { display: 'flex', gap: 2 }, children: [_jsx(Button, { size: "small", variant: "primary", onClick: loadCard, children: "Reload Card" }), _jsx(Button, { size: "small", variant: "invisible", onClick: resetSurfaces, children: "Clear" })] }), _jsx(Box, {
|
|
132
|
+
return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 3, px: 3, pb: 3 }, children: [_jsxs(Box, { sx: { display: 'flex', gap: 2 }, children: [_jsx(Button, { size: "small", variant: "primary", onClick: loadCard, children: "Reload Card" }), _jsx(Button, { size: "small", variant: "invisible", onClick: resetSurfaces, children: "Clear" })] }), _jsx(Box, { style: themeStyle, sx: {
|
|
133
|
+
...A2UI_RENDER_SCOPE_SX,
|
|
134
|
+
display: 'grid',
|
|
135
|
+
gap: 3,
|
|
136
|
+
}, children: surfaces.map(surface => (_jsx(Box, { sx: {
|
|
133
137
|
border: '1px solid',
|
|
134
138
|
borderColor: 'border.default',
|
|
135
139
|
borderRadius: 2,
|
|
136
140
|
p: 3,
|
|
137
141
|
backgroundColor: 'canvas.subtle',
|
|
138
|
-
}, children: _jsx(
|
|
142
|
+
}, children: _jsx(A2uiSurfaceComposed, { surface: surface }) }, surface.id))) })] }));
|
|
139
143
|
}
|
|
140
144
|
const A2UiContactCardExample = () => {
|
|
141
145
|
const [lastAction, setLastAction] = useState(null);
|
|
142
146
|
const handleAction = useCallback((action) => {
|
|
143
|
-
console.
|
|
147
|
+
console.warn('A2UI Contact Card Action:', action);
|
|
144
148
|
setLastAction(action);
|
|
145
149
|
}, []);
|
|
146
150
|
const actionPreview = useMemo(() => {
|
|
@@ -6,12 +6,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { Box, getCardGradient } from '@datalayer/primer-addons';
|
|
8
8
|
import { Text, Spinner, TextInput, Button } from '@primer/react';
|
|
9
|
-
import {
|
|
9
|
+
import { A2UI_RENDER_SCOPE_SX, A2uiSurfaceComposed } from '../components/a2ui';
|
|
10
|
+
import { basicCatalog } from '@a2ui/react/v0_9';
|
|
10
11
|
import { ThemedProvider } from './utils/themedProvider';
|
|
11
12
|
import { A2uiMarkdownProvider } from './utils/a2uiMarkdownProvider';
|
|
12
13
|
import { useExampleThemeStore } from './utils/themeStore';
|
|
13
14
|
import { useA2uiProcessor } from './utils/a2ui';
|
|
14
|
-
|
|
15
|
+
import { useExampleAgentRuntimesUrl } from './utils/useExampleAgentRuntimesUrl';
|
|
15
16
|
const LOADING_TEXT_LINES = [
|
|
16
17
|
'Finding the best spots for you...',
|
|
17
18
|
'Checking reviews...',
|
|
@@ -27,6 +28,13 @@ const extractV09Messages = (data) => {
|
|
|
27
28
|
}
|
|
28
29
|
const message = part.data;
|
|
29
30
|
if (message.version === 'v0.9') {
|
|
31
|
+
// Normalize the catalog id so surfaces render regardless of which
|
|
32
|
+
// catalog URL variant the backend/LLM emits (the frontend only has the
|
|
33
|
+
// registered basicCatalog).
|
|
34
|
+
const createSurface = message.createSurface;
|
|
35
|
+
if (createSurface && createSurface.catalogId !== basicCatalog.id) {
|
|
36
|
+
createSurface.catalogId = basicCatalog.id;
|
|
37
|
+
}
|
|
30
38
|
messages.push(message);
|
|
31
39
|
}
|
|
32
40
|
});
|
|
@@ -62,6 +70,8 @@ function RestaurantSearch({ onSearch, isLoading, }) {
|
|
|
62
70
|
}, children: _jsx(Text, { sx: { fontSize: '4rem' }, children: "\uD83C\uDF7D\uFE0F" }) }), _jsx(Text, { as: "h1", sx: { fontSize: '2rem', fontWeight: 'bold', textAlign: 'center' }, children: "Restaurant Finder" }), _jsx(Text, { sx: { color: 'fg.muted', textAlign: 'center' }, children: "A2UI renderer connected to a live agent backend." }), _jsx("form", { onSubmit: handleSubmit, style: { width: '100%' }, children: _jsxs(Box, { sx: { display: 'flex', gap: 2 }, children: [_jsx(TextInput, { value: inputValue, onChange: e => setInputValue(e.target.value), placeholder: "Search for restaurants...", disabled: isLoading, sx: { flex: 1 }, block: true }), _jsx(Button, { type: "submit", disabled: isLoading || !inputValue.trim(), children: isLoading ? _jsx(Spinner, { size: "small" }) : 'Search' })] }) })] }));
|
|
63
71
|
}
|
|
64
72
|
const A2UiRestaurantExample = () => {
|
|
73
|
+
const baseUrl = useExampleAgentRuntimesUrl();
|
|
74
|
+
const a2uiRestaurantEndpoint = `${baseUrl}/api/v1/a2ui/restaurant/`;
|
|
65
75
|
const [isLoading, setIsLoading] = useState(false);
|
|
66
76
|
const [error, setError] = useState(null);
|
|
67
77
|
const [hasData, setHasData] = useState(false);
|
|
@@ -77,7 +87,7 @@ const A2UiRestaurantExample = () => {
|
|
|
77
87
|
context: action.context,
|
|
78
88
|
});
|
|
79
89
|
}, []);
|
|
80
|
-
const { surfaces, processMessages, resetSurfaces } = useA2uiProcessor(handleAction);
|
|
90
|
+
const { surfaces, processMessages, resetSurfaces, themeStyle } = useA2uiProcessor(handleAction);
|
|
81
91
|
useEffect(() => {
|
|
82
92
|
if (!isLoading) {
|
|
83
93
|
return;
|
|
@@ -94,7 +104,7 @@ const A2UiRestaurantExample = () => {
|
|
|
94
104
|
setIsLoading(true);
|
|
95
105
|
setError(null);
|
|
96
106
|
setLoadingTextIndex(0);
|
|
97
|
-
const response = await fetch(
|
|
107
|
+
const response = await fetch(a2uiRestaurantEndpoint, {
|
|
98
108
|
method: 'POST',
|
|
99
109
|
headers: { 'Content-Type': 'application/json' },
|
|
100
110
|
body: JSON.stringify(payload),
|
|
@@ -124,7 +134,7 @@ const A2UiRestaurantExample = () => {
|
|
|
124
134
|
finally {
|
|
125
135
|
setIsLoading(false);
|
|
126
136
|
}
|
|
127
|
-
}, [processMessages, resetSurfaces]);
|
|
137
|
+
}, [processMessages, resetSurfaces, a2uiRestaurantEndpoint]);
|
|
128
138
|
useEffect(() => {
|
|
129
139
|
sendPayloadRef.current = sendPayload;
|
|
130
140
|
}, [sendPayload]);
|
|
@@ -156,17 +166,22 @@ const A2UiRestaurantExample = () => {
|
|
|
156
166
|
alignItems: 'center',
|
|
157
167
|
gap: 3,
|
|
158
168
|
p: 4,
|
|
159
|
-
}, children: [_jsxs(Text, { sx: { color: 'danger.fg' }, children: ["\u26A0\uFE0F ", error] }), _jsx(Button, { onClick: handleRetry, disabled: !lastQuery, children: "Retry" })] })), !isLoading && hasData && !error && (_jsxs(Box, {
|
|
169
|
+
}, children: [_jsxs(Text, { sx: { color: 'danger.fg' }, children: ["\u26A0\uFE0F ", error] }), _jsx(Button, { onClick: handleRetry, disabled: !lastQuery, children: "Retry" })] })), !isLoading && hasData && !error && (_jsxs(Box, { style: themeStyle, sx: {
|
|
170
|
+
...A2UI_RENDER_SCOPE_SX,
|
|
171
|
+
display: 'flex',
|
|
172
|
+
flexDirection: 'column',
|
|
173
|
+
gap: 3,
|
|
174
|
+
}, children: [_jsx(Button, { variant: "invisible", sx: { alignSelf: 'flex-start' }, onClick: () => setHasData(false), children: "\u2190 New Search" }), surfaces.map(surface => (_jsx(Box, { sx: {
|
|
160
175
|
border: '1px solid',
|
|
161
176
|
borderColor: 'border.default',
|
|
162
177
|
borderRadius: 1,
|
|
163
178
|
p: 3,
|
|
164
|
-
}, children: _jsx(
|
|
179
|
+
}, children: _jsx(A2uiSurfaceComposed, { surface: surface }) }, surface.id)))] }))] }), _jsx(Box, { sx: {
|
|
165
180
|
p: 2,
|
|
166
181
|
borderTop: '1px solid',
|
|
167
182
|
borderColor: 'border.default',
|
|
168
183
|
backgroundColor: 'canvas.subtle',
|
|
169
184
|
textAlign: 'center',
|
|
170
|
-
}, children: _jsxs(Text, { sx: { fontSize: '0.75rem', color: 'fg.muted' }, children: ["Backend: ",
|
|
185
|
+
}, children: _jsxs(Text, { sx: { fontSize: '0.75rem', color: 'fg.muted' }, children: ["Backend: ", a2uiRestaurantEndpoint] }) })] }) }) }));
|
|
171
186
|
};
|
|
172
187
|
export default A2UiRestaurantExample;
|
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import { Box } from '@datalayer/primer-addons';
|
|
8
8
|
import { SegmentedControl, Text } from '@primer/react';
|
|
9
|
-
import {
|
|
9
|
+
import { A2UI_RENDER_SCOPE_SX, A2uiSurfaceComposed } from '../components/a2ui';
|
|
10
10
|
import { ThemedProvider } from './utils/themedProvider';
|
|
11
11
|
import { A2uiMarkdownProvider } from './utils/a2uiMarkdownProvider';
|
|
12
12
|
import { createSceneMessages, useA2uiProcessor } from './utils/a2ui';
|
|
@@ -264,9 +264,75 @@ const SCENES = [
|
|
|
264
264
|
],
|
|
265
265
|
}),
|
|
266
266
|
},
|
|
267
|
+
{
|
|
268
|
+
id: 'shipping',
|
|
269
|
+
label: 'Shipping Status',
|
|
270
|
+
emoji: '📦',
|
|
271
|
+
description: 'Order fulfillment timeline with current package state.',
|
|
272
|
+
messages: createSceneMessages({
|
|
273
|
+
surfaceId: 'viewer-shipping',
|
|
274
|
+
components: [
|
|
275
|
+
{ id: 'root', component: 'Card', child: 'main' },
|
|
276
|
+
{
|
|
277
|
+
id: 'main',
|
|
278
|
+
component: 'Column',
|
|
279
|
+
children: [
|
|
280
|
+
'title-row',
|
|
281
|
+
'tracking',
|
|
282
|
+
'divider',
|
|
283
|
+
'status-1',
|
|
284
|
+
'status-2',
|
|
285
|
+
'status-3',
|
|
286
|
+
'eta',
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
id: 'title-row',
|
|
291
|
+
component: 'Row',
|
|
292
|
+
align: 'center',
|
|
293
|
+
children: ['title-icon', 'title'],
|
|
294
|
+
},
|
|
295
|
+
{ id: 'title-icon', component: 'Icon', name: 'inventory' },
|
|
296
|
+
{
|
|
297
|
+
id: 'title',
|
|
298
|
+
component: 'Text',
|
|
299
|
+
variant: 'h2',
|
|
300
|
+
text: 'Package Status',
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
id: 'tracking',
|
|
304
|
+
component: 'Text',
|
|
305
|
+
variant: 'caption',
|
|
306
|
+
text: { path: '/tracking' },
|
|
307
|
+
},
|
|
308
|
+
{ id: 'divider', component: 'Divider' },
|
|
309
|
+
{ id: 'status-1', component: 'Text', text: { path: '/statusPlaced' } },
|
|
310
|
+
{ id: 'status-2', component: 'Text', text: { path: '/statusShipped' } },
|
|
311
|
+
{
|
|
312
|
+
id: 'status-3',
|
|
313
|
+
component: 'Text',
|
|
314
|
+
variant: 'h3',
|
|
315
|
+
text: { path: '/statusDelivery' },
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
id: 'eta',
|
|
319
|
+
component: 'Text',
|
|
320
|
+
variant: 'caption',
|
|
321
|
+
text: { path: '/eta' },
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
value: {
|
|
325
|
+
tracking: 'Tracking: 17999AA10123456784',
|
|
326
|
+
statusPlaced: '✓ Order Placed',
|
|
327
|
+
statusShipped: '✓ Shipped',
|
|
328
|
+
statusDelivery: '🚚 Out for Delivery',
|
|
329
|
+
eta: 'Estimated delivery: Today by 8 PM',
|
|
330
|
+
},
|
|
331
|
+
}),
|
|
332
|
+
},
|
|
267
333
|
];
|
|
268
334
|
function ViewerContent({ onAction, }) {
|
|
269
|
-
const { surfaces, processMessages, resetSurfaces } = useA2uiProcessor(onAction);
|
|
335
|
+
const { surfaces, processMessages, resetSurfaces, themeStyle } = useA2uiProcessor(onAction);
|
|
270
336
|
const [selectedSceneId, setSelectedSceneId] = useState(SCENES[0].id);
|
|
271
337
|
const selectedScene = useMemo(() => SCENES.find(scene => scene.id === selectedSceneId) ?? SCENES[0], [selectedSceneId]);
|
|
272
338
|
useEffect(() => {
|
|
@@ -283,7 +349,13 @@ function ViewerContent({ onAction, }) {
|
|
|
283
349
|
display: 'flex',
|
|
284
350
|
flexDirection: 'column',
|
|
285
351
|
gap: 3,
|
|
286
|
-
}, children: [_jsx(Text, { sx: { fontSize: 2, fontWeight: 'bold' }, children: "Select Scene" }), _jsx(SegmentedControl, { "aria-label": "A2UI viewer scene picker", fullWidth: true, children: SCENES.map(scene => (_jsx(SegmentedControl.Button, { selected: scene.id === selectedSceneId, onClick: () => setSelectedSceneId(scene.id), children: `${scene.emoji} ${scene.label}` }, scene.id))) }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: selectedScene.description })] }), _jsx(Box, {
|
|
352
|
+
}, children: [_jsx(Text, { sx: { fontSize: 2, fontWeight: 'bold' }, children: "Select Scene" }), _jsx(SegmentedControl, { "aria-label": "A2UI viewer scene picker", fullWidth: true, children: SCENES.map(scene => (_jsx(SegmentedControl.Button, { selected: scene.id === selectedSceneId, onClick: () => setSelectedSceneId(scene.id), children: `${scene.emoji} ${scene.label}` }, scene.id))) }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: selectedScene.description })] }), _jsx(Box, { style: themeStyle, sx: {
|
|
353
|
+
...A2UI_RENDER_SCOPE_SX,
|
|
354
|
+
width: '100%',
|
|
355
|
+
display: 'flex',
|
|
356
|
+
flexDirection: 'column',
|
|
357
|
+
gap: 3,
|
|
358
|
+
}, children: surfaces.map(surface => (_jsx(Box, { sx: { width: '100%' }, children: _jsx(A2uiSurfaceComposed, { surface: surface }) }, surface.id))) })] }));
|
|
287
359
|
}
|
|
288
360
|
const A2UiViewerExample = () => {
|
|
289
361
|
const [lastAction, setLastAction] = useState(null);
|
|
@@ -7,19 +7,8 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This is the simplest AG-UI example showing basic chat with tool use.
|
|
9
9
|
*
|
|
10
|
-
* Backend:
|
|
10
|
+
* Backend: managed AG-UI agent runtime (agentspec: example-agentic-chat)
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
-
/**
|
|
14
|
-
* AgUiAgenticExample Component
|
|
15
|
-
*
|
|
16
|
-
* Shows a floating chat button that opens a chat popup connected to
|
|
17
|
-
* the Agentic Chat AG-UI example.
|
|
18
|
-
*
|
|
19
|
-
* Features demonstrated:
|
|
20
|
-
* - Basic AG-UI SSE streaming
|
|
21
|
-
* - Tool calling (current_time tool)
|
|
22
|
-
* - Floating popup interface
|
|
23
|
-
*/
|
|
24
13
|
declare const AgUiAgenticExample: React.FC;
|
|
25
14
|
export default AgUiAgenticExample;
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025-2026 Datalayer, Inc.
|
|
4
|
+
* Distributed under the terms of the Modified BSD License.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AgUiAgenticExample
|
|
8
|
+
*
|
|
9
|
+
* Demonstrates a floating chat popup that connects to the AG-UI
|
|
10
|
+
* Agentic Chat example backend. The agent has access to tools like
|
|
11
|
+
* getting the current time.
|
|
12
|
+
*
|
|
13
|
+
* This is the simplest AG-UI example showing basic chat with tool use.
|
|
14
|
+
*
|
|
15
|
+
* Backend: managed AG-UI agent runtime (agentspec: example-agentic-chat)
|
|
16
|
+
*/
|
|
17
|
+
import { useMemo } from 'react';
|
|
18
|
+
import { Spinner, Text } from '@primer/react';
|
|
3
19
|
import { Box } from '@datalayer/primer-addons';
|
|
4
20
|
import { ThemedProvider } from './utils/themedProvider';
|
|
5
21
|
import { ChatFloating } from '../chat';
|
|
6
|
-
|
|
7
|
-
|
|
22
|
+
import { useExampleAgentRuntimesUrl } from './utils/useExampleAgentRuntimesUrl';
|
|
23
|
+
import { uniqueAgentId } from './utils/agentId';
|
|
24
|
+
import { useExampleAgentRuntime } from './hooks/useExampleAgentRuntime';
|
|
8
25
|
/**
|
|
9
26
|
* AgUiAgenticExample Component
|
|
10
27
|
*
|
|
@@ -16,7 +33,22 @@ const AGENTIC_CHAT_ENDPOINT = 'http://localhost:8765/api/v1/examples/agentic_cha
|
|
|
16
33
|
* - Tool calling (current_time tool)
|
|
17
34
|
* - Floating popup interface
|
|
18
35
|
*/
|
|
36
|
+
const AGENT_NAME = 'ag-ui-agentic';
|
|
37
|
+
const AGENTSPEC_ID = 'example-agentic-chat';
|
|
19
38
|
const AgUiAgenticExample = () => {
|
|
39
|
+
const baseUrl = useExampleAgentRuntimesUrl();
|
|
40
|
+
const agentName = useMemo(() => uniqueAgentId(AGENT_NAME), []);
|
|
41
|
+
const { agentId, status, error, isReady } = useExampleAgentRuntime({
|
|
42
|
+
exampleId: 'AgUiAgenticExample',
|
|
43
|
+
agentName,
|
|
44
|
+
specId: AGENTSPEC_ID,
|
|
45
|
+
agentConfig: {
|
|
46
|
+
protocol: 'ag-ui',
|
|
47
|
+
agentSpecId: AGENTSPEC_ID,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
const agenticChatEndpoint = agentId != null ? `${baseUrl}/api/v1/ag-ui/${agentId}/` : undefined;
|
|
51
|
+
const isLoading = !isReady && status !== 'error';
|
|
20
52
|
return (_jsx(ThemedProvider, { children: _jsxs(Box, { sx: {
|
|
21
53
|
minHeight: '100vh',
|
|
22
54
|
backgroundColor: 'canvas.default',
|
|
@@ -32,24 +64,36 @@ const AgUiAgenticExample = () => {
|
|
|
32
64
|
fontSize: 2,
|
|
33
65
|
color: 'fg.muted',
|
|
34
66
|
marginBottom: 4,
|
|
35
|
-
}, children: "Click the chat button in the bottom-right corner to start a conversation with an AI agent
|
|
67
|
+
}, children: "Click the chat button in the bottom-right corner to start a conversation with an AI agent. The runtime target (local or cloud) follows your selection in the examples header." }), isLoading && (_jsxs(Box, { sx: {
|
|
68
|
+
display: 'flex',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
gap: 2,
|
|
71
|
+
marginBottom: 3,
|
|
72
|
+
}, children: [_jsx(Spinner, { size: "small" }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Starting managed agent runtime..." })] })), error && (_jsx(Box, { sx: {
|
|
73
|
+
padding: 3,
|
|
74
|
+
marginBottom: 3,
|
|
75
|
+
backgroundColor: 'danger.subtle',
|
|
76
|
+
borderRadius: 2,
|
|
77
|
+
border: '1px solid',
|
|
78
|
+
borderColor: 'danger.muted',
|
|
79
|
+
}, children: _jsxs(Text, { sx: { color: 'danger.fg', fontSize: 1 }, children: ["Failed to initialize managed agent runtime: ", error] }) })), _jsxs(Box, { sx: {
|
|
36
80
|
padding: 4,
|
|
37
81
|
backgroundColor: 'canvas.subtle',
|
|
38
82
|
borderRadius: 2,
|
|
39
83
|
border: '1px solid',
|
|
40
84
|
borderColor: 'border.default',
|
|
41
|
-
}, children: [_jsx(Text, { as: "h2", sx: { fontSize: 2, fontWeight: 'semibold', marginBottom: 2 }, children: "
|
|
85
|
+
}, children: [_jsx(Text, { as: "h2", sx: { fontSize: 2, fontWeight: 'semibold', marginBottom: 2 }, children: "Runtime Mode" }), _jsx(Box, { as: "ul", sx: { paddingLeft: 3 }, children: _jsxs(Box, { as: "li", sx: { marginBottom: 1 }, children: [_jsx(Text, { sx: { fontFamily: 'mono', fontSize: 1 }, children: "managed runtime + managed agent" }), _jsxs(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: [' ', "- Launches on cloud when the header target is set to cloud"] })] }) }), _jsx(Text, { as: "p", sx: {
|
|
42
86
|
fontSize: 1,
|
|
43
87
|
color: 'fg.muted',
|
|
44
88
|
marginTop: 3,
|
|
45
|
-
}, children: "Try asking: \"
|
|
89
|
+
}, children: "Try asking: \"hi\" or \"what can you help with?\"" })] }), _jsxs(Box, { sx: {
|
|
46
90
|
marginTop: 4,
|
|
47
91
|
padding: 4,
|
|
48
92
|
backgroundColor: 'canvas.subtle',
|
|
49
93
|
borderRadius: 2,
|
|
50
94
|
border: '1px solid',
|
|
51
95
|
borderColor: 'border.default',
|
|
52
|
-
}, children: [_jsx(Text, { as: "h2", sx: { fontSize: 2, fontWeight: 'semibold', marginBottom: 2 }, children: "About This Example" }), _jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted' }, children: "This example demonstrates the AG-UI (Agent User Interface) protocol for streaming AI interactions. The agent uses SSE (Server-Sent Events) to stream responses and tool calls in real-time." }), _jsxs(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', marginTop: 2 }, children: [_jsx("strong", { children: "Protocol Events:" }), " TEXT_MESSAGE_START, TEXT_MESSAGE_CONTENT, TEXT_MESSAGE_END, TOOL_CALL_START, TOOL_CALL_END"] })] })] }), _jsx(ChatFloating, { protocol: "ag-ui", endpoint:
|
|
96
|
+
}, children: [_jsx(Text, { as: "h2", sx: { fontSize: 2, fontWeight: 'semibold', marginBottom: 2 }, children: "About This Example" }), _jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted' }, children: "This example demonstrates the AG-UI (Agent User Interface) protocol for streaming AI interactions. The agent uses SSE (Server-Sent Events) to stream responses and tool calls in real-time." }), _jsxs(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', marginTop: 2 }, children: [_jsx("strong", { children: "Protocol Events:" }), " TEXT_MESSAGE_START, TEXT_MESSAGE_CONTENT, TEXT_MESSAGE_END, TOOL_CALL_START, TOOL_CALL_END"] })] })] }), agenticChatEndpoint && (_jsx(ChatFloating, { protocol: "ag-ui", endpoint: agenticChatEndpoint, title: "Agentic Chat", description: "Chat with a managed AG-UI agent runtime.", position: "bottom-right", defaultOpen: true, suggestions: [
|
|
53
97
|
{
|
|
54
98
|
title: 'What time is it?',
|
|
55
99
|
message: 'What is the current time?',
|
|
@@ -58,6 +102,6 @@ const AgUiAgenticExample = () => {
|
|
|
58
102
|
title: "Today's date",
|
|
59
103
|
message: "What's the current date?",
|
|
60
104
|
},
|
|
61
|
-
] })] }) }));
|
|
105
|
+
] }))] }) }));
|
|
62
106
|
};
|
|
63
107
|
export default AgUiAgenticExample;
|
|
@@ -8,23 +8,8 @@
|
|
|
8
8
|
* and renders beautiful weather cards directly in the chat conversation,
|
|
9
9
|
* similar to the AG-UI Dojo implementation.
|
|
10
10
|
*
|
|
11
|
-
* Backend:
|
|
11
|
+
* Backend: managed AG-UI agent runtime (agentspec: example-backend-tool-rendering)
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
|
-
/**
|
|
15
|
-
* AgUiBackendToolRenderingExample Component
|
|
16
|
-
*
|
|
17
|
-
* Demonstrates backend tool rendering with AG-UI.
|
|
18
|
-
* The agent has a `get_weather` tool that calls the Open-Meteo API
|
|
19
|
-
* and returns weather data. This data is rendered INLINE in the chat
|
|
20
|
-
* as a beautiful weather card with dynamic theming.
|
|
21
|
-
*
|
|
22
|
-
* Features demonstrated:
|
|
23
|
-
* - Backend tool execution
|
|
24
|
-
* - Real API integration (Open-Meteo)
|
|
25
|
-
* - INLINE rendering of tool results in chat
|
|
26
|
-
* - Dynamic theming based on weather conditions
|
|
27
|
-
* - Loading states while fetching data
|
|
28
|
-
*/
|
|
29
14
|
declare const AgUiBackendToolRenderingExample: React.FC;
|
|
30
15
|
export default AgUiBackendToolRenderingExample;
|
|
@@ -13,29 +13,28 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
* and renders beautiful weather cards directly in the chat conversation,
|
|
14
14
|
* similar to the AG-UI Dojo implementation.
|
|
15
15
|
*
|
|
16
|
-
* Backend:
|
|
16
|
+
* Backend: managed AG-UI agent runtime (agentspec: example-backend-tool-rendering)
|
|
17
17
|
*/
|
|
18
|
-
import { useCallback } from 'react';
|
|
18
|
+
import { useCallback, useMemo } from 'react';
|
|
19
19
|
import { Text } from '@primer/react';
|
|
20
20
|
import { Box } from '@datalayer/primer-addons';
|
|
21
21
|
import { ThemedProvider, useThemeBrandColor } from './utils/themedProvider';
|
|
22
22
|
import { ChatFloating } from '../chat';
|
|
23
23
|
import { InlineWeatherCard } from './components/weather';
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
import { useExampleAgentRuntimesUrl } from './utils/useExampleAgentRuntimesUrl';
|
|
25
|
+
import { uniqueAgentId } from './utils/agentId';
|
|
26
|
+
import { useExampleAgentRuntime } from './hooks/useExampleAgentRuntime';
|
|
27
|
+
import { useSpecRenderToolResult, specRendererClassName, } from './hooks/useSpecRenderToolResult';
|
|
26
28
|
/**
|
|
27
|
-
*
|
|
29
|
+
* Renderers for this example, keyed by the spec's renderer id. The tool name to
|
|
30
|
+
* match and the CSS file to load come from the agent spec, not from this file.
|
|
28
31
|
*/
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const location = context.args?.location;
|
|
36
|
-
// Cast result to WeatherResult if available
|
|
37
|
-
const weatherResult = context.result;
|
|
38
|
-
return (_jsx(InlineWeatherCard, { location: location, result: weatherResult, status: context.status, error: context.error }));
|
|
32
|
+
const weatherRenderers = {
|
|
33
|
+
'weather-card': (context, binding) => {
|
|
34
|
+
const location = context.args?.location;
|
|
35
|
+
const weatherResult = context.result;
|
|
36
|
+
return (_jsx("div", { className: specRendererClassName(binding), children: _jsx(InlineWeatherCard, { location: location, result: weatherResult, status: context.status, error: context.error }) }));
|
|
37
|
+
},
|
|
39
38
|
};
|
|
40
39
|
/**
|
|
41
40
|
* AgUiBackendToolRenderingExample Component
|
|
@@ -52,8 +51,24 @@ const renderWeatherToolResult = (context) => {
|
|
|
52
51
|
* - Dynamic theming based on weather conditions
|
|
53
52
|
* - Loading states while fetching data
|
|
54
53
|
*/
|
|
54
|
+
const AGENT_NAME = 'ag-ui-backend-tools';
|
|
55
|
+
const AGENTSPEC_ID = 'example-backend-tool-rendering';
|
|
55
56
|
const AgUiBackendToolRenderingExample = () => {
|
|
56
57
|
const brandColor = useThemeBrandColor();
|
|
58
|
+
const baseUrl = useExampleAgentRuntimesUrl();
|
|
59
|
+
const agentName = useMemo(() => uniqueAgentId(AGENT_NAME), []);
|
|
60
|
+
const { agentId } = useExampleAgentRuntime({
|
|
61
|
+
exampleId: 'AgUiBackendToolRenderingExample',
|
|
62
|
+
agentName,
|
|
63
|
+
specId: AGENTSPEC_ID,
|
|
64
|
+
agentConfig: {
|
|
65
|
+
protocol: 'ag-ui',
|
|
66
|
+
agentSpecId: AGENTSPEC_ID,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
const backendToolRenderingEndpoint = agentId != null ? `${baseUrl}/api/v1/ag-ui/${agentId}/` : undefined;
|
|
70
|
+
// Tool name to match and CSS file to load are read from the agent spec.
|
|
71
|
+
const renderToolResult = useSpecRenderToolResult(AGENTSPEC_ID, weatherRenderers);
|
|
57
72
|
// Optional: still track weather for sidebar display if needed
|
|
58
73
|
const handleStateUpdate = useCallback((_state) => {
|
|
59
74
|
// State updates are still available if needed for other purposes
|
|
@@ -90,7 +105,7 @@ const AgUiBackendToolRenderingExample = () => {
|
|
|
90
105
|
marginTop: 1,
|
|
91
106
|
fontSize: 1,
|
|
92
107
|
color: 'fg.muted',
|
|
93
|
-
}, children: [_jsx("li", { children: "\"What's the weather in New York?\"" }), _jsx("li", { children: "\"Weather in London and Paris\"" }), _jsx("li", { children: "\"Is it sunny in Sydney?\"" }), _jsx("li", { children: "\"How's the weather in Tokyo today?\"" })] })] })] })] }), _jsx(ChatFloating, { protocol: "ag-ui", endpoint:
|
|
108
|
+
}, children: [_jsx("li", { children: "\"What's the weather in New York?\"" }), _jsx("li", { children: "\"Weather in London and Paris\"" }), _jsx("li", { children: "\"Is it sunny in Sydney?\"" }), _jsx("li", { children: "\"How's the weather in Tokyo today?\"" })] })] })] })] }), backendToolRenderingEndpoint && (_jsx(ChatFloating, { protocol: "ag-ui", endpoint: backendToolRenderingEndpoint, title: "Weather Assistant", description: "Ask me about the weather anywhere in the world!", position: "bottom-right", brandColor: brandColor, onStateUpdate: handleStateUpdate, renderToolResult: renderToolResult, suggestions: [
|
|
94
109
|
{
|
|
95
110
|
title: 'Paris weather',
|
|
96
111
|
message: "What's the weather like in Paris?",
|
|
@@ -99,6 +114,6 @@ const AgUiBackendToolRenderingExample = () => {
|
|
|
99
114
|
title: 'Tokyo forecast',
|
|
100
115
|
message: 'Show me the weather forecast for Tokyo.',
|
|
101
116
|
},
|
|
102
|
-
] })] }) }));
|
|
117
|
+
] }))] }) }));
|
|
103
118
|
};
|
|
104
119
|
export default AgUiBackendToolRenderingExample;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* This follows the AG-UI Dojo pattern where tool results are rendered
|
|
10
10
|
* as UI components in both locations.
|
|
11
11
|
*
|
|
12
|
-
* Backend:
|
|
12
|
+
* Backend: managed AG-UI agent runtime (agentspec: example-haiku-generative-ui)
|
|
13
13
|
*/
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { type HaikuResult } from './components/haiku';
|
|
@@ -24,21 +24,5 @@ export interface HaikuDisplayHandle {
|
|
|
24
24
|
/** Clear all haikus */
|
|
25
25
|
clearHaikus: () => void;
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
28
|
-
* AgUiHaikuGenUiExample Component
|
|
29
|
-
*
|
|
30
|
-
* Demonstrates tool-based generative UI with haiku generation.
|
|
31
|
-
* The agent has a `generate_haiku` tool that returns structured
|
|
32
|
-
* haiku data. This data is rendered:
|
|
33
|
-
* - INLINE in the chat as a haiku card
|
|
34
|
-
* - In the main view as part of a carousel
|
|
35
|
-
*
|
|
36
|
-
* Features demonstrated:
|
|
37
|
-
* - Tool-based generative UI
|
|
38
|
-
* - Ref-based state synchronization between chat and main view
|
|
39
|
-
* - Carousel display for multiple haikus
|
|
40
|
-
* - Dynamic gradient backgrounds
|
|
41
|
-
* - Japanese/English text rendering
|
|
42
|
-
*/
|
|
43
27
|
declare const AgUiHaikuGenUiExample: React.FC;
|
|
44
28
|
export default AgUiHaikuGenUiExample;
|
|
@@ -14,16 +14,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* This follows the AG-UI Dojo pattern where tool results are rendered
|
|
15
15
|
* as UI components in both locations.
|
|
16
16
|
*
|
|
17
|
-
* Backend:
|
|
17
|
+
* Backend: managed AG-UI agent runtime (agentspec: example-haiku-generative-ui)
|
|
18
18
|
*/
|
|
19
|
-
import { useState,
|
|
19
|
+
import { useState, useMemo, useRef, useImperativeHandle, forwardRef, } from 'react';
|
|
20
20
|
import { Text } from '@primer/react';
|
|
21
21
|
import { Box } from '@datalayer/primer-addons';
|
|
22
22
|
import { ThemedProvider, useThemeBrandColor } from './utils/themedProvider';
|
|
23
23
|
import { ChatFloating } from '../chat';
|
|
24
24
|
import { InlineHaikuCard, HaikuDisplay, } from './components/haiku';
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
import { useExampleAgentRuntimesUrl } from './utils/useExampleAgentRuntimesUrl';
|
|
26
|
+
import { uniqueAgentId } from './utils/agentId';
|
|
27
|
+
import { useExampleAgentRuntime } from './hooks/useExampleAgentRuntime';
|
|
28
|
+
import { useSpecRenderToolResult, specRendererClassName, } from './hooks/useSpecRenderToolResult';
|
|
27
29
|
/**
|
|
28
30
|
* HaikuDisplayWithRef - A display component that exposes a ref for external control.
|
|
29
31
|
*
|
|
@@ -59,43 +61,57 @@ HaikuDisplayWithRef.displayName = 'HaikuDisplayWithRef';
|
|
|
59
61
|
* - Dynamic gradient backgrounds
|
|
60
62
|
* - Japanese/English text rendering
|
|
61
63
|
*/
|
|
64
|
+
const AGENT_NAME = 'ag-ui-haiku';
|
|
65
|
+
const AGENTSPEC_ID = 'example-haiku-generative-ui';
|
|
62
66
|
const AgUiHaikuGenUiExample = () => {
|
|
63
67
|
const brandColor = useThemeBrandColor();
|
|
68
|
+
const baseUrl = useExampleAgentRuntimesUrl();
|
|
69
|
+
const agentName = useMemo(() => uniqueAgentId(AGENT_NAME), []);
|
|
70
|
+
const { agentId } = useExampleAgentRuntime({
|
|
71
|
+
exampleId: 'AgUiHaikuGenUiExample',
|
|
72
|
+
agentName,
|
|
73
|
+
specId: AGENTSPEC_ID,
|
|
74
|
+
agentConfig: {
|
|
75
|
+
protocol: 'ag-ui',
|
|
76
|
+
agentSpecId: AGENTSPEC_ID,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
const haikuGenUiEndpoint = agentId != null ? `${baseUrl}/api/v1/ag-ui/${agentId}/` : undefined;
|
|
64
80
|
// Ref to the main display for adding haikus
|
|
65
81
|
const displayRef = useRef(null);
|
|
66
82
|
// Track processed tool call IDs to avoid duplicates
|
|
67
83
|
const processedToolCallIds = useRef(new Set());
|
|
68
84
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
85
|
+
* Renderers keyed by the spec's renderer id. The tool name to match and the
|
|
86
|
+
* CSS file to load come from the agent spec, not from this file.
|
|
71
87
|
*/
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
const haikuRenderers = useMemo(() => ({
|
|
89
|
+
'haiku-card': (context, binding) => {
|
|
90
|
+
// Extract haiku data from args (the tool parameters are what we render)
|
|
91
|
+
const args = context.args;
|
|
92
|
+
// Build haiku result from args
|
|
93
|
+
const haiku = args.japanese && args.english
|
|
94
|
+
? {
|
|
95
|
+
japanese: args.japanese,
|
|
96
|
+
english: args.english,
|
|
97
|
+
gradient: args.gradient ||
|
|
98
|
+
'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
99
|
+
}
|
|
100
|
+
: undefined;
|
|
101
|
+
// When tool completes successfully, add to main display (deduplicated)
|
|
102
|
+
if (context.status === 'complete' &&
|
|
103
|
+
haiku &&
|
|
104
|
+
displayRef.current &&
|
|
105
|
+
context.toolCallId &&
|
|
106
|
+
!processedToolCallIds.current.has(context.toolCallId)) {
|
|
107
|
+
processedToolCallIds.current.add(context.toolCallId);
|
|
108
|
+
displayRef.current.addHaiku(haiku);
|
|
86
109
|
}
|
|
87
|
-
:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
context.toolCallId &&
|
|
93
|
-
!processedToolCallIds.current.has(context.toolCallId)) {
|
|
94
|
-
processedToolCallIds.current.add(context.toolCallId);
|
|
95
|
-
displayRef.current.addHaiku(haiku);
|
|
96
|
-
}
|
|
97
|
-
return (_jsx(InlineHaikuCard, { haiku: haiku, status: context.status, error: context.error }));
|
|
98
|
-
}, []);
|
|
110
|
+
return (_jsx("div", { className: specRendererClassName(binding), children: _jsx(InlineHaikuCard, { haiku: haiku, status: context.status, error: context.error }) }));
|
|
111
|
+
},
|
|
112
|
+
}), []);
|
|
113
|
+
// Tool name to match and CSS file to load are read from the agent spec.
|
|
114
|
+
const renderToolResult = useSpecRenderToolResult(AGENTSPEC_ID, haikuRenderers);
|
|
99
115
|
return (_jsx(ThemedProvider, { children: _jsxs(Box, { sx: {
|
|
100
116
|
minHeight: '100vh',
|
|
101
117
|
backgroundColor: 'canvas.default',
|
|
@@ -134,7 +150,7 @@ const AgUiHaikuGenUiExample = () => {
|
|
|
134
150
|
marginTop: 1,
|
|
135
151
|
fontSize: 1,
|
|
136
152
|
color: 'fg.muted',
|
|
137
|
-
}, children: [_jsx("li", { children: "\"Write me a haiku about cherry blossoms\"" }), _jsx("li", { children: "\"Create a haiku about coding late at night\"" }), _jsx("li", { children: "\"Generate a haiku about the ocean\"" }), _jsx("li", { children: "\"Write a haiku about autumn leaves\"" })] })] })] })] }), _jsx(ChatFloating, { protocol: "ag-ui", endpoint:
|
|
153
|
+
}, children: [_jsx("li", { children: "\"Write me a haiku about cherry blossoms\"" }), _jsx("li", { children: "\"Create a haiku about coding late at night\"" }), _jsx("li", { children: "\"Generate a haiku about the ocean\"" }), _jsx("li", { children: "\"Write a haiku about autumn leaves\"" })] })] })] })] }), _jsx(ChatFloating, { protocol: "ag-ui", endpoint: haikuGenUiEndpoint, launching: !haikuGenUiEndpoint, launchingMessage: "Starting the haiku agent runtime\u2026", title: "Haiku Generator", description: "Ask me to write haiku poetry about any topic!", position: "bottom-right", brandColor: brandColor, defaultOpen: true, renderToolResult: renderToolResult, hideMessagesAfterToolUI: true, suggestions: [
|
|
138
154
|
{
|
|
139
155
|
title: 'Cherry blossoms',
|
|
140
156
|
message: 'Write me a haiku about cherry blossoms in spring.',
|