chore: import upstream snapshot with attribution
Validate YAML Workflows / Validate YAML Configuration Files (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:37:51 +08:00
commit d0e4308def
614 changed files with 74458 additions and 0 deletions
+78
View File
@@ -0,0 +1,78 @@
version: 0.4.0
graph:
id: paper_gen
description: Subgraph that gathers multi-style revision suggestions for an article.
is_majority_voting: false
log_level: INFO
start:
- Romanticism Writer
- Realism Writer
- Magical Realism Writer
nodes:
- id: Romanticism Writer
type: agent
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o
role: 'You are a Romanticism writer, advocating intense emotions, loving and deifying nature, pursuing the extraordinary and the ideal, while emphasizing individualism and a spirit of rebellion.
Please provide revision suggestions for the work according to your style.
'
params:
temperature: 0.1
max_tokens: 4000
- id: Realism Writer
type: agent
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o
role: 'You are a Realism writer, seeking to objectively and truly reflect life, focusing on social issues and ordinary people, shaping typical characters in typical environments, with a cool and precise narrative style.
Please provide revision suggestions for the work according to your style.
'
params:
temperature: 0.1
max_tokens: 4000
- id: Magical Realism Writer
type: agent
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o
role: 'You are a Magical Realism writer, seamlessly blending magic and reality, using exaggeration and absurdity as expressive techniques, blurring the boundaries between reality and fantasy.
Please provide revision suggestions for the work according to your style.
'
params:
temperature: 0.1
max_tokens: 4000
- id: Editor
type: agent
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o
role: 'You are an excellent editor, skilled at providing basic article revision suggestions.
You will synthesize suggestions from writers of different styles, balance various plans, and propose practical revision plans to improve the quality of the article.
'
params:
temperature: 0.1
max_tokens: 4000
edges:
- from: Romanticism Writer
to: Editor
- from: Realism Writer
to: Editor
- from: Magical Realism Writer
to: Editor
+115
View File
@@ -0,0 +1,115 @@
version: 0.4.0
vars: {}
graph:
id: react_agent_subgraph
description: ReAct control loop subgraph for tool calls and answer synthesis.
is_majority_voting: false
log_level: INFO
start:
- ReAct Brain
end:
- ReAct Answer Synthesizer
nodes:
- id: ReAct Brain
type: agent
description: ReAct controller, responsible for thinking, deciding whether to call tools, and providing final answers.
context_window: -1
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o
input_mode: messages
role: |
You are a ReAct controller, needing to make decisions between the toolbox (web_search, get_webpage_content, execute_code, get_city_num, get_weather) and the final answer.
- Organize the entire context into a rolling Thought/Observation process, ensuring references to the latest Observation.
- Only when you need to call a tool, output Control: continue, and attach Action and ActionInput (JSON).
- If you are ready to answer the user directly, output Final Answer and set Action=FINAL.
- Always follow this format:
Thought: <your thinking>
Action: <tool_name or FINAL>
ActionInput: <JSON or NONE>
Control: <DONE or CONTINUE>
- When Action=FINAL, write the final response in Final Answer: ....
- Never fabricate an Observation, you must wait for the Tool Executor's Observation.
params:
temperature: 0.2
max_tokens: 1200
- id: Tool Executor
type: agent
description: Receives control instructions and actually calls function tools, returning Observations.
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o
input_mode: messages
role: |
You are the tool executor.
- Parse the Action and ActionInput fields from the previous node.
- Only when Action belongs to {web_search, get_webpage_content, execute_code, get_city_num, get_weather}, call the corresponding function tool; otherwise, reply directly with "Observation: No tool needed".
- After a successful call, return using the following template:
Tool: <called tool>
Observation: <concise summary>
Raw Output:
```
<raw function return>
```
- Do not include trigger in the output to avoid affecting upstream condition judgment.
- Do not provide a final answer.
tooling:
type: function
config:
auto_load: true
tools:
- name: web_search
- name: get_webpage_content
- name: execute_code
- name: get_city_num
- name: get_weather
params:
temperature: 0.1
max_tokens: 1200
- id: ReAct Answer Synthesizer
type: agent
description: Cleans up ReAct formatting and outputs a user-readable final response.
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o
input_mode: messages
role: |
You are responsible for receiving the Final Answer from ReAct Brain and combining it with the most recent Observation (if any) to generate a natural language response.
- Focus on answering the user's question, including sources/action summaries where necessary.
- Remove all template fields (Thought/Action/Control, etc.).
params:
temperature: 0.2
max_tokens: 800
edges:
- from: ReAct Brain
to: Tool Executor
trigger: true
condition:
type: keyword
config:
any: [ ]
none:
- FINAL
regex: [ ]
case_sensitive: true
- from: Tool Executor
to: ReAct Brain
trigger: true
condition: 'true'
- from: ReAct Brain
to: ReAct Answer Synthesizer
trigger: true
condition:
type: keyword
config:
any:
- FINAL
none: [ ]
regex: [ ]
case_sensitive: true
+128
View File
@@ -0,0 +1,128 @@
version: 0.4.0
graph:
id: reflexion_loop
description: Reflexion loop subgraph with actor/evaluator and memory storage.
log_level: INFO
is_majority_voting: false
start:
- Task
end:
- Final Synthesizer
memory:
- name: reflexion_blackboard
type: blackboard
config:
max_items: 500
nodes:
- id: Task
type: passthrough
config: {}
- id: Reflexion Actor
type: agent
description: Actor (πθ) generates a strategy draft based on blackboard experience and short-term context.
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o-mini
input_mode: messages
role: |
You are the Actor. If there are relevant memories, refer to that experience and output the latest action draft; if there are no relevant memories, provide an action draft to the best of your ability.
- Structure:
Thought: ...
Draft: ...
memories:
- name: reflexion_blackboard
retrieve_stage:
- gen
top_k: 5
read: true
write: false
params:
temperature: 0.2
max_tokens: 1200
- id: Reflexion Evaluator
type: agent
description: Evaluator (Me) provides scores and improvement directions for the Actor's draft.
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o-mini
input_mode: messages
role: |
You are the Evaluator. Receive and read the Actor's latest output and task objectives, and evaluate whether they meet the goals.
Append `Verdict: CONTINUE` or `Verdict: STOP` at the end of the output.
When you think the current plan is good enough, you should give `Verdict: STOP`. Other fields can be skipped.
Output:
- Score: <0-1>
- Reason: <Failure reasons or highlights>
- Next Focus: <Key points to focus on in the next round>
- Verdict: CONTINUE|STOP
params:
temperature: 0.1
max_tokens: 800
- id: Self Reflection Writer
type: agent
description: Self-Reflection (Msr) converts Evaluator results into reusable experience.
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o-mini
input_mode: messages
role: |
You are responsible for refining the Evaluator output and Actor Draft into JSON experience:
{
"issues": [..],
"fix_plan": [..],
"memory_cue": "A short reminder"
}
- JSON must not contain extra text.
memories:
- name: reflexion_blackboard
read: false
write: true
params:
temperature: 0.1
max_tokens: 500
- id: Final Synthesizer
type: agent
description: Converge the final answer, absorbing the latest Draft and Evaluator tips.
config:
provider: openai
base_url: ${BASE_URL}
api_key: ${API_KEY}
name: gpt-4o
input_mode: messages
role: |
Please synthesize all inputs and provide a final answer. Be comprehensive. Do not include any extra text other than the final answer.
params:
temperature: 0.1
max_tokens: 1000
edges:
- from: Task
to: Reflexion Actor
keep_message: True
- from: Task
to: Reflexion Evaluator
keep_message: True
trigger: false
- from: Reflexion Actor
to: Reflexion Actor
trigger: false
- from: Reflexion Actor
to: Reflexion Evaluator
- from: Reflexion Evaluator
to: Self Reflection Writer
condition: need_reflection_loop
- from: Self Reflection Writer
to: Reflexion Actor
carry_data: true
- from: Reflexion Actor
to: Final Synthesizer
trigger: false
- from: Reflexion Evaluator
to: Final Synthesizer
condition: should_stop_loop
carry_data: false