Skip to content

Commit c7bb2df

Browse files
authored
Merge pull request #558 from Yanghuabei-design/workflow/add-a-workflow
feat(workflow): add general_problem_solving_team
2 parents 6fe4fd1 + 4ccb991 commit c7bb2df

File tree

1 file changed

+330
-0
lines changed

1 file changed

+330
-0
lines changed
Lines changed: 330 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,330 @@
1+
graph:
2+
id: general_problem_solving_team
3+
description: 通用问题解决专家小组,包括需求理解与拆解部门、逻辑推理与分析部门、创意与方案生成部门、语言表达部门、技术实现部门、信息搜集部门、审核部门。
4+
log_level: DEBUG
5+
is_majority_voting: false
6+
nodes:
7+
- id: Summary Department
8+
type: agent
9+
config:
10+
name: ${MODEL_NAME}
11+
provider: openai
12+
role: |-
13+
你是一个通用问题解决小组的一员。你的职务是“总结输出负责人”。
14+
你将接收到来自所有上级专家智能体的指令。你将负责整合他们的信息并综合输出。
15+
你是【最终总结专家】,是用户看到的唯一出口:
16+
整合所有部门结果,整理成通顺、完整、友好的回答
17+
结构清晰:重点前置、分点、易懂
18+
不添加新信息,不篡改内容
19+
输出:给用户的最终回答。
20+
base_url: ${BASE_URL}
21+
api_key: ${API_KEY}
22+
params: {}
23+
tooling:
24+
- type: function
25+
config:
26+
tools:
27+
- name: file:All
28+
- name: user:All
29+
- name: video:All
30+
- name: weather:All
31+
- name: web:All
32+
- name: code_executor:All
33+
timeout: null
34+
prefix: ''
35+
thinking: null
36+
memories: []
37+
retry: null
38+
description: ''
39+
context_window: -1
40+
log_output: true
41+
- id: Technician
42+
type: agent
43+
config:
44+
name: ${MODEL_NAME}
45+
provider: openai
46+
role: |-
47+
你是一个通用问题解决小组的一员。你的职务是“技术实现专家。
48+
你将接收到来自上级智能体的指令。寻找指令中关于“技术实现”的部分,只执行这部分指令,并完全忽略其它不属于你的指令。
49+
你是【技术实现专家】,负责所有可落地的技术任务:
50+
写代码、写脚本、写命令
51+
设计步骤、流程、工具调用
52+
保证代码可运行、思路清晰
53+
只输出技术方案 + 可执行内容,不闲聊。
54+
base_url: ${BASE_URL}
55+
api_key: ${API_KEY}
56+
params: {}
57+
tooling:
58+
- type: function
59+
config:
60+
tools:
61+
- name: code_executor:All
62+
- name: file:All
63+
- name: utils:All
64+
- name: uv_related:All
65+
timeout: null
66+
prefix: ''
67+
thinking: null
68+
memories: []
69+
retry: null
70+
description: ''
71+
context_window: -1
72+
log_output: true
73+
- id: Scheme Generater
74+
type: agent
75+
config:
76+
name: ${MODEL_NAME}
77+
provider: openai
78+
role: |
79+
你是一个通用问题解决小组的一员。你的职务是“方案生成专家”。
80+
你将接收到来自上级智能体的指令。寻找指令中关于“方案生成”的部分,只执行这部分指令,并完全忽略其它不属于你的指令。
81+
你是【方案生成专家】:
82+
当问题没有唯一答案时,生成多套可行方案
83+
给出建议、策划、思路、表达优化
84+
兼顾实用性与可读性
85+
输出:清晰、可选择、可直接使用的方案。
86+
base_url: ${BASE_URL}
87+
api_key: ${API_KEY}
88+
params: {}
89+
tooling: []
90+
thinking: null
91+
memories: []
92+
retry: null
93+
description: ''
94+
context_window: -1
95+
log_output: true
96+
- id: Reasoner
97+
type: agent
98+
config:
99+
name: ${MODEL_NAME}
100+
provider: openai
101+
role: |-
102+
你是一个通用问题解决小组的一员。你的职务是“逻辑推理专家”。
103+
你将收到3条指令:
104+
你将接收到来自“Demand Analyzer”指令。寻找指令中关于“逻辑推理”的部分,只执行这部分指令,并完全忽略其它不属于你的指令。
105+
你将收到来自“Information Searcher”的分析。这是一位信息搜取专家。
106+
你将收到来自“Technician”的结果。这是你们团队的技术人员。
107+
你是【逻辑推理与分析专家】:
108+
基于已有信息做推导、对比、判断、计算
109+
找出漏洞、矛盾、不合理之处
110+
给出结论、原因、优先级
111+
不做创意,不写代码,不搜新信息,只做理性分析。
112+
base_url: ${BASE_URL}
113+
api_key: ${API_KEY}
114+
params: {}
115+
tooling: []
116+
thinking:
117+
type: reflection
118+
config:
119+
reflection_prompt: Thinking {type = true}
120+
memories: []
121+
retry: null
122+
description: ''
123+
context_window: -1
124+
log_output: true
125+
- id: Information Searcher
126+
type: agent
127+
config:
128+
name: ${MODEL_NAME}
129+
provider: openai
130+
role: |-
131+
你是一个通用问题解决小组的一员。你的职务是“信息搜集专家”。
132+
你将接收到来自上级智能体的指令。寻找指令中关于“信息搜集”的部分,只执行这部分指令,并完全忽略其它不属于你的指令。
133+
你是【信息搜集专家】,只做事实类信息获取:
134+
搜索最新、权威、准确的资料
135+
只保留与任务相关的关键信息
136+
不编造、不扩展、不推理
137+
输出:结构化要点,来源可靠,简洁客观。
138+
base_url: ${BASE_URL}
139+
api_key: ${API_KEY}
140+
params: {}
141+
tooling:
142+
- type: function
143+
config:
144+
tools:
145+
- name: web:All
146+
- name: weather:All
147+
timeout: null
148+
prefix: ''
149+
thinking: null
150+
memories: []
151+
retry: null
152+
description: ''
153+
context_window: -1
154+
log_output: true
155+
- id: Demand Analyze
156+
type: agent
157+
config:
158+
name: ${MODEL_NAME}
159+
provider: openai
160+
role: |-
161+
你是一个通用问题解决小组的一员。其中:
162+
你是【需求拆解专家】,只做一件事:
163+
把用户模糊、简短的一句话,精准理解真实意图,并拆成可执行的小任务。
164+
输出要求:
165+
用户真正想解决什么问题
166+
必须拆成 ≤5 个明确子任务
167+
标注每个任务交给哪个部门:信息搜集 / 逻辑推理 / 技术实现 / 方案生成 / 总结输出
168+
给每个部门的任务必须符合他们的职能,不同部门之间的任务不可以重叠
169+
如果你认为该问题用不到5个部门,则可以明确指出不需要它们工作
170+
禁止回答问题,只输出拆解结果。
171+
base_url: ${BASE_URL}
172+
api_key: ${API_KEY}
173+
params: {}
174+
tooling:
175+
- type: function
176+
config:
177+
tools:
178+
- name: user:All
179+
timeout: null
180+
prefix: ''
181+
thinking: null
182+
memories: []
183+
retry:
184+
enabled: true
185+
max_attempts: 2
186+
min_wait_seconds: 1
187+
max_wait_seconds: 6
188+
retry_on_status_codes: []
189+
retry_on_exception_types: []
190+
non_retry_exception_types: []
191+
retry_on_error_substrings: []
192+
description: ''
193+
context_window: 0
194+
log_output: true
195+
edges:
196+
- from: Information Searcher
197+
to: Summary Department
198+
trigger: true
199+
condition:
200+
type: function
201+
config:
202+
name: 'true'
203+
carry_data: true
204+
keep_message: false
205+
clear_context: false
206+
clear_kept_context: false
207+
process: null
208+
dynamic: null
209+
- from: Reasoner
210+
to: Summary Department
211+
trigger: true
212+
condition:
213+
type: function
214+
config:
215+
name: 'true'
216+
carry_data: true
217+
keep_message: false
218+
clear_context: false
219+
clear_kept_context: false
220+
process: null
221+
dynamic: null
222+
- from: Technician
223+
to: Summary Department
224+
trigger: true
225+
condition:
226+
type: function
227+
config:
228+
name: 'true'
229+
carry_data: true
230+
keep_message: false
231+
clear_context: false
232+
clear_kept_context: false
233+
process: null
234+
dynamic: null
235+
- from: Scheme Generater
236+
to: Summary Department
237+
trigger: true
238+
condition:
239+
type: function
240+
config:
241+
name: 'true'
242+
carry_data: true
243+
keep_message: false
244+
clear_context: false
245+
clear_kept_context: false
246+
process: null
247+
dynamic: null
248+
- from: Demand Analyze
249+
to: Information Searcher
250+
trigger: true
251+
condition:
252+
type: function
253+
config:
254+
name: 'true'
255+
carry_data: true
256+
keep_message: false
257+
clear_context: false
258+
clear_kept_context: false
259+
process: null
260+
dynamic: null
261+
- from: Demand Analyze
262+
to: Reasoner
263+
trigger: true
264+
condition:
265+
type: function
266+
config:
267+
name: 'true'
268+
carry_data: true
269+
keep_message: false
270+
clear_context: false
271+
clear_kept_context: false
272+
process: null
273+
dynamic: null
274+
- from: Demand Analyze
275+
to: Technician
276+
trigger: true
277+
condition:
278+
type: function
279+
config:
280+
name: 'true'
281+
carry_data: true
282+
keep_message: false
283+
clear_context: false
284+
clear_kept_context: false
285+
process: null
286+
dynamic: null
287+
- from: Demand Analyze
288+
to: Scheme Generater
289+
trigger: true
290+
condition:
291+
type: function
292+
config:
293+
name: 'true'
294+
carry_data: true
295+
keep_message: false
296+
clear_context: false
297+
clear_kept_context: false
298+
process: null
299+
dynamic: null
300+
- from: Information Searcher
301+
to: Reasoner
302+
trigger: true
303+
condition:
304+
type: function
305+
config:
306+
name: 'true'
307+
carry_data: true
308+
keep_message: false
309+
clear_context: false
310+
clear_kept_context: false
311+
process: null
312+
dynamic: null
313+
- from: Technician
314+
to: Reasoner
315+
trigger: true
316+
condition:
317+
type: function
318+
config:
319+
name: 'true'
320+
carry_data: true
321+
keep_message: false
322+
clear_context: false
323+
clear_kept_context: false
324+
process: null
325+
dynamic: null
326+
memory: []
327+
initial_instruction: 请输入您想解决的问题。
328+
start:
329+
- Demand Analyze
330+
end: []

0 commit comments

Comments
 (0)