YAML Workflow Examples
'
Multi-Agent Chain Workflow
version: '1.0'
blocks:
start:
type: starter
name: Start
inputs:
startWorkflow: manual
connections:
success: agent-1-initiator
agent-1-initiator:
type: agent
name: Agent 1 Initiator
inputs:
systemPrompt: You are the first agent in a chain. Your role is to analyze the input and create an initial response that will be passed to the next agent.
userPrompt: |-
Welcome! I'm the first agent in our chain.
Input to process: <start.input>
Please create an initial analysis or greeting that the next agent can build upon. Be creative and set a positive tone for the chain!
model: gpt-4o
temperature: 0.7
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: agent-2-enhancer
agent-2-enhancer:
type: agent
name: Agent 2 Enhancer
inputs:
systemPrompt: You are the second agent in a chain. Take the output from Agent 1 and enhance it with additional insights or improvements.
userPrompt: |-
I'm the second agent! Here's what Agent 1 provided:
<agent1initiator.content>
Now I'll enhance this with additional details, insights, or improvements. Let me build upon their work!
model: gpt-4o
temperature: 0.7
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: agent-3-refiner
agent-3-refiner:
type: agent
name: Agent 3 Refiner
inputs:
systemPrompt: You are the third agent in a chain. Take the enhanced output from Agent 2 and refine it further, adding structure or organization.
userPrompt: |-
I'm the third agent in our chain! Here's the enhanced work from Agent 2:
<agent2enhancer.content>
My job is to refine and organize this content. I'll add structure, clarity, and polish to make it even better!
model: gpt-4o
temperature: 0.6
apiKey: '{{OPENAI_API_KEY}}'
connections:
success: agent-4-finalizer
agent-4-finalizer:
type: agent
name: Agent 4 Finalizer
inputs:
systemPrompt: You are the final agent in a chain of 4. Create a comprehensive summary and conclusion based on all the previous agents' work.
userPrompt: |-
I'm the final agent! Here's the refined work from Agent 3:
<agent3refiner.content>
As the last agent in our chain, I'll create a final, polished summary that brings together all the work from our team of 4 agents. Let me conclude this beautifully!
model: gpt-4o
temperature: 0.5
apiKey: '{{OPENAI_API_KEY}}'Router-Based Conditional Workflow
Web Search with Structured Output
Loop Processing with Collection
Email Classification and Response
Was this helpful?
