Skip to main content

Workflows Overview

Workflows provide a powerful node-based execution system for orchestrating complex agent operations with parallel processing, conditional logic, and built-in agent discovery.

Core Concepts

Egregore’s workflow system is built on these fundamental concepts:

Nodes

Nodes are the building blocks of workflows - callable units that transform data:

Sequences

Sequences chain nodes together into execution graphs:

Parallel Execution

Parallel nodes execute multiple operations concurrently:

Agent Discovery

Native agent discovery lets workflows access and manage agents automatically:

Key Features

Node Decorators

@node, @decision, @parallel decorators for quick workflow creation

Parallel Processing

Execute multiple nodes concurrently with dictionary-based result collection

Conditional Logic

Dynamic routing with @decision nodes based on runtime conditions

Native Agent Discovery

Built-in agent tracking and management within workflows

Shared State

Cross-node state management with SharedState and workflow_state

Type Safety

Optional type checking with WorkflowTypeChecker for development

Validation System

Pre-execution validation with cycle detection and dependency checking

Reporting & Metrics

Built-in performance tracking and execution metrics

Quick Start

Basic Workflow

Parallel Workflow

Workflow with Agents

Workflow Components

1. Node Types

2. Execution Control

3. Agent Discovery

4. Validation & Type Checking

5. Reporting

Common Patterns

ETL Pipeline

Parallel Data Gathering

Conditional Branching

Agent Coordination

Performance Considerations

  • Parallel execution: Multiple nodes run concurrently in separate threads
  • Resource optimization: Parallel nodes share resources efficiently
  • Terminal node collection: Results gathered from all terminal nodes
  • Agent discovery overhead: Less than 1ms per node
  • Type checking: Disabled by default for production (enable for development)

Error Handling

Workflows provide comprehensive error handling:

What’s Next?

Creating Nodes

Learn to create workflow nodes

Parallel Execution

Execute nodes concurrently

Agent Discovery

Access and manage agents in workflows

Shared State

Share state across nodes

Validation

Validate workflows before execution

Type Safety

Type checking for workflows

Reporting

Track workflow performance

Best Practices

Workflow design patterns