Flow Display

Visual workflow tracking for agent executions

The --flow-display flag enables visual workflow tracking, showing the progress of agent executions in real-time.

Quick Start

bash
praisonai agents.yaml --flow-display

!Flow Display Shows Workflow

Usage

Basic Flow Display

bash
praisonai "Multi-step task" --planning --flow-display

Expected Output:

🎬 Flow Display enabled

╭─ Workflow: Multi-step task ──────────────────────────────────────────────────╮
│                                                                              │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐                      │
│  │   Start     │───▶│  Planning   │───▶│  Execute    │                      │
│  │             │    │   ⏳        │    │             │                      │
│  └─────────────┘    └─────────────┘    └─────────────┘                      │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

📋 PLANNING PHASE
Creating implementation plan...

╭─ Workflow: Multi-step task ──────────────────────────────────────────────────╮
│                                                                              │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐                      │
│  │   Start     │───▶│  Planning   │───▶│  Execute    │                      │
│  │     ✅      │    │     ✅      │    │   ⏳        │                      │
│  └─────────────┘    └─────────────┘    └─────────────┘                      │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

🚀 EXECUTION PHASE
Executing plan steps...

[Response output...]

╭─ Workflow: Multi-step task ──────────────────────────────────────────────────╮
│                                                                              │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐                      │
│  │   Start     │───▶│  Planning   │───▶│  Execute    │                      │
│  │     ✅      │    │     ✅      │    │     ✅      │                      │
│  └─────────────┘    └─────────────┘    └─────────────┘                      │
│                                                                              │
│  Duration: 12.5s | Status: ✅ Complete                                      │
╰──────────────────────────────────────────────────────────────────────────────╯

With YAML Agents

bash
praisonai agents.yaml --flow-display

Expected Output:

🎬 Flow Display enabled

╭─ Workflow: Research and Write ───────────────────────────────────────────────╮
│                                                                              │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐    ┌─────────────┐  │
│  │ Researcher  │───▶│   Writer    │───▶│   Editor    │───▶│   Output    │  │
│  │   ⏳        │    │             │    │             │    │             │  │
│  └─────────────┘    └─────────────┘    └─────────────┘    └─────────────┘  │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

━━━ Agent: Researcher ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Research output...]

╭─ Workflow: Research and Write ───────────────────────────────────────────────╮
│                                                                              │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐    ┌─────────────┐  │
│  │ Researcher  │───▶│   Writer    │───▶│   Editor    │───▶│   Output    │  │
│  │     ✅      │    │   ⏳        │    │             │    │             │  │
│  └─────────────┘    └─────────────┘    └─────────────┘    └─────────────┘  │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

━━━ Agent: Writer ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Writing output...]

[Continues through all agents...]

╭─ Workflow: Research and Write ───────────────────────────────────────────────╮
│                                                                              │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐    ┌─────────────┐  │
│  │ Researcher  │───▶│   Writer    │───▶│   Editor    │───▶│   Output    │  │
│  │     ✅      │    │     ✅      │    │     ✅      │    │     ✅      │  │
│  └─────────────┘    └─────────────┘    └─────────────┘    └─────────────┘  │
│                                                                              │
│  Duration: 45.2s | Agents: 3 | Status: ✅ Complete                          │
╰──────────────────────────────────────────────────────────────────────────────╯

With Handoff

bash
praisonai "Research and write" --handoff "researcher,writer,editor" --flow-display

Expected Output:

🎬 Flow Display enabled
🤝 Handoff chain: researcher → writer → editor

╭─ Handoff Flow ───────────────────────────────────────────────────────────────╮
│                                                                              │
│  ┌─────────────┐         ┌─────────────┐         ┌─────────────┐           │
│  │ researcher  │────────▶│   writer    │────────▶│   editor    │           │
│  │   ⏳        │         │             │         │             │           │
│  └─────────────┘         └─────────────┘         └─────────────┘           │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

[Execution with visual updates...]

Combine with Other Features

bash
# Flow display with metrics
praisonai "Complex task" --planning --flow-display --metrics

# Flow display with handoff and guardrail
praisonai "Write code" --handoff "coder,reviewer" --flow-display --guardrail "Best practices"

Visual Elements

Status Icons

IconMeaning
⏳In progress
✅Completed successfully
❌Failed
⏸️Paused/Waiting
🔄Retrying

Flow Indicators

┌─────────────┐    ┌─────────────┐
│   Agent 1   │───▶│   Agent 2   │
│     ✅      │    │   ⏳        │
└─────────────┘    └─────────────┘
  • Boxes represent agents/steps
  • Arrows show flow direction
  • Status icons show current state

Use Cases

Debugging Workflows

bash
# See where a workflow fails
praisonai agents.yaml --flow-display -v

Expected Output (with error):

╭─ Workflow: Data Pipeline ────────────────────────────────────────────────────╮
│                                                                              │
│  ┌─────────────┐    ┌─────────────┐    ┌─────────────┐                      │
│  │   Fetch     │───▶│  Transform  │───▶│    Load     │                      │
│  │     ✅      │    │     ❌      │    │             │                      │
│  └─────────────┘    └─────────────┘    └─────────────┘                      │
│                                                                              │
│  ❌ Error at: Transform                                                      │
│  Message: Invalid data format                                                │
╰──────────────────────────────────────────────────────────────────────────────╯

Monitoring Long Tasks

bash
# Track progress of complex research
praisonai "Comprehensive market analysis" --planning --flow-display

Demo/Presentation

bash
# Visual workflow for demonstrations
praisonai agents.yaml --flow-display

Flow Display Modes

Sequential Flow

┌───────┐    ┌───────┐    ┌───────┐
│ Step1 │───▶│ Step2 │───▶│ Step3 │
└───────┘    └───────┘    └───────┘

Parallel Flow

              ┌───────┐
         ┌───▶│ Task1 │───┐
┌───────┐│    └───────┘   │┌───────┐
│ Start │┤                ├▶│  End  │
└───────┘│    ┌───────┐   │└───────┘
         └───▶│ Task2 │───┘
              └───────┘

Hierarchical Flow

┌─────────────────────────────────┐
│           Manager               │
│              │                  │
│    ┌─────────┼─────────┐       │
│    ▼         ▼         ▼       │
│ ┌─────┐  ┌─────┐  ┌─────┐     │
│ │ W1  │  │ W2  │  │ W3  │     │
│ └─────┘  └─────┘  └─────┘     │
└─────────────────────────────────┘

Best Practices

Terminal Requirements

TerminalSupport
iTerm2✅ Full
Windows Terminal✅ Full
VS Code Terminal✅ Full
macOS Terminal✅ Full
Basic terminals⚠️ Limited

Related