@voltagent/server-core 2.0.0 → 2.0.1

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.
@@ -0,0 +1,2385 @@
1
+ import { ServerProviderDeps, ConversationStepRecord, A2AServerRegistry } from '@voltagent/core';
2
+ import { Logger, LogLevel, LogEntry, LogFilter } from '@voltagent/internal';
3
+ import { UIMessage } from 'ai';
4
+ import { A2AServerLike } from '@voltagent/internal/a2a';
5
+
6
+ /**
7
+ * Common app setup utilities
8
+ * Framework-agnostic application configuration helpers
9
+ */
10
+
11
+ /**
12
+ * OpenAPI documentation info
13
+ */
14
+ interface OpenApiInfo {
15
+ version?: string;
16
+ title?: string;
17
+ description?: string;
18
+ }
19
+ /**
20
+ * Common app setup configuration
21
+ */
22
+ interface AppSetupConfig {
23
+ /**
24
+ * Enable Swagger UI
25
+ */
26
+ enableSwaggerUI?: boolean;
27
+ /**
28
+ * CORS options
29
+ */
30
+ corsOptions?: any;
31
+ /**
32
+ * OpenAPI documentation info
33
+ */
34
+ openApiInfo?: OpenApiInfo;
35
+ /**
36
+ * Server port for documentation
37
+ */
38
+ port?: number;
39
+ }
40
+ /**
41
+ * Get or create a logger instance
42
+ * @param deps Server provider dependencies
43
+ * @param component Component name for logger
44
+ * @returns Logger instance
45
+ */
46
+ declare function getOrCreateLogger(deps: ServerProviderDeps, component?: string): Logger;
47
+ /**
48
+ * Check if Swagger UI should be enabled
49
+ * @param config App configuration
50
+ * @returns Whether Swagger UI should be enabled
51
+ */
52
+ declare function shouldEnableSwaggerUI(config: {
53
+ enableSwaggerUI?: boolean;
54
+ }): boolean;
55
+ /**
56
+ * Get default OpenAPI documentation info
57
+ * @param port Server port
58
+ * @returns OpenAPI documentation object
59
+ */
60
+ declare function getOpenApiDoc(port: number, info?: OpenApiInfo): {
61
+ openapi: "3.1.0";
62
+ info: {
63
+ version: string;
64
+ title: string;
65
+ description: string;
66
+ };
67
+ servers: {
68
+ url: string;
69
+ description: string;
70
+ }[];
71
+ };
72
+ /**
73
+ * Default CORS configuration
74
+ */
75
+ declare const DEFAULT_CORS_OPTIONS: {
76
+ origin: string;
77
+ methods: string[];
78
+ allowedHeaders: string[];
79
+ credentials: boolean;
80
+ };
81
+
82
+ /**
83
+ * Framework-agnostic route definitions
84
+ * These can be used by any server implementation (Hono, Fastify, Express, etc.)
85
+ */
86
+ /**
87
+ * HTTP methods
88
+ */
89
+ type HttpMethod = "get" | "post" | "put" | "patch" | "delete" | "options" | "head";
90
+ /**
91
+ * Response definition for a specific status code
92
+ */
93
+ interface ResponseDefinition {
94
+ description: string;
95
+ contentType?: string;
96
+ }
97
+ /**
98
+ * Base route definition that can be used by any framework
99
+ */
100
+ interface RouteDefinition {
101
+ method: HttpMethod;
102
+ path: string;
103
+ summary: string;
104
+ description: string;
105
+ tags: string[];
106
+ operationId?: string;
107
+ responses?: Record<number, ResponseDefinition>;
108
+ }
109
+ /**
110
+ * Agent route definitions
111
+ */
112
+ declare const AGENT_ROUTES: {
113
+ readonly listAgents: {
114
+ readonly method: "get";
115
+ readonly path: "/agents";
116
+ readonly summary: "List all registered agents";
117
+ readonly description: "Retrieve a comprehensive list of all agents registered in the system. Each agent includes its configuration, status, model information, tools, sub-agents, and memory settings. Use this endpoint to discover available agents and their capabilities.";
118
+ readonly tags: readonly ["Agent Management"];
119
+ readonly operationId: "listAgents";
120
+ readonly responses: {
121
+ readonly 200: {
122
+ readonly description: "Successfully retrieved list of all registered agents";
123
+ readonly contentType: "application/json";
124
+ };
125
+ readonly 500: {
126
+ readonly description: "Failed to retrieve agents due to server error";
127
+ readonly contentType: "application/json";
128
+ };
129
+ };
130
+ };
131
+ readonly getAgent: {
132
+ readonly method: "get";
133
+ readonly path: "/agents/:id";
134
+ readonly summary: "Get agent by ID";
135
+ readonly description: "Retrieve detailed information about a specific agent by its ID.";
136
+ readonly tags: readonly ["Agent Management"];
137
+ readonly operationId: "getAgent";
138
+ readonly responses: {
139
+ readonly 200: {
140
+ readonly description: "Successfully retrieved agent details";
141
+ readonly contentType: "application/json";
142
+ };
143
+ readonly 404: {
144
+ readonly description: "Agent not found";
145
+ readonly contentType: "application/json";
146
+ };
147
+ readonly 500: {
148
+ readonly description: "Failed to retrieve agent due to server error";
149
+ readonly contentType: "application/json";
150
+ };
151
+ };
152
+ };
153
+ readonly generateText: {
154
+ readonly method: "post";
155
+ readonly path: "/agents/:id/text";
156
+ readonly summary: "Generate text response";
157
+ readonly description: "Generate a text response from an agent using the provided conversation history. This endpoint processes messages synchronously and returns the complete response once generation is finished. Use this for traditional request-response interactions where you need the full response before proceeding.";
158
+ readonly tags: readonly ["Agent Generation"];
159
+ readonly operationId: "generateText";
160
+ readonly responses: {
161
+ readonly 200: {
162
+ readonly description: "Successfully generated text response from the agent";
163
+ readonly contentType: "application/json";
164
+ };
165
+ readonly 400: {
166
+ readonly description: "Invalid request parameters or message format";
167
+ readonly contentType: "application/json";
168
+ };
169
+ readonly 404: {
170
+ readonly description: "Agent not found";
171
+ readonly contentType: "application/json";
172
+ };
173
+ readonly 500: {
174
+ readonly description: "Failed to generate text due to server error";
175
+ readonly contentType: "application/json";
176
+ };
177
+ };
178
+ };
179
+ readonly streamText: {
180
+ readonly method: "post";
181
+ readonly path: "/agents/:id/stream";
182
+ readonly summary: "Stream raw text response";
183
+ readonly description: "Generate a text response from an agent and stream the raw fullStream data via Server-Sent Events (SSE). This endpoint provides direct access to all stream events including text deltas, tool calls, and tool results. Use this for advanced applications that need full control over stream processing.";
184
+ readonly tags: readonly ["Agent Generation"];
185
+ readonly operationId: "streamText";
186
+ readonly responses: {
187
+ readonly 200: {
188
+ readonly description: "Successfully established SSE stream for raw text generation";
189
+ readonly contentType: "text/event-stream";
190
+ };
191
+ readonly 400: {
192
+ readonly description: "Invalid request parameters or message format";
193
+ readonly contentType: "application/json";
194
+ };
195
+ readonly 404: {
196
+ readonly description: "Agent not found";
197
+ readonly contentType: "application/json";
198
+ };
199
+ readonly 500: {
200
+ readonly description: "Failed to stream text due to server error";
201
+ readonly contentType: "application/json";
202
+ };
203
+ };
204
+ };
205
+ readonly chatStream: {
206
+ readonly method: "post";
207
+ readonly path: "/agents/:id/chat";
208
+ readonly summary: "Stream chat messages";
209
+ readonly description: "Generate a text response from an agent and stream it as UI messages via Server-Sent Events (SSE). This endpoint is optimized for chat interfaces and works seamlessly with the AI SDK's useChat hook. It provides a high-level stream format with automatic handling of messages, tool calls, and metadata.";
210
+ readonly tags: readonly ["Agent Generation"];
211
+ readonly operationId: "chatStream";
212
+ readonly responses: {
213
+ readonly 200: {
214
+ readonly description: "Successfully established SSE stream for chat generation";
215
+ readonly contentType: "text/event-stream";
216
+ };
217
+ readonly 400: {
218
+ readonly description: "Invalid request parameters or message format";
219
+ readonly contentType: "application/json";
220
+ };
221
+ readonly 404: {
222
+ readonly description: "Agent not found";
223
+ readonly contentType: "application/json";
224
+ };
225
+ readonly 500: {
226
+ readonly description: "Failed to stream chat due to server error";
227
+ readonly contentType: "application/json";
228
+ };
229
+ };
230
+ };
231
+ readonly generateObject: {
232
+ readonly method: "post";
233
+ readonly path: "/agents/:id/object";
234
+ readonly summary: "Generate structured object";
235
+ readonly description: "Generate a structured object that conforms to a specified JSON schema. This endpoint is perfect for extracting structured data from unstructured input, generating form data, or creating API responses with guaranteed structure. The agent will ensure the output matches the provided schema exactly.";
236
+ readonly tags: readonly ["Agent Generation"];
237
+ readonly operationId: "generateObject";
238
+ readonly responses: {
239
+ readonly 200: {
240
+ readonly description: "Successfully generated structured object matching the provided schema";
241
+ readonly contentType: "application/json";
242
+ };
243
+ readonly 400: {
244
+ readonly description: "Invalid request parameters, message format, or schema";
245
+ readonly contentType: "application/json";
246
+ };
247
+ readonly 404: {
248
+ readonly description: "Agent not found";
249
+ readonly contentType: "application/json";
250
+ };
251
+ readonly 500: {
252
+ readonly description: "Failed to generate object due to server error";
253
+ readonly contentType: "application/json";
254
+ };
255
+ };
256
+ };
257
+ readonly streamObject: {
258
+ readonly method: "post";
259
+ readonly path: "/agents/:id/stream-object";
260
+ readonly summary: "Stream structured object generation";
261
+ readonly description: "Generate a structured object and stream partial updates via Server-Sent Events (SSE). This allows you to display incremental object construction in real-time, useful for complex object generation where you want to show progress. Events may contain partial object updates or the complete final object, depending on the agent's implementation.";
262
+ readonly tags: readonly ["Agent Generation"];
263
+ readonly operationId: "streamObject";
264
+ readonly responses: {
265
+ readonly 200: {
266
+ readonly description: "Successfully established SSE stream for object generation";
267
+ readonly contentType: "text/event-stream";
268
+ };
269
+ readonly 400: {
270
+ readonly description: "Invalid request parameters, message format, or schema";
271
+ readonly contentType: "application/json";
272
+ };
273
+ readonly 404: {
274
+ readonly description: "Agent not found";
275
+ readonly contentType: "application/json";
276
+ };
277
+ readonly 500: {
278
+ readonly description: "Failed to stream object due to server error";
279
+ readonly contentType: "application/json";
280
+ };
281
+ };
282
+ };
283
+ readonly getAgentHistory: {
284
+ readonly method: "get";
285
+ readonly path: "/agents/:id/history";
286
+ readonly summary: "Get agent history";
287
+ readonly description: "Retrieve the execution history for a specific agent with pagination support.";
288
+ readonly tags: readonly ["Agent Management"];
289
+ readonly operationId: "getAgentHistory";
290
+ readonly responses: {
291
+ readonly 200: {
292
+ readonly description: "Successfully retrieved agent execution history";
293
+ readonly contentType: "application/json";
294
+ };
295
+ readonly 404: {
296
+ readonly description: "Agent not found";
297
+ readonly contentType: "application/json";
298
+ };
299
+ readonly 500: {
300
+ readonly description: "Failed to retrieve agent history due to server error";
301
+ readonly contentType: "application/json";
302
+ };
303
+ };
304
+ };
305
+ };
306
+ /**
307
+ * Workflow route definitions
308
+ */
309
+ declare const WORKFLOW_ROUTES: {
310
+ readonly listWorkflows: {
311
+ readonly method: "get";
312
+ readonly path: "/workflows";
313
+ readonly summary: "List all registered workflows";
314
+ readonly description: "Retrieve a list of all workflows registered in the system. Each workflow includes its ID, name, purpose, step count, and current status. Use this endpoint to discover available workflows and understand their capabilities before execution.";
315
+ readonly tags: readonly ["Workflow Management"];
316
+ readonly operationId: "listWorkflows";
317
+ readonly responses: {
318
+ readonly 200: {
319
+ readonly description: "Successfully retrieved list of all registered workflows";
320
+ readonly contentType: "application/json";
321
+ };
322
+ readonly 500: {
323
+ readonly description: "Failed to retrieve workflows due to server error";
324
+ readonly contentType: "application/json";
325
+ };
326
+ };
327
+ };
328
+ readonly getWorkflow: {
329
+ readonly method: "get";
330
+ readonly path: "/workflows/:id";
331
+ readonly summary: "Get workflow by ID";
332
+ readonly description: "Retrieve detailed information about a specific workflow by its ID.";
333
+ readonly tags: readonly ["Workflow Management"];
334
+ readonly operationId: "getWorkflow";
335
+ readonly responses: {
336
+ readonly 200: {
337
+ readonly description: "Successfully retrieved workflow details";
338
+ readonly contentType: "application/json";
339
+ };
340
+ readonly 404: {
341
+ readonly description: "Workflow not found";
342
+ readonly contentType: "application/json";
343
+ };
344
+ readonly 500: {
345
+ readonly description: "Failed to retrieve workflow due to server error";
346
+ readonly contentType: "application/json";
347
+ };
348
+ };
349
+ };
350
+ readonly listWorkflowRuns: {
351
+ readonly method: "get";
352
+ readonly path: "/workflows/executions";
353
+ readonly summary: "List workflow executions (query-driven)";
354
+ readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.";
355
+ readonly tags: readonly ["Workflow Management"];
356
+ readonly operationId: "listWorkflowRuns";
357
+ readonly responses: {
358
+ readonly 200: {
359
+ readonly description: "Successfully retrieved workflow executions";
360
+ readonly contentType: "application/json";
361
+ };
362
+ readonly 400: {
363
+ readonly description: "Invalid query parameters";
364
+ readonly contentType: "application/json";
365
+ };
366
+ readonly 404: {
367
+ readonly description: "Workflow not found";
368
+ readonly contentType: "application/json";
369
+ };
370
+ readonly 500: {
371
+ readonly description: "Failed to retrieve workflow executions due to server error";
372
+ readonly contentType: "application/json";
373
+ };
374
+ };
375
+ };
376
+ readonly executeWorkflow: {
377
+ readonly method: "post";
378
+ readonly path: "/workflows/:id/execute";
379
+ readonly summary: "Execute workflow synchronously";
380
+ readonly description: "Execute a workflow and wait for it to complete. This endpoint runs the workflow to completion and returns the final result. Use this for workflows that complete quickly or when you need the complete result before proceeding. For long-running workflows, consider using the streaming endpoint instead.";
381
+ readonly tags: readonly ["Workflow Management"];
382
+ readonly operationId: "executeWorkflow";
383
+ readonly responses: {
384
+ readonly 200: {
385
+ readonly description: "Successfully executed workflow and returned final result";
386
+ readonly contentType: "application/json";
387
+ };
388
+ readonly 400: {
389
+ readonly description: "Invalid workflow input or parameters";
390
+ readonly contentType: "application/json";
391
+ };
392
+ readonly 404: {
393
+ readonly description: "Workflow not found";
394
+ readonly contentType: "application/json";
395
+ };
396
+ readonly 500: {
397
+ readonly description: "Failed to execute workflow due to server error";
398
+ readonly contentType: "application/json";
399
+ };
400
+ };
401
+ };
402
+ readonly streamWorkflow: {
403
+ readonly method: "post";
404
+ readonly path: "/workflows/:id/stream";
405
+ readonly summary: "Stream workflow execution events";
406
+ readonly description: "Execute a workflow and stream real-time events via Server-Sent Events (SSE). The stream remains open during suspension and continues after resume.";
407
+ readonly tags: readonly ["Workflow Management"];
408
+ readonly operationId: "streamWorkflow";
409
+ readonly responses: {
410
+ readonly 200: {
411
+ readonly description: "Successfully established SSE stream for workflow execution";
412
+ readonly contentType: "text/event-stream";
413
+ };
414
+ readonly 400: {
415
+ readonly description: "Invalid workflow input or parameters";
416
+ readonly contentType: "application/json";
417
+ };
418
+ readonly 404: {
419
+ readonly description: "Workflow not found";
420
+ readonly contentType: "application/json";
421
+ };
422
+ readonly 500: {
423
+ readonly description: "Failed to stream workflow due to server error";
424
+ readonly contentType: "application/json";
425
+ };
426
+ };
427
+ };
428
+ readonly suspendWorkflow: {
429
+ readonly method: "post";
430
+ readonly path: "/workflows/:id/executions/:executionId/suspend";
431
+ readonly summary: "Suspend workflow execution";
432
+ readonly description: "Suspend a running workflow execution at its current step. This allows you to pause long-running workflows, perform external validations, wait for human approval, or handle rate limits. The workflow state is preserved and can be resumed later with the resume endpoint. Only workflows in 'running' state can be suspended.";
433
+ readonly tags: readonly ["Workflow Management"];
434
+ readonly operationId: "suspendWorkflow";
435
+ readonly responses: {
436
+ readonly 200: {
437
+ readonly description: "Successfully suspended workflow execution";
438
+ readonly contentType: "application/json";
439
+ };
440
+ readonly 400: {
441
+ readonly description: "Workflow is not in a suspendable state";
442
+ readonly contentType: "application/json";
443
+ };
444
+ readonly 404: {
445
+ readonly description: "Workflow or execution not found";
446
+ readonly contentType: "application/json";
447
+ };
448
+ readonly 500: {
449
+ readonly description: "Failed to suspend workflow due to server error";
450
+ readonly contentType: "application/json";
451
+ };
452
+ };
453
+ };
454
+ readonly cancelWorkflow: {
455
+ readonly method: "post";
456
+ readonly path: "/workflows/:id/executions/:executionId/cancel";
457
+ readonly summary: "Cancel workflow execution";
458
+ readonly description: "Cancel a running workflow execution immediately. The workflow stops execution and the state is marked as cancelled. Cancelled workflows cannot be resumed.";
459
+ readonly tags: readonly ["Workflow Management"];
460
+ readonly operationId: "cancelWorkflow";
461
+ readonly responses: {
462
+ readonly 200: {
463
+ readonly description: "Successfully cancelled workflow execution";
464
+ readonly contentType: "application/json";
465
+ };
466
+ readonly 404: {
467
+ readonly description: "Workflow or execution not found";
468
+ readonly contentType: "application/json";
469
+ };
470
+ readonly 409: {
471
+ readonly description: "Workflow execution already completed or not cancellable";
472
+ readonly contentType: "application/json";
473
+ };
474
+ readonly 500: {
475
+ readonly description: "Failed to cancel workflow due to server error";
476
+ readonly contentType: "application/json";
477
+ };
478
+ };
479
+ };
480
+ readonly resumeWorkflow: {
481
+ readonly method: "post";
482
+ readonly path: "/workflows/:id/executions/:executionId/resume";
483
+ readonly summary: "Resume suspended workflow";
484
+ readonly description: "Resume a previously suspended workflow execution from where it left off. You can optionally provide resume data that will be passed to the suspended step for processing. This is commonly used after human approval, external system responses, or scheduled resumptions. The workflow continues execution and returns the final result.";
485
+ readonly tags: readonly ["Workflow Management"];
486
+ readonly operationId: "resumeWorkflow";
487
+ readonly responses: {
488
+ readonly 200: {
489
+ readonly description: "Successfully resumed workflow execution and returned final result";
490
+ readonly contentType: "application/json";
491
+ };
492
+ readonly 400: {
493
+ readonly description: "Workflow is not in a suspended state";
494
+ readonly contentType: "application/json";
495
+ };
496
+ readonly 404: {
497
+ readonly description: "Workflow or execution not found";
498
+ readonly contentType: "application/json";
499
+ };
500
+ readonly 500: {
501
+ readonly description: "Failed to resume workflow due to server error";
502
+ readonly contentType: "application/json";
503
+ };
504
+ };
505
+ };
506
+ readonly getWorkflowState: {
507
+ readonly method: "get";
508
+ readonly path: "/workflows/:id/executions/:executionId/state";
509
+ readonly summary: "Get workflow execution state";
510
+ readonly description: "Retrieve the workflow execution state including input data, suspension information, context, and current status. This is essential for understanding the current state of a workflow execution, especially for suspended workflows that need to be resumed with the correct context.";
511
+ readonly tags: readonly ["Workflow Management"];
512
+ readonly operationId: "getWorkflowState";
513
+ readonly responses: {
514
+ readonly 200: {
515
+ readonly description: "Successfully retrieved workflow execution state";
516
+ readonly contentType: "application/json";
517
+ };
518
+ readonly 404: {
519
+ readonly description: "Workflow or execution not found";
520
+ readonly contentType: "application/json";
521
+ };
522
+ readonly 500: {
523
+ readonly description: "Failed to retrieve workflow state due to server error";
524
+ readonly contentType: "application/json";
525
+ };
526
+ };
527
+ };
528
+ };
529
+ /**
530
+ * Log route definitions
531
+ */
532
+ declare const LOG_ROUTES: {
533
+ readonly getLogs: {
534
+ readonly method: "get";
535
+ readonly path: "/api/logs";
536
+ readonly summary: "Get logs with filters";
537
+ readonly description: "Retrieve system logs with optional filtering by level, agent ID, workflow ID, conversation ID, execution ID, and time range.";
538
+ readonly tags: readonly ["Logging"];
539
+ readonly operationId: "getLogs";
540
+ readonly responses: {
541
+ readonly 200: {
542
+ readonly description: "Successfully retrieved filtered log entries";
543
+ readonly contentType: "application/json";
544
+ };
545
+ readonly 400: {
546
+ readonly description: "Invalid filter parameters";
547
+ readonly contentType: "application/json";
548
+ };
549
+ readonly 500: {
550
+ readonly description: "Failed to retrieve logs due to server error";
551
+ readonly contentType: "application/json";
552
+ };
553
+ };
554
+ };
555
+ };
556
+ /**
557
+ * Update route definitions
558
+ */
559
+ declare const UPDATE_ROUTES: {
560
+ readonly checkUpdates: {
561
+ readonly method: "get";
562
+ readonly path: "/updates";
563
+ readonly summary: "Check for updates";
564
+ readonly description: "Check for available package updates in the VoltAgent ecosystem.";
565
+ readonly tags: readonly ["System"];
566
+ readonly operationId: "checkUpdates";
567
+ readonly responses: {
568
+ readonly 200: {
569
+ readonly description: "Successfully checked for available updates";
570
+ readonly contentType: "application/json";
571
+ };
572
+ readonly 500: {
573
+ readonly description: "Failed to check updates due to server error";
574
+ readonly contentType: "application/json";
575
+ };
576
+ };
577
+ };
578
+ readonly installUpdates: {
579
+ readonly method: "post";
580
+ readonly path: "/updates";
581
+ readonly summary: "Install updates";
582
+ readonly description: "Install available updates for VoltAgent packages. Can install a single package or all packages.";
583
+ readonly tags: readonly ["System"];
584
+ readonly operationId: "installUpdates";
585
+ readonly responses: {
586
+ readonly 200: {
587
+ readonly description: "Successfully installed requested updates";
588
+ readonly contentType: "application/json";
589
+ };
590
+ readonly 400: {
591
+ readonly description: "Invalid update request or package not found";
592
+ readonly contentType: "application/json";
593
+ };
594
+ readonly 500: {
595
+ readonly description: "Failed to install updates due to server error";
596
+ readonly contentType: "application/json";
597
+ };
598
+ };
599
+ };
600
+ readonly installSingleUpdate: {
601
+ readonly method: "post";
602
+ readonly path: "/updates/:packageName";
603
+ readonly summary: "Install single package update";
604
+ readonly description: "Install update for a specific VoltAgent package. The package manager is automatically detected based on lock files (pnpm-lock.yaml, yarn.lock, package-lock.json, or bun.lockb).";
605
+ readonly tags: readonly ["System"];
606
+ readonly operationId: "installSingleUpdate";
607
+ readonly responses: {
608
+ readonly 200: {
609
+ readonly description: "Successfully installed package update";
610
+ readonly contentType: "application/json";
611
+ };
612
+ readonly 400: {
613
+ readonly description: "Invalid package name or package not found";
614
+ readonly contentType: "application/json";
615
+ };
616
+ readonly 500: {
617
+ readonly description: "Failed to install update due to server error";
618
+ readonly contentType: "application/json";
619
+ };
620
+ };
621
+ };
622
+ };
623
+ /**
624
+ * Observability route definitions
625
+ */
626
+ declare const OBSERVABILITY_ROUTES: {
627
+ readonly setupObservability: {
628
+ readonly method: "post";
629
+ readonly path: "/setup-observability";
630
+ readonly summary: "Configure observability settings";
631
+ readonly description: "Updates the .env file with VoltAgent public and secret keys to enable observability features. This allows automatic tracing and monitoring of agent operations.";
632
+ readonly tags: readonly ["Observability"];
633
+ readonly operationId: "setupObservability";
634
+ readonly responses: {
635
+ readonly 200: {
636
+ readonly description: "Successfully configured observability settings";
637
+ readonly contentType: "application/json";
638
+ };
639
+ readonly 400: {
640
+ readonly description: "Invalid request - missing publicKey or secretKey";
641
+ readonly contentType: "application/json";
642
+ };
643
+ readonly 500: {
644
+ readonly description: "Failed to update .env file";
645
+ readonly contentType: "application/json";
646
+ };
647
+ };
648
+ };
649
+ readonly getTraces: {
650
+ readonly method: "get";
651
+ readonly path: "/observability/traces";
652
+ readonly summary: "List all traces";
653
+ readonly description: "Retrieve all OpenTelemetry traces from the observability store. Each trace represents a complete operation with its spans showing the execution flow.";
654
+ readonly tags: readonly ["Observability"];
655
+ readonly operationId: "getTraces";
656
+ readonly responses: {
657
+ readonly 200: {
658
+ readonly description: "Successfully retrieved traces";
659
+ readonly contentType: "application/json";
660
+ };
661
+ readonly 500: {
662
+ readonly description: "Failed to retrieve traces due to server error";
663
+ readonly contentType: "application/json";
664
+ };
665
+ };
666
+ };
667
+ readonly getTraceById: {
668
+ readonly method: "get";
669
+ readonly path: "/observability/traces/:traceId";
670
+ readonly summary: "Get trace by ID";
671
+ readonly description: "Retrieve a specific trace and all its spans by trace ID.";
672
+ readonly tags: readonly ["Observability"];
673
+ readonly operationId: "getTraceById";
674
+ readonly responses: {
675
+ readonly 200: {
676
+ readonly description: "Successfully retrieved trace";
677
+ readonly contentType: "application/json";
678
+ };
679
+ readonly 404: {
680
+ readonly description: "Trace not found";
681
+ readonly contentType: "application/json";
682
+ };
683
+ readonly 500: {
684
+ readonly description: "Failed to retrieve trace due to server error";
685
+ readonly contentType: "application/json";
686
+ };
687
+ };
688
+ };
689
+ readonly getSpanById: {
690
+ readonly method: "get";
691
+ readonly path: "/observability/spans/:spanId";
692
+ readonly summary: "Get span by ID";
693
+ readonly description: "Retrieve a specific span by its ID.";
694
+ readonly tags: readonly ["Observability"];
695
+ readonly operationId: "getSpanById";
696
+ readonly responses: {
697
+ readonly 200: {
698
+ readonly description: "Successfully retrieved span";
699
+ readonly contentType: "application/json";
700
+ };
701
+ readonly 404: {
702
+ readonly description: "Span not found";
703
+ readonly contentType: "application/json";
704
+ };
705
+ readonly 500: {
706
+ readonly description: "Failed to retrieve span due to server error";
707
+ readonly contentType: "application/json";
708
+ };
709
+ };
710
+ };
711
+ readonly getObservabilityStatus: {
712
+ readonly method: "get";
713
+ readonly path: "/observability/status";
714
+ readonly summary: "Get observability status";
715
+ readonly description: "Check the status and configuration of the observability system.";
716
+ readonly tags: readonly ["Observability"];
717
+ readonly operationId: "getObservabilityStatus";
718
+ readonly responses: {
719
+ readonly 200: {
720
+ readonly description: "Successfully retrieved observability status";
721
+ readonly contentType: "application/json";
722
+ };
723
+ readonly 500: {
724
+ readonly description: "Failed to retrieve status due to server error";
725
+ readonly contentType: "application/json";
726
+ };
727
+ };
728
+ };
729
+ readonly getLogsByTraceId: {
730
+ readonly method: "get";
731
+ readonly path: "/observability/traces/:traceId/logs";
732
+ readonly summary: "Get logs by trace ID";
733
+ readonly description: "Retrieve all logs associated with a specific trace ID.";
734
+ readonly tags: readonly ["Observability"];
735
+ readonly operationId: "getLogsByTraceId";
736
+ readonly responses: {
737
+ readonly 200: {
738
+ readonly description: "Successfully retrieved logs";
739
+ readonly contentType: "application/json";
740
+ };
741
+ readonly 404: {
742
+ readonly description: "No logs found for the trace";
743
+ readonly contentType: "application/json";
744
+ };
745
+ readonly 500: {
746
+ readonly description: "Failed to retrieve logs due to server error";
747
+ readonly contentType: "application/json";
748
+ };
749
+ };
750
+ };
751
+ readonly getLogsBySpanId: {
752
+ readonly method: "get";
753
+ readonly path: "/observability/spans/:spanId/logs";
754
+ readonly summary: "Get logs by span ID";
755
+ readonly description: "Retrieve all logs associated with a specific span ID.";
756
+ readonly tags: readonly ["Observability"];
757
+ readonly operationId: "getLogsBySpanId";
758
+ readonly responses: {
759
+ readonly 200: {
760
+ readonly description: "Successfully retrieved logs";
761
+ readonly contentType: "application/json";
762
+ };
763
+ readonly 404: {
764
+ readonly description: "No logs found for the span";
765
+ readonly contentType: "application/json";
766
+ };
767
+ readonly 500: {
768
+ readonly description: "Failed to retrieve logs due to server error";
769
+ readonly contentType: "application/json";
770
+ };
771
+ };
772
+ };
773
+ readonly queryLogs: {
774
+ readonly method: "get";
775
+ readonly path: "/observability/logs";
776
+ readonly summary: "Query logs";
777
+ readonly description: "Query logs with filters such as severity, time range, trace ID, etc.";
778
+ readonly tags: readonly ["Observability"];
779
+ readonly operationId: "queryLogs";
780
+ readonly responses: {
781
+ readonly 200: {
782
+ readonly description: "Successfully retrieved logs";
783
+ readonly contentType: "application/json";
784
+ };
785
+ readonly 400: {
786
+ readonly description: "Invalid query parameters";
787
+ readonly contentType: "application/json";
788
+ };
789
+ readonly 500: {
790
+ readonly description: "Failed to query logs due to server error";
791
+ readonly contentType: "application/json";
792
+ };
793
+ };
794
+ };
795
+ };
796
+ declare const OBSERVABILITY_MEMORY_ROUTES: {
797
+ readonly listMemoryUsers: {
798
+ readonly method: "get";
799
+ readonly path: "/observability/memory/users";
800
+ readonly summary: "List memory users";
801
+ readonly description: "Retrieve all users who have associated memory records. Supports optional filtering by agent and pagination controls.";
802
+ readonly tags: readonly ["Observability", "Memory"];
803
+ readonly operationId: "listMemoryUsers";
804
+ readonly responses: {
805
+ readonly 200: {
806
+ readonly description: "Successfully retrieved users";
807
+ readonly contentType: "application/json";
808
+ };
809
+ readonly 500: {
810
+ readonly description: "Failed to retrieve memory users due to server error";
811
+ readonly contentType: "application/json";
812
+ };
813
+ };
814
+ };
815
+ readonly listMemoryConversations: {
816
+ readonly method: "get";
817
+ readonly path: "/observability/memory/conversations";
818
+ readonly summary: "List memory conversations";
819
+ readonly description: "Retrieve conversations stored in memory with optional filtering by agent or user. Results are paginated and sorted by last update by default.";
820
+ readonly tags: readonly ["Observability", "Memory"];
821
+ readonly operationId: "listMemoryConversations";
822
+ readonly responses: {
823
+ readonly 200: {
824
+ readonly description: "Successfully retrieved conversations";
825
+ readonly contentType: "application/json";
826
+ };
827
+ readonly 500: {
828
+ readonly description: "Failed to retrieve conversations due to server error";
829
+ readonly contentType: "application/json";
830
+ };
831
+ };
832
+ };
833
+ readonly getMemoryConversationMessages: {
834
+ readonly method: "get";
835
+ readonly path: "/observability/memory/conversations/:conversationId/messages";
836
+ readonly summary: "Get conversation messages";
837
+ readonly description: "Fetch the messages for a specific conversation stored in memory. Supports optional role filtering and windowing via before/after parameters.";
838
+ readonly tags: readonly ["Observability", "Memory"];
839
+ readonly operationId: "getMemoryConversationMessages";
840
+ readonly responses: {
841
+ readonly 200: {
842
+ readonly description: "Successfully retrieved messages";
843
+ readonly contentType: "application/json";
844
+ };
845
+ readonly 404: {
846
+ readonly description: "Conversation not found";
847
+ readonly contentType: "application/json";
848
+ };
849
+ readonly 500: {
850
+ readonly description: "Failed to retrieve messages due to server error";
851
+ readonly contentType: "application/json";
852
+ };
853
+ };
854
+ };
855
+ readonly getConversationSteps: {
856
+ readonly method: "get";
857
+ readonly path: "/observability/memory/conversations/:conversationId/steps";
858
+ readonly summary: "Get conversation steps";
859
+ readonly description: "Fetch the recorded agent steps for a specific conversation stored in memory.";
860
+ readonly tags: readonly ["Observability", "Memory"];
861
+ readonly operationId: "getConversationSteps";
862
+ readonly responses: {
863
+ readonly 200: {
864
+ readonly description: "Successfully retrieved conversation steps";
865
+ readonly contentType: "application/json";
866
+ };
867
+ readonly 404: {
868
+ readonly description: "Conversation not found";
869
+ readonly contentType: "application/json";
870
+ };
871
+ readonly 500: {
872
+ readonly description: "Failed to retrieve conversation steps due to server error";
873
+ readonly contentType: "application/json";
874
+ };
875
+ };
876
+ };
877
+ readonly getWorkingMemory: {
878
+ readonly method: "get";
879
+ readonly path: "/observability/memory/working-memory";
880
+ readonly summary: "Get working memory";
881
+ readonly description: "Retrieve working memory content for a conversation or user. Specify the scope and relevant identifiers in query parameters.";
882
+ readonly tags: readonly ["Observability", "Memory"];
883
+ readonly operationId: "getWorkingMemory";
884
+ readonly responses: {
885
+ readonly 200: {
886
+ readonly description: "Successfully retrieved working memory";
887
+ readonly contentType: "application/json";
888
+ };
889
+ readonly 404: {
890
+ readonly description: "Working memory not found";
891
+ readonly contentType: "application/json";
892
+ };
893
+ readonly 500: {
894
+ readonly description: "Failed to retrieve working memory due to server error";
895
+ readonly contentType: "application/json";
896
+ };
897
+ };
898
+ };
899
+ };
900
+ /**
901
+ * Tool route definitions
902
+ */
903
+ declare const TOOL_ROUTES: {
904
+ readonly listTools: {
905
+ readonly method: "get";
906
+ readonly path: "/tools";
907
+ readonly summary: "List all tools";
908
+ readonly description: "Retrieve a list of all tools registered across agents. Includes name, description, parameters, and owning agent metadata.";
909
+ readonly tags: readonly ["Tools"];
910
+ readonly operationId: "listTools";
911
+ readonly responses: {
912
+ readonly 200: {
913
+ readonly description: "Successfully retrieved list of tools";
914
+ readonly contentType: "application/json";
915
+ };
916
+ readonly 500: {
917
+ readonly description: "Failed to retrieve tools due to server error";
918
+ readonly contentType: "application/json";
919
+ };
920
+ };
921
+ };
922
+ readonly executeTool: {
923
+ readonly method: "post";
924
+ readonly path: "/tools/:name/execute";
925
+ readonly summary: "Execute a tool directly";
926
+ readonly description: "Execute a registered tool directly via HTTP without going through the agent chat flow. Accepts tool input and optional context metadata.";
927
+ readonly tags: readonly ["Tools"];
928
+ readonly operationId: "executeTool";
929
+ readonly responses: {
930
+ readonly 200: {
931
+ readonly description: "Successfully executed tool";
932
+ readonly contentType: "application/json";
933
+ };
934
+ readonly 400: {
935
+ readonly description: "Invalid request or tool input";
936
+ readonly contentType: "application/json";
937
+ };
938
+ readonly 404: {
939
+ readonly description: "Tool not found";
940
+ readonly contentType: "application/json";
941
+ };
942
+ readonly 500: {
943
+ readonly description: "Failed to execute tool due to server error";
944
+ readonly contentType: "application/json";
945
+ };
946
+ };
947
+ };
948
+ };
949
+ /**
950
+ * All route definitions combined
951
+ */
952
+ declare const ALL_ROUTES: {
953
+ readonly listMemoryUsers: {
954
+ readonly method: "get";
955
+ readonly path: "/observability/memory/users";
956
+ readonly summary: "List memory users";
957
+ readonly description: "Retrieve all users who have associated memory records. Supports optional filtering by agent and pagination controls.";
958
+ readonly tags: readonly ["Observability", "Memory"];
959
+ readonly operationId: "listMemoryUsers";
960
+ readonly responses: {
961
+ readonly 200: {
962
+ readonly description: "Successfully retrieved users";
963
+ readonly contentType: "application/json";
964
+ };
965
+ readonly 500: {
966
+ readonly description: "Failed to retrieve memory users due to server error";
967
+ readonly contentType: "application/json";
968
+ };
969
+ };
970
+ };
971
+ readonly listMemoryConversations: {
972
+ readonly method: "get";
973
+ readonly path: "/observability/memory/conversations";
974
+ readonly summary: "List memory conversations";
975
+ readonly description: "Retrieve conversations stored in memory with optional filtering by agent or user. Results are paginated and sorted by last update by default.";
976
+ readonly tags: readonly ["Observability", "Memory"];
977
+ readonly operationId: "listMemoryConversations";
978
+ readonly responses: {
979
+ readonly 200: {
980
+ readonly description: "Successfully retrieved conversations";
981
+ readonly contentType: "application/json";
982
+ };
983
+ readonly 500: {
984
+ readonly description: "Failed to retrieve conversations due to server error";
985
+ readonly contentType: "application/json";
986
+ };
987
+ };
988
+ };
989
+ readonly getMemoryConversationMessages: {
990
+ readonly method: "get";
991
+ readonly path: "/observability/memory/conversations/:conversationId/messages";
992
+ readonly summary: "Get conversation messages";
993
+ readonly description: "Fetch the messages for a specific conversation stored in memory. Supports optional role filtering and windowing via before/after parameters.";
994
+ readonly tags: readonly ["Observability", "Memory"];
995
+ readonly operationId: "getMemoryConversationMessages";
996
+ readonly responses: {
997
+ readonly 200: {
998
+ readonly description: "Successfully retrieved messages";
999
+ readonly contentType: "application/json";
1000
+ };
1001
+ readonly 404: {
1002
+ readonly description: "Conversation not found";
1003
+ readonly contentType: "application/json";
1004
+ };
1005
+ readonly 500: {
1006
+ readonly description: "Failed to retrieve messages due to server error";
1007
+ readonly contentType: "application/json";
1008
+ };
1009
+ };
1010
+ };
1011
+ readonly getConversationSteps: {
1012
+ readonly method: "get";
1013
+ readonly path: "/observability/memory/conversations/:conversationId/steps";
1014
+ readonly summary: "Get conversation steps";
1015
+ readonly description: "Fetch the recorded agent steps for a specific conversation stored in memory.";
1016
+ readonly tags: readonly ["Observability", "Memory"];
1017
+ readonly operationId: "getConversationSteps";
1018
+ readonly responses: {
1019
+ readonly 200: {
1020
+ readonly description: "Successfully retrieved conversation steps";
1021
+ readonly contentType: "application/json";
1022
+ };
1023
+ readonly 404: {
1024
+ readonly description: "Conversation not found";
1025
+ readonly contentType: "application/json";
1026
+ };
1027
+ readonly 500: {
1028
+ readonly description: "Failed to retrieve conversation steps due to server error";
1029
+ readonly contentType: "application/json";
1030
+ };
1031
+ };
1032
+ };
1033
+ readonly getWorkingMemory: {
1034
+ readonly method: "get";
1035
+ readonly path: "/observability/memory/working-memory";
1036
+ readonly summary: "Get working memory";
1037
+ readonly description: "Retrieve working memory content for a conversation or user. Specify the scope and relevant identifiers in query parameters.";
1038
+ readonly tags: readonly ["Observability", "Memory"];
1039
+ readonly operationId: "getWorkingMemory";
1040
+ readonly responses: {
1041
+ readonly 200: {
1042
+ readonly description: "Successfully retrieved working memory";
1043
+ readonly contentType: "application/json";
1044
+ };
1045
+ readonly 404: {
1046
+ readonly description: "Working memory not found";
1047
+ readonly contentType: "application/json";
1048
+ };
1049
+ readonly 500: {
1050
+ readonly description: "Failed to retrieve working memory due to server error";
1051
+ readonly contentType: "application/json";
1052
+ };
1053
+ };
1054
+ };
1055
+ readonly setupObservability: {
1056
+ readonly method: "post";
1057
+ readonly path: "/setup-observability";
1058
+ readonly summary: "Configure observability settings";
1059
+ readonly description: "Updates the .env file with VoltAgent public and secret keys to enable observability features. This allows automatic tracing and monitoring of agent operations.";
1060
+ readonly tags: readonly ["Observability"];
1061
+ readonly operationId: "setupObservability";
1062
+ readonly responses: {
1063
+ readonly 200: {
1064
+ readonly description: "Successfully configured observability settings";
1065
+ readonly contentType: "application/json";
1066
+ };
1067
+ readonly 400: {
1068
+ readonly description: "Invalid request - missing publicKey or secretKey";
1069
+ readonly contentType: "application/json";
1070
+ };
1071
+ readonly 500: {
1072
+ readonly description: "Failed to update .env file";
1073
+ readonly contentType: "application/json";
1074
+ };
1075
+ };
1076
+ };
1077
+ readonly getTraces: {
1078
+ readonly method: "get";
1079
+ readonly path: "/observability/traces";
1080
+ readonly summary: "List all traces";
1081
+ readonly description: "Retrieve all OpenTelemetry traces from the observability store. Each trace represents a complete operation with its spans showing the execution flow.";
1082
+ readonly tags: readonly ["Observability"];
1083
+ readonly operationId: "getTraces";
1084
+ readonly responses: {
1085
+ readonly 200: {
1086
+ readonly description: "Successfully retrieved traces";
1087
+ readonly contentType: "application/json";
1088
+ };
1089
+ readonly 500: {
1090
+ readonly description: "Failed to retrieve traces due to server error";
1091
+ readonly contentType: "application/json";
1092
+ };
1093
+ };
1094
+ };
1095
+ readonly getTraceById: {
1096
+ readonly method: "get";
1097
+ readonly path: "/observability/traces/:traceId";
1098
+ readonly summary: "Get trace by ID";
1099
+ readonly description: "Retrieve a specific trace and all its spans by trace ID.";
1100
+ readonly tags: readonly ["Observability"];
1101
+ readonly operationId: "getTraceById";
1102
+ readonly responses: {
1103
+ readonly 200: {
1104
+ readonly description: "Successfully retrieved trace";
1105
+ readonly contentType: "application/json";
1106
+ };
1107
+ readonly 404: {
1108
+ readonly description: "Trace not found";
1109
+ readonly contentType: "application/json";
1110
+ };
1111
+ readonly 500: {
1112
+ readonly description: "Failed to retrieve trace due to server error";
1113
+ readonly contentType: "application/json";
1114
+ };
1115
+ };
1116
+ };
1117
+ readonly getSpanById: {
1118
+ readonly method: "get";
1119
+ readonly path: "/observability/spans/:spanId";
1120
+ readonly summary: "Get span by ID";
1121
+ readonly description: "Retrieve a specific span by its ID.";
1122
+ readonly tags: readonly ["Observability"];
1123
+ readonly operationId: "getSpanById";
1124
+ readonly responses: {
1125
+ readonly 200: {
1126
+ readonly description: "Successfully retrieved span";
1127
+ readonly contentType: "application/json";
1128
+ };
1129
+ readonly 404: {
1130
+ readonly description: "Span not found";
1131
+ readonly contentType: "application/json";
1132
+ };
1133
+ readonly 500: {
1134
+ readonly description: "Failed to retrieve span due to server error";
1135
+ readonly contentType: "application/json";
1136
+ };
1137
+ };
1138
+ };
1139
+ readonly getObservabilityStatus: {
1140
+ readonly method: "get";
1141
+ readonly path: "/observability/status";
1142
+ readonly summary: "Get observability status";
1143
+ readonly description: "Check the status and configuration of the observability system.";
1144
+ readonly tags: readonly ["Observability"];
1145
+ readonly operationId: "getObservabilityStatus";
1146
+ readonly responses: {
1147
+ readonly 200: {
1148
+ readonly description: "Successfully retrieved observability status";
1149
+ readonly contentType: "application/json";
1150
+ };
1151
+ readonly 500: {
1152
+ readonly description: "Failed to retrieve status due to server error";
1153
+ readonly contentType: "application/json";
1154
+ };
1155
+ };
1156
+ };
1157
+ readonly getLogsByTraceId: {
1158
+ readonly method: "get";
1159
+ readonly path: "/observability/traces/:traceId/logs";
1160
+ readonly summary: "Get logs by trace ID";
1161
+ readonly description: "Retrieve all logs associated with a specific trace ID.";
1162
+ readonly tags: readonly ["Observability"];
1163
+ readonly operationId: "getLogsByTraceId";
1164
+ readonly responses: {
1165
+ readonly 200: {
1166
+ readonly description: "Successfully retrieved logs";
1167
+ readonly contentType: "application/json";
1168
+ };
1169
+ readonly 404: {
1170
+ readonly description: "No logs found for the trace";
1171
+ readonly contentType: "application/json";
1172
+ };
1173
+ readonly 500: {
1174
+ readonly description: "Failed to retrieve logs due to server error";
1175
+ readonly contentType: "application/json";
1176
+ };
1177
+ };
1178
+ };
1179
+ readonly getLogsBySpanId: {
1180
+ readonly method: "get";
1181
+ readonly path: "/observability/spans/:spanId/logs";
1182
+ readonly summary: "Get logs by span ID";
1183
+ readonly description: "Retrieve all logs associated with a specific span ID.";
1184
+ readonly tags: readonly ["Observability"];
1185
+ readonly operationId: "getLogsBySpanId";
1186
+ readonly responses: {
1187
+ readonly 200: {
1188
+ readonly description: "Successfully retrieved logs";
1189
+ readonly contentType: "application/json";
1190
+ };
1191
+ readonly 404: {
1192
+ readonly description: "No logs found for the span";
1193
+ readonly contentType: "application/json";
1194
+ };
1195
+ readonly 500: {
1196
+ readonly description: "Failed to retrieve logs due to server error";
1197
+ readonly contentType: "application/json";
1198
+ };
1199
+ };
1200
+ };
1201
+ readonly queryLogs: {
1202
+ readonly method: "get";
1203
+ readonly path: "/observability/logs";
1204
+ readonly summary: "Query logs";
1205
+ readonly description: "Query logs with filters such as severity, time range, trace ID, etc.";
1206
+ readonly tags: readonly ["Observability"];
1207
+ readonly operationId: "queryLogs";
1208
+ readonly responses: {
1209
+ readonly 200: {
1210
+ readonly description: "Successfully retrieved logs";
1211
+ readonly contentType: "application/json";
1212
+ };
1213
+ readonly 400: {
1214
+ readonly description: "Invalid query parameters";
1215
+ readonly contentType: "application/json";
1216
+ };
1217
+ readonly 500: {
1218
+ readonly description: "Failed to query logs due to server error";
1219
+ readonly contentType: "application/json";
1220
+ };
1221
+ };
1222
+ };
1223
+ readonly checkUpdates: {
1224
+ readonly method: "get";
1225
+ readonly path: "/updates";
1226
+ readonly summary: "Check for updates";
1227
+ readonly description: "Check for available package updates in the VoltAgent ecosystem.";
1228
+ readonly tags: readonly ["System"];
1229
+ readonly operationId: "checkUpdates";
1230
+ readonly responses: {
1231
+ readonly 200: {
1232
+ readonly description: "Successfully checked for available updates";
1233
+ readonly contentType: "application/json";
1234
+ };
1235
+ readonly 500: {
1236
+ readonly description: "Failed to check updates due to server error";
1237
+ readonly contentType: "application/json";
1238
+ };
1239
+ };
1240
+ };
1241
+ readonly installUpdates: {
1242
+ readonly method: "post";
1243
+ readonly path: "/updates";
1244
+ readonly summary: "Install updates";
1245
+ readonly description: "Install available updates for VoltAgent packages. Can install a single package or all packages.";
1246
+ readonly tags: readonly ["System"];
1247
+ readonly operationId: "installUpdates";
1248
+ readonly responses: {
1249
+ readonly 200: {
1250
+ readonly description: "Successfully installed requested updates";
1251
+ readonly contentType: "application/json";
1252
+ };
1253
+ readonly 400: {
1254
+ readonly description: "Invalid update request or package not found";
1255
+ readonly contentType: "application/json";
1256
+ };
1257
+ readonly 500: {
1258
+ readonly description: "Failed to install updates due to server error";
1259
+ readonly contentType: "application/json";
1260
+ };
1261
+ };
1262
+ };
1263
+ readonly installSingleUpdate: {
1264
+ readonly method: "post";
1265
+ readonly path: "/updates/:packageName";
1266
+ readonly summary: "Install single package update";
1267
+ readonly description: "Install update for a specific VoltAgent package. The package manager is automatically detected based on lock files (pnpm-lock.yaml, yarn.lock, package-lock.json, or bun.lockb).";
1268
+ readonly tags: readonly ["System"];
1269
+ readonly operationId: "installSingleUpdate";
1270
+ readonly responses: {
1271
+ readonly 200: {
1272
+ readonly description: "Successfully installed package update";
1273
+ readonly contentType: "application/json";
1274
+ };
1275
+ readonly 400: {
1276
+ readonly description: "Invalid package name or package not found";
1277
+ readonly contentType: "application/json";
1278
+ };
1279
+ readonly 500: {
1280
+ readonly description: "Failed to install update due to server error";
1281
+ readonly contentType: "application/json";
1282
+ };
1283
+ };
1284
+ };
1285
+ readonly getLogs: {
1286
+ readonly method: "get";
1287
+ readonly path: "/api/logs";
1288
+ readonly summary: "Get logs with filters";
1289
+ readonly description: "Retrieve system logs with optional filtering by level, agent ID, workflow ID, conversation ID, execution ID, and time range.";
1290
+ readonly tags: readonly ["Logging"];
1291
+ readonly operationId: "getLogs";
1292
+ readonly responses: {
1293
+ readonly 200: {
1294
+ readonly description: "Successfully retrieved filtered log entries";
1295
+ readonly contentType: "application/json";
1296
+ };
1297
+ readonly 400: {
1298
+ readonly description: "Invalid filter parameters";
1299
+ readonly contentType: "application/json";
1300
+ };
1301
+ readonly 500: {
1302
+ readonly description: "Failed to retrieve logs due to server error";
1303
+ readonly contentType: "application/json";
1304
+ };
1305
+ };
1306
+ };
1307
+ readonly listTools: {
1308
+ readonly method: "get";
1309
+ readonly path: "/tools";
1310
+ readonly summary: "List all tools";
1311
+ readonly description: "Retrieve a list of all tools registered across agents. Includes name, description, parameters, and owning agent metadata.";
1312
+ readonly tags: readonly ["Tools"];
1313
+ readonly operationId: "listTools";
1314
+ readonly responses: {
1315
+ readonly 200: {
1316
+ readonly description: "Successfully retrieved list of tools";
1317
+ readonly contentType: "application/json";
1318
+ };
1319
+ readonly 500: {
1320
+ readonly description: "Failed to retrieve tools due to server error";
1321
+ readonly contentType: "application/json";
1322
+ };
1323
+ };
1324
+ };
1325
+ readonly executeTool: {
1326
+ readonly method: "post";
1327
+ readonly path: "/tools/:name/execute";
1328
+ readonly summary: "Execute a tool directly";
1329
+ readonly description: "Execute a registered tool directly via HTTP without going through the agent chat flow. Accepts tool input and optional context metadata.";
1330
+ readonly tags: readonly ["Tools"];
1331
+ readonly operationId: "executeTool";
1332
+ readonly responses: {
1333
+ readonly 200: {
1334
+ readonly description: "Successfully executed tool";
1335
+ readonly contentType: "application/json";
1336
+ };
1337
+ readonly 400: {
1338
+ readonly description: "Invalid request or tool input";
1339
+ readonly contentType: "application/json";
1340
+ };
1341
+ readonly 404: {
1342
+ readonly description: "Tool not found";
1343
+ readonly contentType: "application/json";
1344
+ };
1345
+ readonly 500: {
1346
+ readonly description: "Failed to execute tool due to server error";
1347
+ readonly contentType: "application/json";
1348
+ };
1349
+ };
1350
+ };
1351
+ readonly listWorkflows: {
1352
+ readonly method: "get";
1353
+ readonly path: "/workflows";
1354
+ readonly summary: "List all registered workflows";
1355
+ readonly description: "Retrieve a list of all workflows registered in the system. Each workflow includes its ID, name, purpose, step count, and current status. Use this endpoint to discover available workflows and understand their capabilities before execution.";
1356
+ readonly tags: readonly ["Workflow Management"];
1357
+ readonly operationId: "listWorkflows";
1358
+ readonly responses: {
1359
+ readonly 200: {
1360
+ readonly description: "Successfully retrieved list of all registered workflows";
1361
+ readonly contentType: "application/json";
1362
+ };
1363
+ readonly 500: {
1364
+ readonly description: "Failed to retrieve workflows due to server error";
1365
+ readonly contentType: "application/json";
1366
+ };
1367
+ };
1368
+ };
1369
+ readonly getWorkflow: {
1370
+ readonly method: "get";
1371
+ readonly path: "/workflows/:id";
1372
+ readonly summary: "Get workflow by ID";
1373
+ readonly description: "Retrieve detailed information about a specific workflow by its ID.";
1374
+ readonly tags: readonly ["Workflow Management"];
1375
+ readonly operationId: "getWorkflow";
1376
+ readonly responses: {
1377
+ readonly 200: {
1378
+ readonly description: "Successfully retrieved workflow details";
1379
+ readonly contentType: "application/json";
1380
+ };
1381
+ readonly 404: {
1382
+ readonly description: "Workflow not found";
1383
+ readonly contentType: "application/json";
1384
+ };
1385
+ readonly 500: {
1386
+ readonly description: "Failed to retrieve workflow due to server error";
1387
+ readonly contentType: "application/json";
1388
+ };
1389
+ };
1390
+ };
1391
+ readonly listWorkflowRuns: {
1392
+ readonly method: "get";
1393
+ readonly path: "/workflows/executions";
1394
+ readonly summary: "List workflow executions (query-driven)";
1395
+ readonly description: "Retrieve workflow executions using query params (workflowId, status, from, to, limit, offset) without path parameters.";
1396
+ readonly tags: readonly ["Workflow Management"];
1397
+ readonly operationId: "listWorkflowRuns";
1398
+ readonly responses: {
1399
+ readonly 200: {
1400
+ readonly description: "Successfully retrieved workflow executions";
1401
+ readonly contentType: "application/json";
1402
+ };
1403
+ readonly 400: {
1404
+ readonly description: "Invalid query parameters";
1405
+ readonly contentType: "application/json";
1406
+ };
1407
+ readonly 404: {
1408
+ readonly description: "Workflow not found";
1409
+ readonly contentType: "application/json";
1410
+ };
1411
+ readonly 500: {
1412
+ readonly description: "Failed to retrieve workflow executions due to server error";
1413
+ readonly contentType: "application/json";
1414
+ };
1415
+ };
1416
+ };
1417
+ readonly executeWorkflow: {
1418
+ readonly method: "post";
1419
+ readonly path: "/workflows/:id/execute";
1420
+ readonly summary: "Execute workflow synchronously";
1421
+ readonly description: "Execute a workflow and wait for it to complete. This endpoint runs the workflow to completion and returns the final result. Use this for workflows that complete quickly or when you need the complete result before proceeding. For long-running workflows, consider using the streaming endpoint instead.";
1422
+ readonly tags: readonly ["Workflow Management"];
1423
+ readonly operationId: "executeWorkflow";
1424
+ readonly responses: {
1425
+ readonly 200: {
1426
+ readonly description: "Successfully executed workflow and returned final result";
1427
+ readonly contentType: "application/json";
1428
+ };
1429
+ readonly 400: {
1430
+ readonly description: "Invalid workflow input or parameters";
1431
+ readonly contentType: "application/json";
1432
+ };
1433
+ readonly 404: {
1434
+ readonly description: "Workflow not found";
1435
+ readonly contentType: "application/json";
1436
+ };
1437
+ readonly 500: {
1438
+ readonly description: "Failed to execute workflow due to server error";
1439
+ readonly contentType: "application/json";
1440
+ };
1441
+ };
1442
+ };
1443
+ readonly streamWorkflow: {
1444
+ readonly method: "post";
1445
+ readonly path: "/workflows/:id/stream";
1446
+ readonly summary: "Stream workflow execution events";
1447
+ readonly description: "Execute a workflow and stream real-time events via Server-Sent Events (SSE). The stream remains open during suspension and continues after resume.";
1448
+ readonly tags: readonly ["Workflow Management"];
1449
+ readonly operationId: "streamWorkflow";
1450
+ readonly responses: {
1451
+ readonly 200: {
1452
+ readonly description: "Successfully established SSE stream for workflow execution";
1453
+ readonly contentType: "text/event-stream";
1454
+ };
1455
+ readonly 400: {
1456
+ readonly description: "Invalid workflow input or parameters";
1457
+ readonly contentType: "application/json";
1458
+ };
1459
+ readonly 404: {
1460
+ readonly description: "Workflow not found";
1461
+ readonly contentType: "application/json";
1462
+ };
1463
+ readonly 500: {
1464
+ readonly description: "Failed to stream workflow due to server error";
1465
+ readonly contentType: "application/json";
1466
+ };
1467
+ };
1468
+ };
1469
+ readonly suspendWorkflow: {
1470
+ readonly method: "post";
1471
+ readonly path: "/workflows/:id/executions/:executionId/suspend";
1472
+ readonly summary: "Suspend workflow execution";
1473
+ readonly description: "Suspend a running workflow execution at its current step. This allows you to pause long-running workflows, perform external validations, wait for human approval, or handle rate limits. The workflow state is preserved and can be resumed later with the resume endpoint. Only workflows in 'running' state can be suspended.";
1474
+ readonly tags: readonly ["Workflow Management"];
1475
+ readonly operationId: "suspendWorkflow";
1476
+ readonly responses: {
1477
+ readonly 200: {
1478
+ readonly description: "Successfully suspended workflow execution";
1479
+ readonly contentType: "application/json";
1480
+ };
1481
+ readonly 400: {
1482
+ readonly description: "Workflow is not in a suspendable state";
1483
+ readonly contentType: "application/json";
1484
+ };
1485
+ readonly 404: {
1486
+ readonly description: "Workflow or execution not found";
1487
+ readonly contentType: "application/json";
1488
+ };
1489
+ readonly 500: {
1490
+ readonly description: "Failed to suspend workflow due to server error";
1491
+ readonly contentType: "application/json";
1492
+ };
1493
+ };
1494
+ };
1495
+ readonly cancelWorkflow: {
1496
+ readonly method: "post";
1497
+ readonly path: "/workflows/:id/executions/:executionId/cancel";
1498
+ readonly summary: "Cancel workflow execution";
1499
+ readonly description: "Cancel a running workflow execution immediately. The workflow stops execution and the state is marked as cancelled. Cancelled workflows cannot be resumed.";
1500
+ readonly tags: readonly ["Workflow Management"];
1501
+ readonly operationId: "cancelWorkflow";
1502
+ readonly responses: {
1503
+ readonly 200: {
1504
+ readonly description: "Successfully cancelled workflow execution";
1505
+ readonly contentType: "application/json";
1506
+ };
1507
+ readonly 404: {
1508
+ readonly description: "Workflow or execution not found";
1509
+ readonly contentType: "application/json";
1510
+ };
1511
+ readonly 409: {
1512
+ readonly description: "Workflow execution already completed or not cancellable";
1513
+ readonly contentType: "application/json";
1514
+ };
1515
+ readonly 500: {
1516
+ readonly description: "Failed to cancel workflow due to server error";
1517
+ readonly contentType: "application/json";
1518
+ };
1519
+ };
1520
+ };
1521
+ readonly resumeWorkflow: {
1522
+ readonly method: "post";
1523
+ readonly path: "/workflows/:id/executions/:executionId/resume";
1524
+ readonly summary: "Resume suspended workflow";
1525
+ readonly description: "Resume a previously suspended workflow execution from where it left off. You can optionally provide resume data that will be passed to the suspended step for processing. This is commonly used after human approval, external system responses, or scheduled resumptions. The workflow continues execution and returns the final result.";
1526
+ readonly tags: readonly ["Workflow Management"];
1527
+ readonly operationId: "resumeWorkflow";
1528
+ readonly responses: {
1529
+ readonly 200: {
1530
+ readonly description: "Successfully resumed workflow execution and returned final result";
1531
+ readonly contentType: "application/json";
1532
+ };
1533
+ readonly 400: {
1534
+ readonly description: "Workflow is not in a suspended state";
1535
+ readonly contentType: "application/json";
1536
+ };
1537
+ readonly 404: {
1538
+ readonly description: "Workflow or execution not found";
1539
+ readonly contentType: "application/json";
1540
+ };
1541
+ readonly 500: {
1542
+ readonly description: "Failed to resume workflow due to server error";
1543
+ readonly contentType: "application/json";
1544
+ };
1545
+ };
1546
+ };
1547
+ readonly getWorkflowState: {
1548
+ readonly method: "get";
1549
+ readonly path: "/workflows/:id/executions/:executionId/state";
1550
+ readonly summary: "Get workflow execution state";
1551
+ readonly description: "Retrieve the workflow execution state including input data, suspension information, context, and current status. This is essential for understanding the current state of a workflow execution, especially for suspended workflows that need to be resumed with the correct context.";
1552
+ readonly tags: readonly ["Workflow Management"];
1553
+ readonly operationId: "getWorkflowState";
1554
+ readonly responses: {
1555
+ readonly 200: {
1556
+ readonly description: "Successfully retrieved workflow execution state";
1557
+ readonly contentType: "application/json";
1558
+ };
1559
+ readonly 404: {
1560
+ readonly description: "Workflow or execution not found";
1561
+ readonly contentType: "application/json";
1562
+ };
1563
+ readonly 500: {
1564
+ readonly description: "Failed to retrieve workflow state due to server error";
1565
+ readonly contentType: "application/json";
1566
+ };
1567
+ };
1568
+ };
1569
+ readonly listAgents: {
1570
+ readonly method: "get";
1571
+ readonly path: "/agents";
1572
+ readonly summary: "List all registered agents";
1573
+ readonly description: "Retrieve a comprehensive list of all agents registered in the system. Each agent includes its configuration, status, model information, tools, sub-agents, and memory settings. Use this endpoint to discover available agents and their capabilities.";
1574
+ readonly tags: readonly ["Agent Management"];
1575
+ readonly operationId: "listAgents";
1576
+ readonly responses: {
1577
+ readonly 200: {
1578
+ readonly description: "Successfully retrieved list of all registered agents";
1579
+ readonly contentType: "application/json";
1580
+ };
1581
+ readonly 500: {
1582
+ readonly description: "Failed to retrieve agents due to server error";
1583
+ readonly contentType: "application/json";
1584
+ };
1585
+ };
1586
+ };
1587
+ readonly getAgent: {
1588
+ readonly method: "get";
1589
+ readonly path: "/agents/:id";
1590
+ readonly summary: "Get agent by ID";
1591
+ readonly description: "Retrieve detailed information about a specific agent by its ID.";
1592
+ readonly tags: readonly ["Agent Management"];
1593
+ readonly operationId: "getAgent";
1594
+ readonly responses: {
1595
+ readonly 200: {
1596
+ readonly description: "Successfully retrieved agent details";
1597
+ readonly contentType: "application/json";
1598
+ };
1599
+ readonly 404: {
1600
+ readonly description: "Agent not found";
1601
+ readonly contentType: "application/json";
1602
+ };
1603
+ readonly 500: {
1604
+ readonly description: "Failed to retrieve agent due to server error";
1605
+ readonly contentType: "application/json";
1606
+ };
1607
+ };
1608
+ };
1609
+ readonly generateText: {
1610
+ readonly method: "post";
1611
+ readonly path: "/agents/:id/text";
1612
+ readonly summary: "Generate text response";
1613
+ readonly description: "Generate a text response from an agent using the provided conversation history. This endpoint processes messages synchronously and returns the complete response once generation is finished. Use this for traditional request-response interactions where you need the full response before proceeding.";
1614
+ readonly tags: readonly ["Agent Generation"];
1615
+ readonly operationId: "generateText";
1616
+ readonly responses: {
1617
+ readonly 200: {
1618
+ readonly description: "Successfully generated text response from the agent";
1619
+ readonly contentType: "application/json";
1620
+ };
1621
+ readonly 400: {
1622
+ readonly description: "Invalid request parameters or message format";
1623
+ readonly contentType: "application/json";
1624
+ };
1625
+ readonly 404: {
1626
+ readonly description: "Agent not found";
1627
+ readonly contentType: "application/json";
1628
+ };
1629
+ readonly 500: {
1630
+ readonly description: "Failed to generate text due to server error";
1631
+ readonly contentType: "application/json";
1632
+ };
1633
+ };
1634
+ };
1635
+ readonly streamText: {
1636
+ readonly method: "post";
1637
+ readonly path: "/agents/:id/stream";
1638
+ readonly summary: "Stream raw text response";
1639
+ readonly description: "Generate a text response from an agent and stream the raw fullStream data via Server-Sent Events (SSE). This endpoint provides direct access to all stream events including text deltas, tool calls, and tool results. Use this for advanced applications that need full control over stream processing.";
1640
+ readonly tags: readonly ["Agent Generation"];
1641
+ readonly operationId: "streamText";
1642
+ readonly responses: {
1643
+ readonly 200: {
1644
+ readonly description: "Successfully established SSE stream for raw text generation";
1645
+ readonly contentType: "text/event-stream";
1646
+ };
1647
+ readonly 400: {
1648
+ readonly description: "Invalid request parameters or message format";
1649
+ readonly contentType: "application/json";
1650
+ };
1651
+ readonly 404: {
1652
+ readonly description: "Agent not found";
1653
+ readonly contentType: "application/json";
1654
+ };
1655
+ readonly 500: {
1656
+ readonly description: "Failed to stream text due to server error";
1657
+ readonly contentType: "application/json";
1658
+ };
1659
+ };
1660
+ };
1661
+ readonly chatStream: {
1662
+ readonly method: "post";
1663
+ readonly path: "/agents/:id/chat";
1664
+ readonly summary: "Stream chat messages";
1665
+ readonly description: "Generate a text response from an agent and stream it as UI messages via Server-Sent Events (SSE). This endpoint is optimized for chat interfaces and works seamlessly with the AI SDK's useChat hook. It provides a high-level stream format with automatic handling of messages, tool calls, and metadata.";
1666
+ readonly tags: readonly ["Agent Generation"];
1667
+ readonly operationId: "chatStream";
1668
+ readonly responses: {
1669
+ readonly 200: {
1670
+ readonly description: "Successfully established SSE stream for chat generation";
1671
+ readonly contentType: "text/event-stream";
1672
+ };
1673
+ readonly 400: {
1674
+ readonly description: "Invalid request parameters or message format";
1675
+ readonly contentType: "application/json";
1676
+ };
1677
+ readonly 404: {
1678
+ readonly description: "Agent not found";
1679
+ readonly contentType: "application/json";
1680
+ };
1681
+ readonly 500: {
1682
+ readonly description: "Failed to stream chat due to server error";
1683
+ readonly contentType: "application/json";
1684
+ };
1685
+ };
1686
+ };
1687
+ readonly generateObject: {
1688
+ readonly method: "post";
1689
+ readonly path: "/agents/:id/object";
1690
+ readonly summary: "Generate structured object";
1691
+ readonly description: "Generate a structured object that conforms to a specified JSON schema. This endpoint is perfect for extracting structured data from unstructured input, generating form data, or creating API responses with guaranteed structure. The agent will ensure the output matches the provided schema exactly.";
1692
+ readonly tags: readonly ["Agent Generation"];
1693
+ readonly operationId: "generateObject";
1694
+ readonly responses: {
1695
+ readonly 200: {
1696
+ readonly description: "Successfully generated structured object matching the provided schema";
1697
+ readonly contentType: "application/json";
1698
+ };
1699
+ readonly 400: {
1700
+ readonly description: "Invalid request parameters, message format, or schema";
1701
+ readonly contentType: "application/json";
1702
+ };
1703
+ readonly 404: {
1704
+ readonly description: "Agent not found";
1705
+ readonly contentType: "application/json";
1706
+ };
1707
+ readonly 500: {
1708
+ readonly description: "Failed to generate object due to server error";
1709
+ readonly contentType: "application/json";
1710
+ };
1711
+ };
1712
+ };
1713
+ readonly streamObject: {
1714
+ readonly method: "post";
1715
+ readonly path: "/agents/:id/stream-object";
1716
+ readonly summary: "Stream structured object generation";
1717
+ readonly description: "Generate a structured object and stream partial updates via Server-Sent Events (SSE). This allows you to display incremental object construction in real-time, useful for complex object generation where you want to show progress. Events may contain partial object updates or the complete final object, depending on the agent's implementation.";
1718
+ readonly tags: readonly ["Agent Generation"];
1719
+ readonly operationId: "streamObject";
1720
+ readonly responses: {
1721
+ readonly 200: {
1722
+ readonly description: "Successfully established SSE stream for object generation";
1723
+ readonly contentType: "text/event-stream";
1724
+ };
1725
+ readonly 400: {
1726
+ readonly description: "Invalid request parameters, message format, or schema";
1727
+ readonly contentType: "application/json";
1728
+ };
1729
+ readonly 404: {
1730
+ readonly description: "Agent not found";
1731
+ readonly contentType: "application/json";
1732
+ };
1733
+ readonly 500: {
1734
+ readonly description: "Failed to stream object due to server error";
1735
+ readonly contentType: "application/json";
1736
+ };
1737
+ };
1738
+ };
1739
+ readonly getAgentHistory: {
1740
+ readonly method: "get";
1741
+ readonly path: "/agents/:id/history";
1742
+ readonly summary: "Get agent history";
1743
+ readonly description: "Retrieve the execution history for a specific agent with pagination support.";
1744
+ readonly tags: readonly ["Agent Management"];
1745
+ readonly operationId: "getAgentHistory";
1746
+ readonly responses: {
1747
+ readonly 200: {
1748
+ readonly description: "Successfully retrieved agent execution history";
1749
+ readonly contentType: "application/json";
1750
+ };
1751
+ readonly 404: {
1752
+ readonly description: "Agent not found";
1753
+ readonly contentType: "application/json";
1754
+ };
1755
+ readonly 500: {
1756
+ readonly description: "Failed to retrieve agent history due to server error";
1757
+ readonly contentType: "application/json";
1758
+ };
1759
+ };
1760
+ };
1761
+ };
1762
+ /**
1763
+ * Helper to get all routes as an array
1764
+ */
1765
+ declare function getAllRoutesArray(): RouteDefinition[];
1766
+ /**
1767
+ * MCP route definitions
1768
+ */
1769
+ declare const MCP_ROUTES: {
1770
+ listServers: {
1771
+ method: "get";
1772
+ path: string;
1773
+ summary: string;
1774
+ description: string;
1775
+ tags: string[];
1776
+ operationId: string;
1777
+ responses: {
1778
+ 200: {
1779
+ description: string;
1780
+ contentType: string;
1781
+ };
1782
+ 500: {
1783
+ description: string;
1784
+ contentType: string;
1785
+ };
1786
+ };
1787
+ };
1788
+ getServer: {
1789
+ method: "get";
1790
+ path: string;
1791
+ summary: string;
1792
+ description: string;
1793
+ tags: string[];
1794
+ operationId: string;
1795
+ responses: {
1796
+ 200: {
1797
+ description: string;
1798
+ contentType: string;
1799
+ };
1800
+ 404: {
1801
+ description: string;
1802
+ contentType: string;
1803
+ };
1804
+ };
1805
+ };
1806
+ listTools: {
1807
+ method: "get";
1808
+ path: string;
1809
+ summary: string;
1810
+ description: string;
1811
+ tags: string[];
1812
+ operationId: string;
1813
+ responses: {
1814
+ 200: {
1815
+ description: string;
1816
+ contentType: string;
1817
+ };
1818
+ 404: {
1819
+ description: string;
1820
+ contentType: string;
1821
+ };
1822
+ 500: {
1823
+ description: string;
1824
+ contentType: string;
1825
+ };
1826
+ };
1827
+ };
1828
+ invokeTool: {
1829
+ method: "post";
1830
+ path: string;
1831
+ summary: string;
1832
+ description: string;
1833
+ tags: string[];
1834
+ operationId: string;
1835
+ responses: {
1836
+ 200: {
1837
+ description: string;
1838
+ contentType: string;
1839
+ };
1840
+ 404: {
1841
+ description: string;
1842
+ contentType: string;
1843
+ };
1844
+ 500: {
1845
+ description: string;
1846
+ contentType: string;
1847
+ };
1848
+ };
1849
+ };
1850
+ setLogLevel: {
1851
+ method: "post";
1852
+ path: string;
1853
+ summary: string;
1854
+ description: string;
1855
+ tags: string[];
1856
+ operationId: string;
1857
+ responses: {
1858
+ 200: {
1859
+ description: string;
1860
+ contentType: string;
1861
+ };
1862
+ 404: {
1863
+ description: string;
1864
+ contentType: string;
1865
+ };
1866
+ 500: {
1867
+ description: string;
1868
+ contentType: string;
1869
+ };
1870
+ };
1871
+ };
1872
+ listPrompts: {
1873
+ method: "get";
1874
+ path: string;
1875
+ summary: string;
1876
+ description: string;
1877
+ tags: string[];
1878
+ operationId: string;
1879
+ responses: {
1880
+ 200: {
1881
+ description: string;
1882
+ contentType: string;
1883
+ };
1884
+ 404: {
1885
+ description: string;
1886
+ contentType: string;
1887
+ };
1888
+ 500: {
1889
+ description: string;
1890
+ contentType: string;
1891
+ };
1892
+ };
1893
+ };
1894
+ getPrompt: {
1895
+ method: "get";
1896
+ path: string;
1897
+ summary: string;
1898
+ description: string;
1899
+ tags: string[];
1900
+ operationId: string;
1901
+ responses: {
1902
+ 200: {
1903
+ description: string;
1904
+ contentType: string;
1905
+ };
1906
+ 400: {
1907
+ description: string;
1908
+ contentType: string;
1909
+ };
1910
+ 404: {
1911
+ description: string;
1912
+ contentType: string;
1913
+ };
1914
+ 500: {
1915
+ description: string;
1916
+ contentType: string;
1917
+ };
1918
+ };
1919
+ };
1920
+ listResources: {
1921
+ method: "get";
1922
+ path: string;
1923
+ summary: string;
1924
+ description: string;
1925
+ tags: string[];
1926
+ operationId: string;
1927
+ responses: {
1928
+ 200: {
1929
+ description: string;
1930
+ contentType: string;
1931
+ };
1932
+ 404: {
1933
+ description: string;
1934
+ contentType: string;
1935
+ };
1936
+ 500: {
1937
+ description: string;
1938
+ contentType: string;
1939
+ };
1940
+ };
1941
+ };
1942
+ readResource: {
1943
+ method: "get";
1944
+ path: string;
1945
+ summary: string;
1946
+ description: string;
1947
+ tags: string[];
1948
+ operationId: string;
1949
+ responses: {
1950
+ 200: {
1951
+ description: string;
1952
+ contentType: string;
1953
+ };
1954
+ 400: {
1955
+ description: string;
1956
+ contentType: string;
1957
+ };
1958
+ 404: {
1959
+ description: string;
1960
+ contentType: string;
1961
+ };
1962
+ 500: {
1963
+ description: string;
1964
+ contentType: string;
1965
+ };
1966
+ };
1967
+ };
1968
+ listResourceTemplates: {
1969
+ method: "get";
1970
+ path: string;
1971
+ summary: string;
1972
+ description: string;
1973
+ tags: string[];
1974
+ operationId: string;
1975
+ responses: {
1976
+ 200: {
1977
+ description: string;
1978
+ contentType: string;
1979
+ };
1980
+ 404: {
1981
+ description: string;
1982
+ contentType: string;
1983
+ };
1984
+ 500: {
1985
+ description: string;
1986
+ contentType: string;
1987
+ };
1988
+ };
1989
+ };
1990
+ };
1991
+ declare const A2A_ROUTES: {
1992
+ agentCard: {
1993
+ method: "get";
1994
+ path: string;
1995
+ summary: string;
1996
+ description: string;
1997
+ tags: string[];
1998
+ operationId: string;
1999
+ responses: {
2000
+ 200: {
2001
+ description: string;
2002
+ contentType: string;
2003
+ };
2004
+ 404: {
2005
+ description: string;
2006
+ contentType: string;
2007
+ };
2008
+ 400: {
2009
+ description: string;
2010
+ contentType: string;
2011
+ };
2012
+ };
2013
+ };
2014
+ jsonRpc: {
2015
+ method: "post";
2016
+ path: string;
2017
+ summary: string;
2018
+ description: string;
2019
+ tags: string[];
2020
+ operationId: string;
2021
+ responses: {
2022
+ 200: {
2023
+ description: string;
2024
+ contentType: string;
2025
+ };
2026
+ 400: {
2027
+ description: string;
2028
+ contentType: string;
2029
+ };
2030
+ 404: {
2031
+ description: string;
2032
+ contentType: string;
2033
+ };
2034
+ };
2035
+ };
2036
+ };
2037
+ /**
2038
+ * Helper to get routes by tag
2039
+ */
2040
+ declare function getRoutesByTag(tag: string): RouteDefinition[];
2041
+
2042
+ /**
2043
+ * Framework-agnostic response types for server handlers
2044
+ */
2045
+ interface SuccessResponse<T = any> {
2046
+ success: true;
2047
+ data: T;
2048
+ }
2049
+ interface ErrorResponse {
2050
+ success: false;
2051
+ error: string;
2052
+ httpStatus?: number;
2053
+ code?: string;
2054
+ name?: string;
2055
+ }
2056
+ type ApiResponse<T = any> = SuccessResponse<T> | ErrorResponse;
2057
+ type StreamResponse = Response | ReadableStream | ErrorResponse;
2058
+ declare function isErrorResponse(response: any): response is ErrorResponse;
2059
+ declare function isSuccessResponse<T>(response: any): response is SuccessResponse<T>;
2060
+
2061
+ interface MemoryUserSummary {
2062
+ userId: string;
2063
+ conversationCount: number;
2064
+ agents: MemoryUserAgentSummary[];
2065
+ lastInteractionAt?: string;
2066
+ }
2067
+ interface MemoryUserAgentSummary {
2068
+ agentId: string;
2069
+ agentName?: string;
2070
+ conversationCount: number;
2071
+ lastInteractionAt?: string;
2072
+ }
2073
+ interface MemoryConversationSummary {
2074
+ id: string;
2075
+ userId: string;
2076
+ agentId: string;
2077
+ agentName?: string;
2078
+ title: string;
2079
+ createdAt: string;
2080
+ updatedAt: string;
2081
+ metadata?: Record<string, unknown>;
2082
+ }
2083
+ interface MemoryConversationMessagesResult {
2084
+ conversation: MemoryConversationSummary;
2085
+ messages: UIMessage[];
2086
+ }
2087
+ interface MemoryConversationStepsResult {
2088
+ conversation: MemoryConversationSummary;
2089
+ steps: ConversationStepRecord[];
2090
+ }
2091
+ interface MemoryWorkingMemoryResult {
2092
+ agentId: string | null;
2093
+ agentName?: string | null;
2094
+ scope: "conversation" | "user";
2095
+ content: string | null;
2096
+ format: "markdown" | "json" | null;
2097
+ template?: string | null;
2098
+ }
2099
+ interface MemoryListUsersQuery {
2100
+ agentId?: string;
2101
+ limit?: number;
2102
+ offset?: number;
2103
+ search?: string;
2104
+ }
2105
+ interface MemoryListConversationsQuery {
2106
+ agentId?: string;
2107
+ userId?: string;
2108
+ limit?: number;
2109
+ offset?: number;
2110
+ orderBy?: "created_at" | "updated_at" | "title";
2111
+ orderDirection?: "ASC" | "DESC";
2112
+ }
2113
+ interface MemoryGetMessagesQuery {
2114
+ agentId?: string;
2115
+ limit?: number;
2116
+ before?: Date;
2117
+ after?: Date;
2118
+ roles?: string[];
2119
+ }
2120
+ interface MemoryGetStepsQuery {
2121
+ agentId?: string;
2122
+ limit?: number;
2123
+ operationId?: string;
2124
+ }
2125
+
2126
+ /**
2127
+ * Handler for listing all agents
2128
+ * Returns agent data array
2129
+ */
2130
+ declare function handleGetAgents(deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2131
+ /**
2132
+ * Handler for generating text
2133
+ * Returns generated text data
2134
+ */
2135
+ declare function handleGenerateText(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<ApiResponse>;
2136
+ /**
2137
+ * Handler for streaming text generation with raw fullStream
2138
+ * Returns raw stream data via SSE
2139
+ */
2140
+ declare function handleStreamText(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<Response>;
2141
+ /**
2142
+ * Handler for streaming chat messages
2143
+ * Returns AI SDK UI Message Stream Response
2144
+ */
2145
+ declare function handleChatStream(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<Response>;
2146
+ /**
2147
+ * Handler for generating objects
2148
+ * Returns generated object data
2149
+ */
2150
+ declare function handleGenerateObject(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<ApiResponse>;
2151
+ /**
2152
+ * Handler for streaming object generation
2153
+ * Returns AI SDK Response or error
2154
+ */
2155
+ declare function handleStreamObject(agentId: string, body: any, deps: ServerProviderDeps, logger: Logger, signal?: AbortSignal): Promise<Response>;
2156
+
2157
+ /**
2158
+ * Handler for getting a single agent by ID
2159
+ * Returns agent data
2160
+ */
2161
+ declare function handleGetAgent(agentId: string, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2162
+ /**
2163
+ * Handler for getting agent history
2164
+ * Returns agent history data
2165
+ */
2166
+ declare function handleGetAgentHistory(agentId: string, page: number, limit: number, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2167
+
2168
+ /**
2169
+ * Log filter options for querying logs
2170
+ */
2171
+ interface LogFilterOptions {
2172
+ limit?: number;
2173
+ level?: LogLevel;
2174
+ agentId?: string;
2175
+ conversationId?: string;
2176
+ workflowId?: string;
2177
+ executionId?: string;
2178
+ since?: string | Date;
2179
+ until?: string | Date;
2180
+ }
2181
+ interface LogHandlerResponse {
2182
+ logs: LogEntry[];
2183
+ total: number;
2184
+ query: LogFilter;
2185
+ }
2186
+ /**
2187
+ * Handler for getting logs with filters
2188
+ * Returns filtered log entries
2189
+ */
2190
+ declare function handleGetLogs(options: LogFilterOptions, _deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse<LogHandlerResponse>>;
2191
+
2192
+ /**
2193
+ * Handler for listing all workflows
2194
+ * Returns workflow list data
2195
+ */
2196
+ declare function handleGetWorkflows(deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2197
+ /**
2198
+ * Handler for getting a single workflow
2199
+ * Returns workflow detail data with inferred schemas
2200
+ */
2201
+ declare function handleGetWorkflow(workflowId: string, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2202
+ /**
2203
+ * Handler for executing a workflow
2204
+ * Returns workflow execution result
2205
+ */
2206
+ declare function handleExecuteWorkflow(workflowId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2207
+ /**
2208
+ * Handler for streaming workflow execution
2209
+ * Returns a ReadableStream for SSE
2210
+ */
2211
+ declare function handleStreamWorkflow(workflowId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ReadableStream | ErrorResponse>;
2212
+ /**
2213
+ * Handler for suspending a workflow
2214
+ * Returns suspension result
2215
+ */
2216
+ declare function handleSuspendWorkflow(executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2217
+ /**
2218
+ * Handler for cancelling a workflow
2219
+ * Returns cancellation result
2220
+ */
2221
+ declare function handleCancelWorkflow(executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2222
+ /**
2223
+ * Handler for resuming a workflow
2224
+ * Returns resume result
2225
+ */
2226
+ declare function handleResumeWorkflow(workflowId: string, executionId: string, body: any, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2227
+ /**
2228
+ * Handler for listing workflow execution runs
2229
+ */
2230
+ declare function handleListWorkflowRuns(workflowId: string | undefined, query: {
2231
+ status?: string;
2232
+ from?: string;
2233
+ to?: string;
2234
+ limit?: string;
2235
+ offset?: string;
2236
+ workflowId?: string;
2237
+ } | undefined, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2238
+ /**
2239
+ * Handler for getting workflow execution state
2240
+ * Returns workflow state from Memory V2
2241
+ */
2242
+ declare function handleGetWorkflowState(workflowId: string, executionId: string, deps: ServerProviderDeps, logger: Logger): Promise<ApiResponse>;
2243
+
2244
+ declare function listMemoryUsersHandler(deps: ServerProviderDeps, query: MemoryListUsersQuery): Promise<ApiResponse<{
2245
+ users: MemoryUserSummary[];
2246
+ total: number;
2247
+ limit: number;
2248
+ offset: number;
2249
+ }>>;
2250
+ declare function listMemoryConversationsHandler(deps: ServerProviderDeps, query: MemoryListConversationsQuery): Promise<ApiResponse<{
2251
+ conversations: MemoryConversationSummary[];
2252
+ total: number;
2253
+ limit: number;
2254
+ offset: number;
2255
+ }>>;
2256
+ declare function getConversationMessagesHandler(deps: ServerProviderDeps, conversationId: string, query: MemoryGetMessagesQuery): Promise<ApiResponse<MemoryConversationMessagesResult>>;
2257
+ declare function getConversationStepsHandler(deps: ServerProviderDeps, conversationId: string, query: MemoryGetStepsQuery): Promise<ApiResponse<MemoryConversationStepsResult>>;
2258
+ declare function getWorkingMemoryHandler(deps: ServerProviderDeps, params: {
2259
+ agentId?: string;
2260
+ conversationId?: string;
2261
+ userId?: string;
2262
+ scope: "conversation" | "user";
2263
+ }): Promise<ApiResponse<MemoryWorkingMemoryResult>>;
2264
+
2265
+ type A2AJsonRpcId = string | number | null;
2266
+ interface JsonRpcError<Data = unknown> {
2267
+ code: number;
2268
+ message: string;
2269
+ data?: Data;
2270
+ }
2271
+ interface JsonRpcResponse<Result = unknown, ErrorData = unknown> {
2272
+ jsonrpc: "2.0";
2273
+ id: A2AJsonRpcId;
2274
+ result?: Result;
2275
+ error?: JsonRpcError<ErrorData> | null;
2276
+ }
2277
+ interface JsonRpcStream<Result = unknown, ErrorData = unknown> {
2278
+ kind: "stream";
2279
+ id: A2AJsonRpcId;
2280
+ stream: AsyncGenerator<JsonRpcResponse<Result, ErrorData>>;
2281
+ }
2282
+ type JsonRpcHandlerResult<Result = unknown, ErrorData = unknown> = JsonRpcResponse<Result, ErrorData> | JsonRpcStream<Result, ErrorData>;
2283
+ interface JsonRpcRequest<Params = unknown> {
2284
+ jsonrpc: "2.0";
2285
+ id: A2AJsonRpcId;
2286
+ method: string;
2287
+ params?: Params;
2288
+ }
2289
+ interface A2ARequestContext {
2290
+ userId?: string;
2291
+ sessionId?: string;
2292
+ metadata?: Record<string, unknown>;
2293
+ }
2294
+ interface AgentCardSkill {
2295
+ id: string;
2296
+ name: string;
2297
+ description?: string;
2298
+ tags?: string[];
2299
+ }
2300
+ interface AgentCardProviderInfo {
2301
+ organization?: string;
2302
+ url?: string;
2303
+ }
2304
+ interface AgentCardCapabilities {
2305
+ streaming: boolean;
2306
+ pushNotifications: boolean;
2307
+ stateTransitionHistory: boolean;
2308
+ }
2309
+ interface AgentCard {
2310
+ name: string;
2311
+ description?: string;
2312
+ url: string;
2313
+ provider?: AgentCardProviderInfo;
2314
+ version: string;
2315
+ capabilities: AgentCardCapabilities;
2316
+ defaultInputModes: string[];
2317
+ defaultOutputModes: string[];
2318
+ skills: AgentCardSkill[];
2319
+ }
2320
+ interface A2AServerLikeWithHandlers extends A2AServerLike {
2321
+ getAgentCard?(agentId: string, context?: A2ARequestContext): AgentCard;
2322
+ handleRequest?(agentId: string, request: JsonRpcRequest, context?: A2ARequestContext): Promise<JsonRpcHandlerResult>;
2323
+ }
2324
+ declare const A2AErrorCode: {
2325
+ readonly PARSE_ERROR: -32700;
2326
+ readonly INVALID_REQUEST: -32600;
2327
+ readonly METHOD_NOT_FOUND: -32601;
2328
+ readonly INVALID_PARAMS: -32602;
2329
+ readonly INTERNAL_ERROR: -32603;
2330
+ readonly TASK_NOT_FOUND: -32001;
2331
+ readonly TASK_NOT_CANCELABLE: -32002;
2332
+ readonly PUSH_NOTIFICATION_UNSUPPORTED: -32003;
2333
+ readonly UNSUPPORTED_OPERATION: -32004;
2334
+ };
2335
+ type A2AErrorCode = (typeof A2AErrorCode)[keyof typeof A2AErrorCode];
2336
+ declare class VoltA2AError extends Error {
2337
+ code: A2AErrorCode;
2338
+ data?: unknown | undefined;
2339
+ taskId?: string | undefined;
2340
+ constructor(code: A2AErrorCode, message: string, data?: unknown | undefined, taskId?: string | undefined);
2341
+ toJsonRpcError(): JsonRpcError;
2342
+ static parseError(details?: unknown): VoltA2AError;
2343
+ static invalidRequest(message?: string, details?: unknown): VoltA2AError;
2344
+ static methodNotFound(method: string): VoltA2AError;
2345
+ static invalidParams(message?: string, details?: unknown): VoltA2AError;
2346
+ static taskNotFound(taskId: string): VoltA2AError;
2347
+ static taskNotCancelable(taskId: string): VoltA2AError;
2348
+ static unsupportedOperation(message?: string): VoltA2AError;
2349
+ static internal(message?: string, details?: unknown): VoltA2AError;
2350
+ }
2351
+ declare function normalizeError(id: A2AJsonRpcId, cause: unknown): JsonRpcResponse<never>;
2352
+ declare function isJsonRpcRequest(value: unknown): value is JsonRpcRequest;
2353
+
2354
+ declare function parseJsonRpcRequest(payload: unknown): JsonRpcRequest;
2355
+ declare function resolveAgentCard(registry: A2AServerRegistry<A2AServerLikeWithHandlers>, serverId: string, agentId: string, context?: A2ARequestContext): AgentCard;
2356
+ declare function executeA2ARequest(params: {
2357
+ registry: A2AServerRegistry<A2AServerLikeWithHandlers>;
2358
+ serverId: string;
2359
+ request: JsonRpcRequest;
2360
+ context?: A2ARequestContext;
2361
+ logger?: Logger;
2362
+ }): Promise<JsonRpcHandlerResult>;
2363
+
2364
+ interface LogResponseData {
2365
+ success: true;
2366
+ data: LogEntry[];
2367
+ total: number;
2368
+ query: LogFilter;
2369
+ }
2370
+ /**
2371
+ * Maps a log handler response to match OpenAPI schema expectations
2372
+ * Extracts nested data properties to root level
2373
+ */
2374
+ declare function mapLogResponse(response: ApiResponse<LogHandlerResponse>): LogResponseData | ErrorResponse;
2375
+ /**
2376
+ * Maps a generic handler response to framework-specific format
2377
+ * Can be extended for other response types as needed
2378
+ */
2379
+ declare function mapHandlerResponse(response: ApiResponse, type?: string): ApiResponse;
2380
+ /**
2381
+ * Extracts HTTP status code from response
2382
+ */
2383
+ declare function getResponseStatus(response: ApiResponse): number;
2384
+
2385
+ export { handleChatStream as $, type ApiResponse as A, type JsonRpcStream as B, type JsonRpcHandlerResult as C, type JsonRpcRequest as D, type ErrorResponse as E, type A2ARequestContext as F, type AgentCardSkill as G, type HttpMethod as H, type AgentCardProviderInfo as I, type JsonRpcError as J, type AgentCardCapabilities as K, LOG_ROUTES as L, type MemoryUserSummary as M, type AgentCard as N, OBSERVABILITY_ROUTES as O, A2AErrorCode as P, normalizeError as Q, type ResponseDefinition as R, type SuccessResponse as S, TOOL_ROUTES as T, UPDATE_ROUTES as U, VoltA2AError as V, WORKFLOW_ROUTES as W, isJsonRpcRequest as X, handleGetAgents as Y, handleGenerateText as Z, handleStreamText as _, type A2AServerLikeWithHandlers as a, handleGenerateObject as a0, handleStreamObject as a1, handleGetAgent as a2, handleGetAgentHistory as a3, handleGetWorkflows as a4, handleGetWorkflow as a5, handleExecuteWorkflow as a6, handleStreamWorkflow as a7, handleSuspendWorkflow as a8, handleCancelWorkflow as a9, handleResumeWorkflow as aa, handleListWorkflowRuns as ab, handleGetWorkflowState as ac, type LogFilterOptions as ad, type LogHandlerResponse as ae, handleGetLogs as af, listMemoryUsersHandler as ag, listMemoryConversationsHandler as ah, getConversationMessagesHandler as ai, getConversationStepsHandler as aj, getWorkingMemoryHandler as ak, mapLogResponse as al, mapHandlerResponse as am, getResponseStatus as an, type OpenApiInfo as ao, type AppSetupConfig as ap, getOrCreateLogger as aq, shouldEnableSwaggerUI as ar, getOpenApiDoc as as, DEFAULT_CORS_OPTIONS as at, type StreamResponse as b, isSuccessResponse as c, type MemoryUserAgentSummary as d, type MemoryConversationSummary as e, type MemoryConversationMessagesResult as f, type MemoryConversationStepsResult as g, type MemoryWorkingMemoryResult as h, isErrorResponse as i, type MemoryListUsersQuery as j, type MemoryListConversationsQuery as k, type MemoryGetMessagesQuery as l, type MemoryGetStepsQuery as m, type RouteDefinition as n, AGENT_ROUTES as o, OBSERVABILITY_MEMORY_ROUTES as p, ALL_ROUTES as q, getAllRoutesArray as r, MCP_ROUTES as s, A2A_ROUTES as t, getRoutesByTag as u, parseJsonRpcRequest as v, resolveAgentCard as w, executeA2ARequest as x, type A2AJsonRpcId as y, type JsonRpcResponse as z };