Flows
Flows are the core orchestration mechanism in MindedJS that define how your AI agent processes conversations through a series of connected nodes. A flow represents a complete run of an AI agent that handles user interactions from trigger to completion.
What are Flows?
Flows define the conversation logic and decision-making pathways for your AI agent. Each flow consists of:
Nodes - Processing units that handle specific tasks
Edges - Routing logic that connects nodes
Memory - Shared state that persists throughout the flow
Configuration - Settings that control flow behavior
name: Customer Support Flow
nodes:
- type: trigger
triggerType: manual
name: Customer Request
- type: promptNode
name: Support Agent
prompt: |
You are a helpful customer support agent.
Assist the customer with their inquiry.
llmConfig:
name: ChatOpenAI
properties:
model: gpt-4o
edges:
- source: Customer Request
target: Support Agent
type: stepForward
Flow Components Overview
Basic Flow Structure
Every flow follows this YAML structure:
name: Flow Name # Required: Human-readable flow identifier
nodes: # Required: Array of processing nodes
- type: trigger # Node type
name: Node Name # Unique node identifier
# ... node-specific config
edges: # Required: Array of routing connections
- source: Source Node # Source node name
target: Target Node # Target node name
type: stepForward # Edge type
# ... edge-specific config
Nodes in Flows
Flows orchestrate different types of nodes to handle various aspects of conversation processing. For detailed information about each node type, see the Nodes documentation.
Edges in Flows
Edges define how your flow moves between nodes based on different conditions. For comprehensive information about edge types and routing logic, see the Edges documentation.
Memory in Flows
Memory provides shared state that persists throughout flow execution, allowing nodes to access and modify data from previous steps.
Last updated