@librechat/agents 3.0.0-rc8 → 3.0.0-rc9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/graphs/MultiAgentGraph.cjs +103 -12
- package/dist/cjs/graphs/MultiAgentGraph.cjs.map +1 -1
- package/dist/esm/graphs/MultiAgentGraph.mjs +103 -12
- package/dist/esm/graphs/MultiAgentGraph.mjs.map +1 -1
- package/dist/types/graphs/MultiAgentGraph.d.ts +11 -1
- package/package.json +3 -1
- package/src/graphs/MultiAgentGraph.ts +120 -13
- package/src/scripts/multi-agent-chain.ts +278 -0
- package/src/scripts/multi-agent-document-review-chain.ts +197 -0
- package/src/scripts/multi-agent-hybrid-flow.ts +310 -0
- package/dist/types/scripts/abort.d.ts +0 -1
- package/dist/types/scripts/ant_web_search.d.ts +0 -1
- package/dist/types/scripts/args.d.ts +0 -7
- package/dist/types/scripts/caching.d.ts +0 -1
- package/dist/types/scripts/cli.d.ts +0 -1
- package/dist/types/scripts/cli2.d.ts +0 -1
- package/dist/types/scripts/cli3.d.ts +0 -1
- package/dist/types/scripts/cli4.d.ts +0 -1
- package/dist/types/scripts/cli5.d.ts +0 -1
- package/dist/types/scripts/code_exec.d.ts +0 -1
- package/dist/types/scripts/code_exec_files.d.ts +0 -1
- package/dist/types/scripts/code_exec_simple.d.ts +0 -1
- package/dist/types/scripts/content.d.ts +0 -1
- package/dist/types/scripts/empty_input.d.ts +0 -1
- package/dist/types/scripts/handoff-test.d.ts +0 -1
- package/dist/types/scripts/image.d.ts +0 -1
- package/dist/types/scripts/memory.d.ts +0 -1
- package/dist/types/scripts/multi-agent-conditional.d.ts +0 -1
- package/dist/types/scripts/multi-agent-parallel.d.ts +0 -1
- package/dist/types/scripts/multi-agent-sequence.d.ts +0 -1
- package/dist/types/scripts/multi-agent-supervisor.d.ts +0 -1
- package/dist/types/scripts/multi-agent-test.d.ts +0 -1
- package/dist/types/scripts/search.d.ts +0 -1
- package/dist/types/scripts/simple.d.ts +0 -1
- package/dist/types/scripts/stream.d.ts +0 -1
- package/dist/types/scripts/test-custom-prompt-key.d.ts +0 -2
- package/dist/types/scripts/test-handoff-input.d.ts +0 -1
- package/dist/types/scripts/test-multi-agent-list-handoff.d.ts +0 -2
- package/dist/types/scripts/test-tools-before-handoff.d.ts +0 -1
- package/dist/types/scripts/thinking.d.ts +0 -1
- package/dist/types/scripts/tools.d.ts +0 -1
- package/dist/types/specs/spec.utils.d.ts +0 -1
- package/src/scripts/multi-agent-example-output.md +0 -110
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Multi-Agent Test Scripts - Example Output
|
|
2
|
-
|
|
3
|
-
## multi-agent-test.ts
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
Testing Multi-Agent Handoff System...
|
|
7
|
-
|
|
8
|
-
Invoking multi-agent graph...
|
|
9
|
-
|
|
10
|
-
====== ON_RUN_STEP ======
|
|
11
|
-
{ name: 'flight_assistant', type: 'agent', ... }
|
|
12
|
-
[flight_assistant] Starting...
|
|
13
|
-
|
|
14
|
-
====== CHAT_MODEL_STREAM ======
|
|
15
|
-
I'll help you book a flight from Boston to New York...
|
|
16
|
-
|
|
17
|
-
====== TOOL_START ======
|
|
18
|
-
{ name: 'transfer_to_hotel_assistant', ... }
|
|
19
|
-
|
|
20
|
-
====== ON_RUN_STEP_COMPLETED ======
|
|
21
|
-
[flight_assistant] Completed
|
|
22
|
-
|
|
23
|
-
====== ON_RUN_STEP ======
|
|
24
|
-
{ name: 'hotel_assistant', type: 'agent', ... }
|
|
25
|
-
[hotel_assistant] Starting...
|
|
26
|
-
|
|
27
|
-
====== CHAT_MODEL_STREAM ======
|
|
28
|
-
Great! I'll help you find a hotel near Times Square...
|
|
29
|
-
|
|
30
|
-
Final content parts:
|
|
31
|
-
[
|
|
32
|
-
{ type: 'text', text: "I'll help you book a flight..." },
|
|
33
|
-
{ type: 'tool_use', name: 'transfer_to_hotel_assistant', ... },
|
|
34
|
-
{ type: 'text', text: "Great! I'll help you find a hotel..." }
|
|
35
|
-
]
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## multi-agent-parallel.ts
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
Testing Parallel Multi-Agent System (Fan-in/Fan-out)...
|
|
42
|
-
|
|
43
|
-
Invoking parallel multi-agent graph...
|
|
44
|
-
|
|
45
|
-
====== ON_RUN_STEP ======
|
|
46
|
-
[researcher] Starting analysis...
|
|
47
|
-
|
|
48
|
-
====== ON_RUN_STEP ======
|
|
49
|
-
[analyst1] Starting analysis...
|
|
50
|
-
[analyst2] Starting analysis...
|
|
51
|
-
[analyst3] Starting analysis...
|
|
52
|
-
|
|
53
|
-
====== CHAT_MODEL_STREAM ======
|
|
54
|
-
[analyst1] From a financial perspective...
|
|
55
|
-
[analyst2] From a technical perspective...
|
|
56
|
-
[analyst3] From a market perspective...
|
|
57
|
-
|
|
58
|
-
====== ON_RUN_STEP_COMPLETED ======
|
|
59
|
-
[analyst1] Completed analysis
|
|
60
|
-
[analyst2] Completed analysis
|
|
61
|
-
[analyst3] Completed analysis
|
|
62
|
-
|
|
63
|
-
====== ON_RUN_STEP ======
|
|
64
|
-
[summarizer] Starting analysis...
|
|
65
|
-
|
|
66
|
-
Final content parts: 5 parts
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## multi-agent-conditional.ts
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
Testing Conditional Multi-Agent System...
|
|
73
|
-
|
|
74
|
-
--- Processing: "How do I implement a binary search tree in Python?" ---
|
|
75
|
-
|
|
76
|
-
====== ON_RUN_STEP ======
|
|
77
|
-
{ name: 'classifier', type: 'agent', ... }
|
|
78
|
-
|
|
79
|
-
====== ON_RUN_STEP ======
|
|
80
|
-
{ name: 'technical_expert', type: 'agent', ... }
|
|
81
|
-
Routing to: technical_expert
|
|
82
|
-
|
|
83
|
-
====== CHAT_MODEL_STREAM ======
|
|
84
|
-
To implement a binary search tree in Python, you'll need to create a Node class...
|
|
85
|
-
|
|
86
|
-
Expert used: technical_expert
|
|
87
|
-
Content parts: 2
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
--- Processing: "What are the key strategies for market expansion?" ---
|
|
91
|
-
|
|
92
|
-
Routing to: business_expert
|
|
93
|
-
...
|
|
94
|
-
|
|
95
|
-
--- Processing: "What is the capital of France?" ---
|
|
96
|
-
|
|
97
|
-
Routing to: general_assistant
|
|
98
|
-
...
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Key Features of Updated Scripts
|
|
102
|
-
|
|
103
|
-
1. **Proper Event Handling**: All GraphEvents are properly handled with custom handlers
|
|
104
|
-
2. **Content Aggregation**: Using `createContentAggregator()` to collect all content parts
|
|
105
|
-
3. **Stream Output**: Real-time token streaming via `ChatModelStreamHandler`
|
|
106
|
-
4. **Debug Logging**: Comprehensive event logging for debugging multi-agent flows
|
|
107
|
-
5. **Conversation History**: Proper tracking of messages across agent interactions
|
|
108
|
-
6. **Return Content**: `returnContent: true` ensures content parts are returned
|
|
109
|
-
|
|
110
|
-
The scripts now follow the same patterns as `simple.ts` and `tools.ts`, providing consistent behavior and comprehensive event handling across all multi-agent scenarios.
|