@rodrigocoliveira/agno-react 1.0.2 → 1.0.3
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 +2 -2
- package/dist/components/GenerativeUIRenderer.d.ts +21 -0
- package/dist/components/GenerativeUIRenderer.d.ts.map +1 -0
- package/dist/context/AgnoContext.d.ts +16 -0
- package/dist/context/AgnoContext.d.ts.map +1 -0
- package/dist/context/ToolHandlerContext.d.ts +44 -0
- package/dist/context/ToolHandlerContext.d.ts.map +1 -0
- package/dist/hooks/useAgnoActions.d.ts +25 -0
- package/dist/hooks/useAgnoActions.d.ts.map +1 -0
- package/dist/hooks/useAgnoChat.d.ts +22 -0
- package/dist/hooks/useAgnoChat.d.ts.map +1 -0
- package/dist/hooks/useAgnoCustomEvents.d.ts +38 -0
- package/dist/hooks/useAgnoCustomEvents.d.ts.map +1 -0
- package/dist/hooks/useAgnoEvals.d.ts +39 -0
- package/dist/hooks/useAgnoEvals.d.ts.map +1 -0
- package/dist/hooks/useAgnoKnowledge.d.ts +56 -0
- package/dist/hooks/useAgnoKnowledge.d.ts.map +1 -0
- package/dist/hooks/useAgnoMemory.d.ts +42 -0
- package/dist/hooks/useAgnoMemory.d.ts.map +1 -0
- package/dist/hooks/useAgnoMetrics.d.ts +51 -0
- package/dist/hooks/useAgnoMetrics.d.ts.map +1 -0
- package/dist/hooks/useAgnoSession.d.ts +38 -0
- package/dist/hooks/useAgnoSession.d.ts.map +1 -0
- package/dist/hooks/useAgnoToolExecution.d.ts +70 -0
- package/dist/hooks/useAgnoToolExecution.d.ts.map +1 -0
- package/dist/hooks/useAgnoTraces.d.ts +51 -0
- package/dist/hooks/useAgnoTraces.d.ts.map +1 -0
- package/dist/index.d.ts +27 -723
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +932 -1052
- package/dist/index.js.map +24 -0
- package/dist/index.mjs +816 -909
- package/dist/index.mjs.map +24 -0
- package/dist/ui/components/artifact.d.ts +24 -0
- package/dist/ui/components/artifact.d.ts.map +1 -0
- package/dist/ui/components/audio-recorder.d.ts +32 -0
- package/dist/ui/components/audio-recorder.d.ts.map +1 -0
- package/dist/ui/components/code-block.d.ts +15 -0
- package/dist/ui/components/code-block.d.ts.map +1 -0
- package/dist/ui/components/conversation.d.ts +17 -0
- package/dist/ui/components/conversation.d.ts.map +1 -0
- package/dist/ui/components/file-preview-card.d.ts +13 -0
- package/dist/ui/components/file-preview-card.d.ts.map +1 -0
- package/dist/ui/components/file-preview-modal.d.ts +8 -0
- package/dist/ui/components/file-preview-modal.d.ts.map +1 -0
- package/dist/ui/components/image-lightbox.d.ts +12 -0
- package/dist/ui/components/image-lightbox.d.ts.map +1 -0
- package/dist/ui/components/message.d.ts +19 -0
- package/dist/ui/components/message.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/attachments.d.ts +21 -0
- package/dist/ui/components/prompt-input/attachments.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/buttons.d.ts +19 -0
- package/dist/ui/components/prompt-input/buttons.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/command.d.ts +17 -0
- package/dist/ui/components/prompt-input/command.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/context.d.ts +36 -0
- package/dist/ui/components/prompt-input/context.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/drop-zone.d.ts +7 -0
- package/dist/ui/components/prompt-input/drop-zone.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/footer.d.ts +11 -0
- package/dist/ui/components/prompt-input/footer.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/index.d.ts +25 -0
- package/dist/ui/components/prompt-input/index.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/model-select.d.ts +13 -0
- package/dist/ui/components/prompt-input/model-select.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/prompt-input.d.ts +22 -0
- package/dist/ui/components/prompt-input/prompt-input.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/provider.d.ts +6 -0
- package/dist/ui/components/prompt-input/provider.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/speech.d.ts +51 -0
- package/dist/ui/components/prompt-input/speech.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/tabs.d.ts +12 -0
- package/dist/ui/components/prompt-input/tabs.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/textarea.d.ts +5 -0
- package/dist/ui/components/prompt-input/textarea.d.ts.map +1 -0
- package/dist/ui/components/response.d.ts +5 -0
- package/dist/ui/components/response.d.ts.map +1 -0
- package/dist/ui/components/smart-timestamp.d.ts +8 -0
- package/dist/ui/components/smart-timestamp.d.ts.map +1 -0
- package/dist/ui/components/streaming-indicator.d.ts +8 -0
- package/dist/ui/components/streaming-indicator.d.ts.map +1 -0
- package/dist/ui/components/tool.d.ts +24 -0
- package/dist/ui/components/tool.d.ts.map +1 -0
- package/dist/ui/composed/AgnoChatInput.d.ts +44 -0
- package/dist/ui/composed/AgnoChatInput.d.ts.map +1 -0
- package/dist/ui/composed/AgnoChatInterface.d.ts +49 -0
- package/dist/ui/composed/AgnoChatInterface.d.ts.map +1 -0
- package/dist/ui/composed/AgnoMessageItem.d.ts +38 -0
- package/dist/ui/composed/AgnoMessageItem.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/agno-chat.d.ts +9 -0
- package/dist/ui/composed/agno-chat/agno-chat.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/context.d.ts +33 -0
- package/dist/ui/composed/agno-chat/context.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/empty-state.d.ts +6 -0
- package/dist/ui/composed/agno-chat/empty-state.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/error-bar.d.ts +5 -0
- package/dist/ui/composed/agno-chat/error-bar.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/index.d.ts +33 -0
- package/dist/ui/composed/agno-chat/index.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/input.d.ts +39 -0
- package/dist/ui/composed/agno-chat/input.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/messages.d.ts +21 -0
- package/dist/ui/composed/agno-chat/messages.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/suggested-prompts.d.ts +7 -0
- package/dist/ui/composed/agno-chat/suggested-prompts.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/tool-status.d.ts +5 -0
- package/dist/ui/composed/agno-chat/tool-status.d.ts.map +1 -0
- package/dist/ui/composed/index.d.ts +9 -0
- package/dist/ui/composed/index.d.ts.map +1 -0
- package/dist/ui/index.d.ts +59 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/lib/cn.d.ts +3 -0
- package/dist/ui/lib/cn.d.ts.map +1 -0
- package/dist/ui/lib/file-utils.d.ts +20 -0
- package/dist/ui/lib/file-utils.d.ts.map +1 -0
- package/dist/ui/lib/format-timestamp.d.ts +16 -0
- package/dist/ui/lib/format-timestamp.d.ts.map +1 -0
- package/dist/ui/primitives/accordion.d.ts +8 -0
- package/dist/ui/primitives/accordion.d.ts.map +1 -0
- package/dist/ui/primitives/avatar.d.ts +7 -0
- package/dist/ui/primitives/avatar.d.ts.map +1 -0
- package/dist/ui/primitives/badge.d.ts +10 -0
- package/dist/ui/primitives/badge.d.ts.map +1 -0
- package/dist/ui/primitives/button.d.ts +12 -0
- package/dist/ui/primitives/button.d.ts.map +1 -0
- package/dist/ui/primitives/collapsible.d.ts +6 -0
- package/dist/ui/primitives/collapsible.d.ts.map +1 -0
- package/dist/ui/primitives/command.d.ts +79 -0
- package/dist/ui/primitives/command.d.ts.map +1 -0
- package/dist/ui/primitives/dialog.d.ts +26 -0
- package/dist/ui/primitives/dialog.d.ts.map +1 -0
- package/dist/ui/primitives/dropdown-menu.d.ts +28 -0
- package/dist/ui/primitives/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/primitives/hover-card.d.ts +7 -0
- package/dist/ui/primitives/hover-card.d.ts.map +1 -0
- package/dist/ui/primitives/index.d.ts +16 -0
- package/dist/ui/primitives/index.d.ts.map +1 -0
- package/dist/ui/primitives/input-group.d.ts +17 -0
- package/dist/ui/primitives/input-group.d.ts.map +1 -0
- package/dist/ui/primitives/select.d.ts +14 -0
- package/dist/ui/primitives/select.d.ts.map +1 -0
- package/dist/ui/primitives/tooltip.d.ts +8 -0
- package/dist/ui/primitives/tooltip.d.ts.map +1 -0
- package/dist/ui/types.d.ts +56 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui.d.ts +2 -891
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +2757 -2323
- package/dist/ui.js.map +60 -0
- package/dist/ui.mjs +2644 -2055
- package/dist/ui.mjs.map +60 -0
- package/dist/utils/component-registry.d.ts +63 -0
- package/dist/utils/component-registry.d.ts.map +1 -0
- package/dist/utils/ui-helpers.d.ts +165 -0
- package/dist/utils/ui-helpers.d.ts.map +1 -0
- package/package.json +9 -10
- package/LICENSE +0 -21
- package/dist/index.d.mts +0 -724
- package/dist/ui.d.mts +0 -891
package/dist/index.d.ts
CHANGED
|
@@ -1,724 +1,28 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AgnoClient, PaginatedTracesResult, PaginatedTraceSessionStatsResult } from '@rodrigocoliveira/agno-client';
|
|
4
|
-
export { PaginatedTraceSessionStatsResult, PaginatedTracesResult } from '@rodrigocoliveira/agno-client';
|
|
5
|
-
import * as _rodrigocoliveira_agno_types from '@rodrigocoliveira/agno-types';
|
|
6
|
-
import { AgnoClientConfig, ToolCall, CustomRenderFunction, UIComponentSpec, ChartComponentSpec, CardData, CardGridComponentSpec, TableColumn, TableComponentSpec, MarkdownComponentSpec, ArtifactComponentSpec, ToolHandlerResult, ChatMessage, ClientState, SessionEntry, AgentSessionDetailSchema, TeamSessionDetailSchema, RunSchema, TeamRunSchema, CreateSessionRequest, UpdateSessionRequest, AgentDetails, TeamDetails, CustomEventData, UserMemory, ListMemoriesParams, MemoriesListResponse, UserMemoryStatsParams, UserMemoryStatsResponse, CreateMemoryRequest, UpdateMemoryRequest, KnowledgeConfigResponse, ContentResponse, ContentListOptions, ContentListResponse, ContentStatusResponse, VectorSearchRequest, VectorSearchResponse, ContentUpdateRequest, MetricsResponse, MetricsOptions, RefreshMetricsOptions, DayAggregatedMetrics, EvalSchema, ListEvalRunsParams, EvalRunsListResponse, ExecuteEvalRequest, UpdateEvalRunRequest, TraceSummary, TraceSessionStats, ListTracesOptions, GetTraceOptions, TraceDetail, TraceNode, GetTraceSessionStatsOptions } from '@rodrigocoliveira/agno-types';
|
|
7
|
-
export { AgentDetails, AgnoClientConfig, ArtifactComponentSpec, CardData, CardGridComponentSpec, ChartComponentSpec, ChartSeries, ChatMessage, ChunkerSchema, ClientState, ContentListOptions, ContentListResponse, ContentResponse, ContentStatus, ContentStatusResponse, ContentUpdateRequest, ContentUploadRequest, CreateMemoryRequest, CustomComponentSpec, CustomEventData, DayAggregatedMetrics, DeleteEvalRunsRequest, DeleteMultipleMemoriesRequest, EvalComponentType, EvalRunsListResponse, EvalSchema, EvalType, ExecuteEvalRequest, GenerativeUIData, GetTraceOptions, GetTraceSessionStatsOptions, KnowledgeConfigResponse, ListEvalRunsParams, ListMemoriesParams, ListTracesOptions, MarkdownComponentSpec, MemoriesListResponse, MetricsOptions, MetricsResponse, ModelMetrics, PaginationInfo, ReaderSchema, RefreshMetricsOptions, RunEvent, ScoringStrategy, SessionEntry, SortOrder, TableColumn, TableComponentSpec, TeamDetails, TokenMetrics, ToolCall, ToolHandlerResult, TraceDetail, TraceNode, TraceSessionStats, TraceSessionStatsResponse, TraceStatus, TraceSummary, TracesListResponse, UIComponentSpec, UpdateEvalRunRequest, UpdateMemoryRequest, UserMemory, UserMemoryStats, UserMemoryStatsParams, UserMemoryStatsResponse, VectorDbSchema, VectorSearchRequest, VectorSearchResponse, VectorSearchResult } from '@rodrigocoliveira/agno-types';
|
|
8
|
-
|
|
9
|
-
interface AgnoProviderProps {
|
|
10
|
-
config: AgnoClientConfig;
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
}
|
|
13
1
|
/**
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* **Note:** HITL (Human-in-the-Loop) frontend tool execution is only supported for agents.
|
|
42
|
-
* Teams do not support the continue endpoint. This hook will log a warning and no-op if used with team mode.
|
|
43
|
-
*
|
|
44
|
-
* @param handlers - Map of tool names to handler functions (local handlers)
|
|
45
|
-
* @param autoExecute - Whether to automatically execute tools when paused (default: true)
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```tsx
|
|
49
|
-
* const toolHandlers = {
|
|
50
|
-
* navigate_to_page: async (args) => {
|
|
51
|
-
* window.location.href = args.url;
|
|
52
|
-
* return { success: true };
|
|
53
|
-
* },
|
|
54
|
-
* fill_form: async (args) => {
|
|
55
|
-
* document.querySelector(args.selector).value = args.value;
|
|
56
|
-
* return { filled: true };
|
|
57
|
-
* }
|
|
58
|
-
* };
|
|
59
|
-
*
|
|
60
|
-
* const { isPaused, isExecuting, pendingTools } = useAgnoToolExecution(toolHandlers);
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
declare function useAgnoToolExecution(handlers?: Record<string, ToolHandler>, autoExecute?: boolean): {
|
|
64
|
-
/** Whether the run is currently paused awaiting tool execution */
|
|
65
|
-
isPaused: boolean;
|
|
66
|
-
/** Whether tools are currently being executed */
|
|
67
|
-
isExecuting: boolean;
|
|
68
|
-
/** Tools awaiting execution */
|
|
69
|
-
pendingTools: ToolCall[];
|
|
70
|
-
/** Execute all pending tools and continue the run */
|
|
71
|
-
executeAndContinue: () => Promise<void>;
|
|
72
|
-
/** Execute specific tools and return results without continuing */
|
|
73
|
-
executeTools: (tools: ToolCall[]) => Promise<ToolCall[]>;
|
|
74
|
-
/** Continue the run with manually provided tool results */
|
|
75
|
-
continueWithResults: (tools: ToolCall[], options?: {
|
|
76
|
-
headers?: Record<string, string>;
|
|
77
|
-
params?: Record<string, string>;
|
|
78
|
-
}) => Promise<void>;
|
|
79
|
-
/** Error from tool execution, if any */
|
|
80
|
-
executionError: string | undefined;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Context value for tool handler registry
|
|
85
|
-
*/
|
|
86
|
-
interface ToolHandlerContextValue {
|
|
87
|
-
handlers: Record<string, ToolHandler>;
|
|
88
|
-
registerHandler: (name: string, handler: ToolHandler) => void;
|
|
89
|
-
unregisterHandler: (name: string) => void;
|
|
90
|
-
}
|
|
91
|
-
interface ToolHandlerProviderProps {
|
|
92
|
-
handlers?: Record<string, ToolHandler>;
|
|
93
|
-
children: React.ReactNode;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Provider component that manages global tool handlers
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* ```tsx
|
|
100
|
-
* const globalHandlers = {
|
|
101
|
-
* fill_form: async (args) => {
|
|
102
|
-
* // Implementation
|
|
103
|
-
* return { success: true };
|
|
104
|
-
* }
|
|
105
|
-
* };
|
|
106
|
-
*
|
|
107
|
-
* <ToolHandlerProvider handlers={globalHandlers}>
|
|
108
|
-
* <App />
|
|
109
|
-
* </ToolHandlerProvider>
|
|
110
|
-
* ```
|
|
111
|
-
*/
|
|
112
|
-
declare function ToolHandlerProvider({ handlers: initialHandlers, children }: ToolHandlerProviderProps): react_jsx_runtime.JSX.Element;
|
|
113
|
-
/**
|
|
114
|
-
* Hook to access global tool handlers
|
|
115
|
-
*
|
|
116
|
-
* @returns Tool handler context value or null if not within ToolHandlerProvider
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* ```tsx
|
|
120
|
-
* const { handlers, registerHandler } = useToolHandlers() || { handlers: {} };
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
declare function useToolHandlers(): ToolHandlerContextValue | null;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Generative UI Renderer
|
|
127
|
-
*
|
|
128
|
-
* Renders UI components based on specifications from the agent.
|
|
129
|
-
* Supports both registry-based components and custom render functions.
|
|
130
|
-
*/
|
|
131
|
-
|
|
132
|
-
interface GenerativeUIRendererProps {
|
|
133
|
-
/** The UI component specification to render */
|
|
134
|
-
spec: UIComponentSpec;
|
|
135
|
-
/** Optional className for styling */
|
|
136
|
-
className?: string;
|
|
137
|
-
/** Error boundary fallback */
|
|
138
|
-
onError?: (error: Error) => void;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Main Generative UI Renderer component
|
|
142
|
-
*/
|
|
143
|
-
declare function GenerativeUIRenderer({ spec, className, onError, }: GenerativeUIRendererProps): React.ReactElement;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Component Registry for Generative UI
|
|
147
|
-
*
|
|
148
|
-
* Maps component specifications to actual React components.
|
|
149
|
-
* Allows registering custom components at runtime.
|
|
150
|
-
*/
|
|
151
|
-
/**
|
|
152
|
-
* Component renderer function type
|
|
153
|
-
*/
|
|
154
|
-
type ComponentRenderer = (props: any) => any;
|
|
155
|
-
/**
|
|
156
|
-
* Component registry class
|
|
157
|
-
*/
|
|
158
|
-
declare class ComponentRegistry {
|
|
159
|
-
private static instance;
|
|
160
|
-
private components;
|
|
161
|
-
private constructor();
|
|
162
|
-
/**
|
|
163
|
-
* Get the singleton instance
|
|
164
|
-
*/
|
|
165
|
-
static getInstance(): ComponentRegistry;
|
|
166
|
-
/**
|
|
167
|
-
* Register a component renderer
|
|
168
|
-
*/
|
|
169
|
-
register(type: string, renderer: ComponentRenderer): void;
|
|
170
|
-
/**
|
|
171
|
-
* Register multiple components at once
|
|
172
|
-
*/
|
|
173
|
-
registerBatch(components: Record<string, ComponentRenderer>): void;
|
|
174
|
-
/**
|
|
175
|
-
* Get a registered component renderer
|
|
176
|
-
*/
|
|
177
|
-
get(type: string): ComponentRenderer | undefined;
|
|
178
|
-
/**
|
|
179
|
-
* Check if a component is registered
|
|
180
|
-
*/
|
|
181
|
-
has(type: string): boolean;
|
|
182
|
-
/**
|
|
183
|
-
* Unregister a component
|
|
184
|
-
*/
|
|
185
|
-
unregister(type: string): void;
|
|
186
|
-
/**
|
|
187
|
-
* Get all registered component types
|
|
188
|
-
*/
|
|
189
|
-
getRegisteredTypes(): string[];
|
|
190
|
-
/**
|
|
191
|
-
* Clear all registered components
|
|
192
|
-
*/
|
|
193
|
-
clear(): void;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Get the global component registry instance
|
|
197
|
-
*/
|
|
198
|
-
declare function getComponentRegistry(): ComponentRegistry;
|
|
199
|
-
/**
|
|
200
|
-
* Helper to register a chart component
|
|
201
|
-
*/
|
|
202
|
-
declare function registerChartComponent(name: string, renderer: ComponentRenderer): void;
|
|
203
|
-
/**
|
|
204
|
-
* Helper to get a chart component
|
|
205
|
-
*/
|
|
206
|
-
declare function getChartComponent(name: string): ComponentRenderer | undefined;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Helper utilities for creating UI component specifications
|
|
210
|
-
*
|
|
211
|
-
* These helpers make it easy to create common UI patterns without
|
|
212
|
-
* manually constructing the full specification object.
|
|
213
|
-
*/
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Chart helper options
|
|
217
|
-
*/
|
|
218
|
-
interface ChartHelperOptions {
|
|
219
|
-
/** Chart title */
|
|
220
|
-
title?: string;
|
|
221
|
-
/** Chart description */
|
|
222
|
-
description?: string;
|
|
223
|
-
/** Layout preference */
|
|
224
|
-
layout?: 'inline' | 'artifact';
|
|
225
|
-
/** Show legend */
|
|
226
|
-
showLegend?: boolean;
|
|
227
|
-
/** Show grid */
|
|
228
|
-
showGrid?: boolean;
|
|
229
|
-
/** Chart height */
|
|
230
|
-
height?: number | string;
|
|
231
|
-
/** Chart width */
|
|
232
|
-
width?: number | string;
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Create a bar chart specification
|
|
236
|
-
*/
|
|
237
|
-
declare function createBarChart(data: any[], xKey: string, bars: Array<{
|
|
238
|
-
key: string;
|
|
239
|
-
label?: string;
|
|
240
|
-
color?: string;
|
|
241
|
-
}>, options?: ChartHelperOptions): ChartComponentSpec;
|
|
242
|
-
/**
|
|
243
|
-
* Create a line chart specification
|
|
244
|
-
*/
|
|
245
|
-
declare function createLineChart(data: any[], xKey: string, lines: Array<{
|
|
246
|
-
key: string;
|
|
247
|
-
label?: string;
|
|
248
|
-
color?: string;
|
|
249
|
-
}>, options?: ChartHelperOptions): ChartComponentSpec;
|
|
250
|
-
/**
|
|
251
|
-
* Create a pie chart specification
|
|
252
|
-
*/
|
|
253
|
-
declare function createPieChart(data: any[], dataKey: string, nameKey: string, options?: ChartHelperOptions & {
|
|
254
|
-
showLabel?: boolean;
|
|
255
|
-
}): ChartComponentSpec;
|
|
256
|
-
/**
|
|
257
|
-
* Create an area chart specification
|
|
258
|
-
*/
|
|
259
|
-
declare function createAreaChart(data: any[], xKey: string, areas: Array<{
|
|
260
|
-
key: string;
|
|
261
|
-
label?: string;
|
|
262
|
-
color?: string;
|
|
263
|
-
}>, options?: ChartHelperOptions): ChartComponentSpec;
|
|
264
|
-
/**
|
|
265
|
-
* Card grid helper options
|
|
266
|
-
*/
|
|
267
|
-
interface CardGridHelperOptions {
|
|
268
|
-
title?: string;
|
|
269
|
-
description?: string;
|
|
270
|
-
layout?: 'inline' | 'artifact';
|
|
271
|
-
columns?: {
|
|
272
|
-
default?: number;
|
|
273
|
-
sm?: number;
|
|
274
|
-
md?: number;
|
|
275
|
-
lg?: number;
|
|
276
|
-
xl?: number;
|
|
277
|
-
};
|
|
278
|
-
variant?: 'default' | 'bordered' | 'elevated';
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Create a card grid specification
|
|
282
|
-
*/
|
|
283
|
-
declare function createCardGrid(cards: CardData[], options?: CardGridHelperOptions): CardGridComponentSpec;
|
|
284
|
-
/**
|
|
285
|
-
* Create a simple card
|
|
286
|
-
*/
|
|
287
|
-
declare function createCard(id: string, title: string, description?: string, options?: {
|
|
288
|
-
image?: string;
|
|
289
|
-
metadata?: Record<string, any>;
|
|
290
|
-
actions?: CardData['actions'];
|
|
291
|
-
}): CardData;
|
|
292
|
-
/**
|
|
293
|
-
* Table helper options
|
|
294
|
-
*/
|
|
295
|
-
interface TableHelperOptions {
|
|
296
|
-
title?: string;
|
|
297
|
-
description?: string;
|
|
298
|
-
layout?: 'inline' | 'artifact';
|
|
299
|
-
sortable?: boolean;
|
|
300
|
-
filterable?: boolean;
|
|
301
|
-
pagination?: {
|
|
302
|
-
pageSize?: number;
|
|
303
|
-
pageSizeOptions?: number[];
|
|
304
|
-
};
|
|
305
|
-
density?: 'comfortable' | 'compact';
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Create a table specification
|
|
309
|
-
*/
|
|
310
|
-
declare function createTable(data: Record<string, any>[], columns: TableColumn[], options?: TableHelperOptions): TableComponentSpec;
|
|
311
|
-
/**
|
|
312
|
-
* Create a table column definition
|
|
313
|
-
*/
|
|
314
|
-
declare function createColumn(key: string, header: string, options?: {
|
|
315
|
-
width?: number | string;
|
|
316
|
-
sortable?: boolean;
|
|
317
|
-
cellType?: 'text' | 'number' | 'date' | 'badge' | 'link';
|
|
318
|
-
format?: TableColumn['format'];
|
|
319
|
-
}): TableColumn;
|
|
320
|
-
/**
|
|
321
|
-
* Create a markdown specification
|
|
322
|
-
*/
|
|
323
|
-
declare function createMarkdown(content: string, options?: {
|
|
324
|
-
title?: string;
|
|
325
|
-
description?: string;
|
|
326
|
-
layout?: 'inline' | 'artifact';
|
|
327
|
-
syntaxHighlight?: boolean;
|
|
328
|
-
}): MarkdownComponentSpec;
|
|
329
|
-
/**
|
|
330
|
-
* Create an artifact container with multiple child components
|
|
331
|
-
*/
|
|
332
|
-
declare function createArtifact(content: UIComponentSpec[], options?: {
|
|
333
|
-
title?: string;
|
|
334
|
-
description?: string;
|
|
335
|
-
variant?: 'default' | 'bordered' | 'elevated';
|
|
336
|
-
}): ArtifactComponentSpec;
|
|
337
|
-
/**
|
|
338
|
-
* Smart chart creator - automatically chooses the best chart type based on data
|
|
339
|
-
*/
|
|
340
|
-
declare function createSmartChart(data: any[], options?: {
|
|
341
|
-
title?: string;
|
|
342
|
-
description?: string;
|
|
343
|
-
layout?: 'inline' | 'artifact';
|
|
344
|
-
xKey?: string;
|
|
345
|
-
yKeys?: string[];
|
|
346
|
-
preferredType?: 'bar' | 'line' | 'area' | 'pie';
|
|
347
|
-
}): ChartComponentSpec;
|
|
348
|
-
/**
|
|
349
|
-
* Wrap data and UI into a ToolHandlerResult
|
|
350
|
-
*/
|
|
351
|
-
declare function createToolResult(data: any, ui: UIComponentSpec): ToolHandlerResult;
|
|
352
|
-
/**
|
|
353
|
-
* Quick helper: create a tool result with a bar chart
|
|
354
|
-
*/
|
|
355
|
-
declare function resultWithBarChart(data: any[], xKey: string, bars: Array<{
|
|
356
|
-
key: string;
|
|
357
|
-
label?: string;
|
|
358
|
-
color?: string;
|
|
359
|
-
}>, options?: ChartHelperOptions): ToolHandlerResult;
|
|
360
|
-
/**
|
|
361
|
-
* Quick helper: create a tool result with a smart chart
|
|
362
|
-
*/
|
|
363
|
-
declare function resultWithSmartChart(data: any[], options?: Parameters<typeof createSmartChart>[1]): ToolHandlerResult;
|
|
364
|
-
/**
|
|
365
|
-
* Quick helper: create a tool result with a card grid
|
|
366
|
-
*/
|
|
367
|
-
declare function resultWithCardGrid(cards: CardData[], options?: CardGridHelperOptions): ToolHandlerResult;
|
|
368
|
-
/**
|
|
369
|
-
* Quick helper: create a tool result with a table
|
|
370
|
-
*/
|
|
371
|
-
declare function resultWithTable(data: Record<string, any>[], columns: TableColumn[], options?: TableHelperOptions): ToolHandlerResult;
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Main hook for chat interactions
|
|
375
|
-
* Provides messages, state, and methods to interact with the agent
|
|
376
|
-
*/
|
|
377
|
-
declare function useAgnoChat(): {
|
|
378
|
-
messages: ChatMessage[];
|
|
379
|
-
sendMessage: (message: string | FormData, options?: {
|
|
380
|
-
headers?: Record<string, string>;
|
|
381
|
-
params?: Record<string, string>;
|
|
382
|
-
}) => Promise<void>;
|
|
383
|
-
clearMessages: () => void;
|
|
384
|
-
cancelRun: () => Promise<void>;
|
|
385
|
-
isStreaming: boolean;
|
|
386
|
-
isRefreshing: boolean;
|
|
387
|
-
isPaused: boolean;
|
|
388
|
-
isCancelling: boolean | undefined;
|
|
389
|
-
currentRunId: string | undefined;
|
|
390
|
-
error: string | undefined;
|
|
391
|
-
state: ClientState;
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Hook for session management
|
|
396
|
-
*/
|
|
397
|
-
declare function useAgnoSession(): {
|
|
398
|
-
sessions: SessionEntry[];
|
|
399
|
-
currentSessionId: string | undefined;
|
|
400
|
-
loadSession: (sessionId: string, options?: {
|
|
401
|
-
params?: Record<string, string>;
|
|
402
|
-
}) => Promise<ChatMessage[]>;
|
|
403
|
-
fetchSessions: (options?: {
|
|
404
|
-
params?: Record<string, string>;
|
|
405
|
-
}) => Promise<SessionEntry[]>;
|
|
406
|
-
getSessionById: (sessionId: string, options?: {
|
|
407
|
-
params?: Record<string, string>;
|
|
408
|
-
}) => Promise<AgentSessionDetailSchema | TeamSessionDetailSchema>;
|
|
409
|
-
getRunById: (sessionId: string, runId: string, options?: {
|
|
410
|
-
params?: Record<string, string>;
|
|
411
|
-
}) => Promise<RunSchema | TeamRunSchema>;
|
|
412
|
-
createSession: (request?: CreateSessionRequest, options?: {
|
|
413
|
-
params?: Record<string, string>;
|
|
414
|
-
}) => Promise<AgentSessionDetailSchema | TeamSessionDetailSchema>;
|
|
415
|
-
updateSession: (sessionId: string, request: UpdateSessionRequest, options?: {
|
|
416
|
-
params?: Record<string, string>;
|
|
417
|
-
}) => Promise<AgentSessionDetailSchema | TeamSessionDetailSchema>;
|
|
418
|
-
renameSession: (sessionId: string, newName: string, options?: {
|
|
419
|
-
params?: Record<string, string>;
|
|
420
|
-
}) => Promise<AgentSessionDetailSchema | TeamSessionDetailSchema>;
|
|
421
|
-
deleteSession: (sessionId: string, options?: {
|
|
422
|
-
params?: Record<string, string>;
|
|
423
|
-
}) => Promise<void>;
|
|
424
|
-
deleteMultipleSessions: (sessionIds: string[], options?: {
|
|
425
|
-
params?: Record<string, string>;
|
|
426
|
-
}) => Promise<void>;
|
|
427
|
-
isLoading: boolean;
|
|
428
|
-
error: string | undefined;
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* Hook for common actions like initialization, fetching agents/teams
|
|
433
|
-
*/
|
|
434
|
-
declare function useAgnoActions(): {
|
|
435
|
-
initialize: (options?: {
|
|
436
|
-
params?: Record<string, string>;
|
|
437
|
-
}) => Promise<{
|
|
438
|
-
agents: AgentDetails[];
|
|
439
|
-
teams: TeamDetails[];
|
|
440
|
-
}>;
|
|
441
|
-
checkStatus: (options?: {
|
|
442
|
-
params?: Record<string, string>;
|
|
443
|
-
}) => Promise<boolean>;
|
|
444
|
-
fetchAgents: (options?: {
|
|
445
|
-
params?: Record<string, string>;
|
|
446
|
-
}) => Promise<AgentDetails[]>;
|
|
447
|
-
fetchTeams: (options?: {
|
|
448
|
-
params?: Record<string, string>;
|
|
449
|
-
}) => Promise<TeamDetails[]>;
|
|
450
|
-
updateConfig: (updates: Partial<Parameters<(updates: Partial<_rodrigocoliveira_agno_types.AgnoClientConfig>) => void>[0]>) => void;
|
|
451
|
-
isInitializing: boolean;
|
|
452
|
-
error: string | undefined;
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* React hook to subscribe to custom events emitted by the agent backend (yielding CustomEventData).
|
|
457
|
-
*
|
|
458
|
-
* Custom events are emitted when agent yeilds data not directly related to tool execution or chat messages,
|
|
459
|
-
* through the CustomEvent API event type.
|
|
460
|
-
*
|
|
461
|
-
* @param handler - Optional callback invoked for each custom event
|
|
462
|
-
* @returns Object containing accumulated custom events and a clear function
|
|
463
|
-
*
|
|
464
|
-
* @example
|
|
465
|
-
* // Collect all custom events
|
|
466
|
-
* const { events } = useAgnoCustomEvents();
|
|
467
|
-
*
|
|
468
|
-
* @example
|
|
469
|
-
* // Handle events as they arrive
|
|
470
|
-
* const { events } = useAgnoCustomEvents((event) => {
|
|
471
|
-
* if (event.greeting) {
|
|
472
|
-
* showToast(event.greeting);
|
|
473
|
-
* }
|
|
474
|
-
* });
|
|
475
|
-
*
|
|
476
|
-
* @example
|
|
477
|
-
* // Filter for specific event types
|
|
478
|
-
* const { events } = useAgnoCustomEvents();
|
|
479
|
-
* const greetings = events.filter(e => 'greeting' in e);
|
|
480
|
-
*
|
|
481
|
-
* @example
|
|
482
|
-
* // Clear accumulated events
|
|
483
|
-
* const { events, clearEvents } = useAgnoCustomEvents();
|
|
484
|
-
* // Later...
|
|
485
|
-
* clearEvents();
|
|
486
|
-
*/
|
|
487
|
-
declare function useAgnoCustomEvents(handler?: (event: CustomEventData) => void): {
|
|
488
|
-
events: CustomEventData[];
|
|
489
|
-
clearEvents: () => void;
|
|
490
|
-
};
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Hook for memory management
|
|
494
|
-
*/
|
|
495
|
-
declare function useAgnoMemory(): {
|
|
496
|
-
memories: UserMemory[];
|
|
497
|
-
topics: string[];
|
|
498
|
-
isLoading: boolean;
|
|
499
|
-
error: string | undefined;
|
|
500
|
-
fetchMemories: (queryParams?: ListMemoriesParams, options?: {
|
|
501
|
-
params?: Record<string, string>;
|
|
502
|
-
}) => Promise<MemoriesListResponse>;
|
|
503
|
-
getMemoryById: (memoryId: string, options?: {
|
|
504
|
-
params?: Record<string, string>;
|
|
505
|
-
table?: string;
|
|
506
|
-
}) => Promise<UserMemory>;
|
|
507
|
-
getMemoryTopics: (options?: {
|
|
508
|
-
params?: Record<string, string>;
|
|
509
|
-
table?: string;
|
|
510
|
-
}) => Promise<string[]>;
|
|
511
|
-
getUserMemoryStats: (queryParams?: UserMemoryStatsParams, options?: {
|
|
512
|
-
params?: Record<string, string>;
|
|
513
|
-
}) => Promise<UserMemoryStatsResponse>;
|
|
514
|
-
createMemory: (request: CreateMemoryRequest, options?: {
|
|
515
|
-
params?: Record<string, string>;
|
|
516
|
-
table?: string;
|
|
517
|
-
}) => Promise<UserMemory>;
|
|
518
|
-
updateMemory: (memoryId: string, request: UpdateMemoryRequest, options?: {
|
|
519
|
-
params?: Record<string, string>;
|
|
520
|
-
table?: string;
|
|
521
|
-
}) => Promise<UserMemory>;
|
|
522
|
-
deleteMemory: (memoryId: string, options?: {
|
|
523
|
-
params?: Record<string, string>;
|
|
524
|
-
table?: string;
|
|
525
|
-
}) => Promise<void>;
|
|
526
|
-
deleteMultipleMemories: (memoryIds: string[], options?: {
|
|
527
|
-
params?: Record<string, string>;
|
|
528
|
-
table?: string;
|
|
529
|
-
userId?: string;
|
|
530
|
-
}) => Promise<void>;
|
|
531
|
-
};
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Hook for knowledge management
|
|
535
|
-
*/
|
|
536
|
-
declare function useAgnoKnowledge(): {
|
|
537
|
-
config: KnowledgeConfigResponse | undefined;
|
|
538
|
-
content: ContentResponse[];
|
|
539
|
-
isLoading: boolean;
|
|
540
|
-
error: string | undefined;
|
|
541
|
-
getConfig: (options?: {
|
|
542
|
-
dbId?: string;
|
|
543
|
-
params?: Record<string, string>;
|
|
544
|
-
}) => Promise<KnowledgeConfigResponse>;
|
|
545
|
-
listContent: (listOptions?: ContentListOptions, options?: {
|
|
546
|
-
params?: Record<string, string>;
|
|
547
|
-
}) => Promise<ContentListResponse>;
|
|
548
|
-
getContent: (contentId: string, options?: {
|
|
549
|
-
dbId?: string;
|
|
550
|
-
params?: Record<string, string>;
|
|
551
|
-
}) => Promise<ContentResponse>;
|
|
552
|
-
getContentStatus: (contentId: string, options?: {
|
|
553
|
-
dbId?: string;
|
|
554
|
-
params?: Record<string, string>;
|
|
555
|
-
}) => Promise<ContentStatusResponse>;
|
|
556
|
-
search: (request: VectorSearchRequest, options?: {
|
|
557
|
-
params?: Record<string, string>;
|
|
558
|
-
}) => Promise<VectorSearchResponse>;
|
|
559
|
-
uploadContent: (data: FormData | {
|
|
560
|
-
name?: string;
|
|
561
|
-
description?: string;
|
|
562
|
-
url?: string;
|
|
563
|
-
metadata?: Record<string, unknown>;
|
|
564
|
-
file?: File;
|
|
565
|
-
text_content?: string;
|
|
566
|
-
reader_id?: string;
|
|
567
|
-
chunker?: string;
|
|
568
|
-
chunk_size?: number;
|
|
569
|
-
chunk_overlap?: number;
|
|
570
|
-
}, options?: {
|
|
571
|
-
dbId?: string;
|
|
572
|
-
params?: Record<string, string>;
|
|
573
|
-
}) => Promise<ContentResponse>;
|
|
574
|
-
updateContent: (contentId: string, request: ContentUpdateRequest, options?: {
|
|
575
|
-
dbId?: string;
|
|
576
|
-
params?: Record<string, string>;
|
|
577
|
-
}) => Promise<ContentResponse>;
|
|
578
|
-
deleteAllContent: (options?: {
|
|
579
|
-
dbId?: string;
|
|
580
|
-
params?: Record<string, string>;
|
|
581
|
-
}) => Promise<void>;
|
|
582
|
-
deleteContent: (contentId: string, options?: {
|
|
583
|
-
dbId?: string;
|
|
584
|
-
params?: Record<string, string>;
|
|
585
|
-
}) => Promise<ContentResponse>;
|
|
586
|
-
};
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Hook for metrics management
|
|
590
|
-
*
|
|
591
|
-
* Provides methods to fetch and refresh AgentOS metrics.
|
|
592
|
-
*
|
|
593
|
-
* @example
|
|
594
|
-
* ```tsx
|
|
595
|
-
* function MetricsDashboard() {
|
|
596
|
-
* const {
|
|
597
|
-
* metrics,
|
|
598
|
-
* fetchMetrics,
|
|
599
|
-
* refreshMetrics,
|
|
600
|
-
* isLoading,
|
|
601
|
-
* isRefreshing,
|
|
602
|
-
* error,
|
|
603
|
-
* } = useAgnoMetrics();
|
|
604
|
-
*
|
|
605
|
-
* useEffect(() => {
|
|
606
|
-
* fetchMetrics({
|
|
607
|
-
* startingDate: '2024-01-01',
|
|
608
|
-
* endingDate: '2024-01-31',
|
|
609
|
-
* });
|
|
610
|
-
* }, [fetchMetrics]);
|
|
611
|
-
*
|
|
612
|
-
* if (isLoading) return <div>Loading metrics...</div>;
|
|
613
|
-
* if (error) return <div>Error: {error}</div>;
|
|
614
|
-
*
|
|
615
|
-
* return (
|
|
616
|
-
* <div>
|
|
617
|
-
* {metrics?.metrics.map((day) => (
|
|
618
|
-
* <div key={day.id}>
|
|
619
|
-
* <h3>{day.date}</h3>
|
|
620
|
-
* <p>Agent Runs: {day.agent_runs_count}</p>
|
|
621
|
-
* </div>
|
|
622
|
-
* ))}
|
|
623
|
-
* </div>
|
|
624
|
-
* );
|
|
625
|
-
* }
|
|
626
|
-
* ```
|
|
627
|
-
*/
|
|
628
|
-
declare function useAgnoMetrics(): {
|
|
629
|
-
metrics: MetricsResponse | undefined;
|
|
630
|
-
fetchMetrics: (options?: MetricsOptions) => Promise<MetricsResponse>;
|
|
631
|
-
refreshMetrics: (options?: RefreshMetricsOptions) => Promise<DayAggregatedMetrics[]>;
|
|
632
|
-
clearMetrics: () => void;
|
|
633
|
-
isLoading: boolean;
|
|
634
|
-
isRefreshing: boolean;
|
|
635
|
-
error: string | undefined;
|
|
636
|
-
};
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* Hook for evaluation management
|
|
640
|
-
*/
|
|
641
|
-
declare function useAgnoEvals(): {
|
|
642
|
-
evalRuns: EvalSchema[];
|
|
643
|
-
pagination: _rodrigocoliveira_agno_types.PaginationInfo | undefined;
|
|
644
|
-
isLoading: boolean;
|
|
645
|
-
error: string | undefined;
|
|
646
|
-
listEvalRuns: (listParams?: ListEvalRunsParams, options?: {
|
|
647
|
-
params?: Record<string, string>;
|
|
648
|
-
}) => Promise<EvalRunsListResponse>;
|
|
649
|
-
getEvalRun: (evalRunId: string, options?: {
|
|
650
|
-
dbId?: string;
|
|
651
|
-
table?: string;
|
|
652
|
-
params?: Record<string, string>;
|
|
653
|
-
}) => Promise<EvalSchema>;
|
|
654
|
-
executeEval: (request: ExecuteEvalRequest, options?: {
|
|
655
|
-
dbId?: string;
|
|
656
|
-
table?: string;
|
|
657
|
-
params?: Record<string, string>;
|
|
658
|
-
}) => Promise<EvalSchema>;
|
|
659
|
-
updateEvalRun: (evalRunId: string, request: UpdateEvalRunRequest, options?: {
|
|
660
|
-
dbId?: string;
|
|
661
|
-
table?: string;
|
|
662
|
-
params?: Record<string, string>;
|
|
663
|
-
}) => Promise<EvalSchema>;
|
|
664
|
-
deleteEvalRuns: (evalRunIds: string[], options?: {
|
|
665
|
-
dbId?: string;
|
|
666
|
-
table?: string;
|
|
667
|
-
params?: Record<string, string>;
|
|
668
|
-
}) => Promise<void>;
|
|
669
|
-
renameEvalRun: (evalRunId: string, newName: string, options?: {
|
|
670
|
-
dbId?: string;
|
|
671
|
-
table?: string;
|
|
672
|
-
params?: Record<string, string>;
|
|
673
|
-
}) => Promise<EvalSchema>;
|
|
674
|
-
};
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Hook for traces management
|
|
678
|
-
*
|
|
679
|
-
* Provides methods to:
|
|
680
|
-
* - List traces with filters (fetchTraces)
|
|
681
|
-
* - Get trace detail or specific span (getTraceDetail)
|
|
682
|
-
* - Get trace session statistics (fetchTraceSessionStats)
|
|
683
|
-
*
|
|
684
|
-
* @example
|
|
685
|
-
* ```tsx
|
|
686
|
-
* const { traces, fetchTraces, isLoading, error } = useAgnoTraces();
|
|
687
|
-
*
|
|
688
|
-
* // Fetch traces for a specific session
|
|
689
|
-
* useEffect(() => {
|
|
690
|
-
* fetchTraces({ session_id: 'my-session-id' });
|
|
691
|
-
* }, []);
|
|
692
|
-
*
|
|
693
|
-
* // Fetch traces with pagination
|
|
694
|
-
* const result = await fetchTraces({ page: 1, limit: 10 });
|
|
695
|
-
* console.log(result.pagination.total_count);
|
|
696
|
-
* ```
|
|
697
|
-
*/
|
|
698
|
-
declare function useAgnoTraces(): {
|
|
699
|
-
/** Current list of traces (from last fetchTraces call) */
|
|
700
|
-
traces: TraceSummary[];
|
|
701
|
-
/** Current trace session statistics (from last fetchTraceSessionStats call) */
|
|
702
|
-
traceSessionStats: TraceSessionStats[];
|
|
703
|
-
/** Fetch traces with optional filters and pagination */
|
|
704
|
-
fetchTraces: (options?: ListTracesOptions, requestOptions?: {
|
|
705
|
-
headers?: Record<string, string>;
|
|
706
|
-
params?: Record<string, string>;
|
|
707
|
-
}) => Promise<PaginatedTracesResult>;
|
|
708
|
-
/** Get trace detail or specific span */
|
|
709
|
-
getTraceDetail: (traceId: string, options?: GetTraceOptions, requestOptions?: {
|
|
710
|
-
headers?: Record<string, string>;
|
|
711
|
-
params?: Record<string, string>;
|
|
712
|
-
}) => Promise<TraceDetail | TraceNode>;
|
|
713
|
-
/** Fetch trace session statistics */
|
|
714
|
-
fetchTraceSessionStats: (options?: GetTraceSessionStatsOptions, requestOptions?: {
|
|
715
|
-
headers?: Record<string, string>;
|
|
716
|
-
params?: Record<string, string>;
|
|
717
|
-
}) => Promise<PaginatedTraceSessionStatsResult>;
|
|
718
|
-
/** Loading state */
|
|
719
|
-
isLoading: boolean;
|
|
720
|
-
/** Error message if last operation failed */
|
|
721
|
-
error: string | undefined;
|
|
722
|
-
};
|
|
723
|
-
|
|
724
|
-
export { AgnoProvider, type AgnoProviderProps, type CardGridHelperOptions, type ChartHelperOptions, ComponentRegistry, type ComponentRenderer, GenerativeUIRenderer, type GenerativeUIRendererProps, type TableHelperOptions, type ToolExecutionEvent, type ToolHandler, type ToolHandlerContextValue, ToolHandlerProvider, type ToolHandlerProviderProps, createAreaChart, createArtifact, createBarChart, createCard, createCardGrid, createColumn, createLineChart, createMarkdown, createPieChart, createSmartChart, createTable, createToolResult, getChartComponent, getComponentRegistry, getCustomRender, registerChartComponent, resultWithBarChart, resultWithCardGrid, resultWithSmartChart, resultWithTable, useAgnoActions, useAgnoChat, useAgnoClient, useAgnoCustomEvents, useAgnoEvals, useAgnoKnowledge, useAgnoMemory, useAgnoMetrics, useAgnoSession, useAgnoToolExecution, useAgnoTraces, useToolHandlers };
|
|
2
|
+
* @rodrigocoliveira/agno-react
|
|
3
|
+
* React hooks for Agno client
|
|
4
|
+
*/
|
|
5
|
+
export { AgnoProvider, useAgnoClient } from './context/AgnoContext';
|
|
6
|
+
export type { AgnoProviderProps } from './context/AgnoContext';
|
|
7
|
+
export { ToolHandlerProvider, useToolHandlers } from './context/ToolHandlerContext';
|
|
8
|
+
export type { ToolHandlerProviderProps, ToolHandlerContextValue } from './context/ToolHandlerContext';
|
|
9
|
+
export { GenerativeUIRenderer } from './components/GenerativeUIRenderer';
|
|
10
|
+
export type { GenerativeUIRendererProps } from './components/GenerativeUIRenderer';
|
|
11
|
+
export { ComponentRegistry, getComponentRegistry, registerChartComponent, getChartComponent, } from './utils/component-registry';
|
|
12
|
+
export type { ComponentRenderer } from './utils/component-registry';
|
|
13
|
+
export { createBarChart, createLineChart, createPieChart, createAreaChart, createCardGrid, createCard, createTable, createColumn, createMarkdown, createArtifact, createSmartChart, createToolResult, resultWithBarChart, resultWithSmartChart, resultWithCardGrid, resultWithTable, } from './utils/ui-helpers';
|
|
14
|
+
export type { ChartHelperOptions, CardGridHelperOptions, TableHelperOptions, } from './utils/ui-helpers';
|
|
15
|
+
export { useAgnoChat } from './hooks/useAgnoChat';
|
|
16
|
+
export { useAgnoSession } from './hooks/useAgnoSession';
|
|
17
|
+
export { useAgnoActions } from './hooks/useAgnoActions';
|
|
18
|
+
export { useAgnoToolExecution, getCustomRender } from './hooks/useAgnoToolExecution';
|
|
19
|
+
export type { ToolHandler, ToolExecutionEvent } from './hooks/useAgnoToolExecution';
|
|
20
|
+
export { useAgnoCustomEvents } from './hooks/useAgnoCustomEvents';
|
|
21
|
+
export { useAgnoMemory } from './hooks/useAgnoMemory';
|
|
22
|
+
export { useAgnoKnowledge } from './hooks/useAgnoKnowledge';
|
|
23
|
+
export { useAgnoMetrics } from './hooks/useAgnoMetrics';
|
|
24
|
+
export { useAgnoEvals } from './hooks/useAgnoEvals';
|
|
25
|
+
export { useAgnoTraces } from './hooks/useAgnoTraces';
|
|
26
|
+
export type { PaginatedTracesResult, PaginatedTraceSessionStatsResult, } from './hooks/useAgnoTraces';
|
|
27
|
+
export type { AgnoClientConfig, ChatMessage, ToolCall, SessionEntry, AgentDetails, TeamDetails, ClientState, RunEvent, UIComponentSpec, ChartComponentSpec, CardGridComponentSpec, TableComponentSpec, MarkdownComponentSpec, CustomComponentSpec, ArtifactComponentSpec, ToolHandlerResult, GenerativeUIData, ChartSeries, CardData, TableColumn, CustomEventData, UserMemory, MemoriesListResponse, ListMemoriesParams, CreateMemoryRequest, UpdateMemoryRequest, DeleteMultipleMemoriesRequest, UserMemoryStats, UserMemoryStatsResponse, UserMemoryStatsParams, ContentStatus, ReaderSchema, ChunkerSchema, VectorDbSchema, KnowledgeConfigResponse, ContentResponse, ContentStatusResponse, ContentListResponse, ContentListOptions, VectorSearchRequest, VectorSearchResult, VectorSearchResponse, ContentUploadRequest, ContentUpdateRequest, TokenMetrics, ModelMetrics, DayAggregatedMetrics, MetricsResponse, MetricsOptions, RefreshMetricsOptions, EvalType, EvalComponentType, ScoringStrategy, SortOrder, EvalSchema, ListEvalRunsParams, EvalRunsListResponse, ExecuteEvalRequest, UpdateEvalRunRequest, DeleteEvalRunsRequest, TraceStatus, TraceSummary, TraceNode, TraceDetail, TraceSessionStats, TracesListResponse, TraceSessionStatsResponse, ListTracesOptions, GetTraceOptions, GetTraceSessionStatsOptions, PaginationInfo, } from '@rodrigocoliveira/agno-types';
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|