> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# FlowDisplay Module

> Visual display of agent workflows with agents centered and tools on sides

# FlowDisplay Module

The `FlowDisplay` class provides visual display of agent workflows, showing agents in the center with their tools on the sides.

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import FlowDisplay
```

## Quick Example

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, FlowDisplay

# Create flow display
flow = FlowDisplay()

# Start tracking
flow.start()

# Run your agents
agent = Agent(name="Researcher", tools=[web_search])
agent.start("Research AI trends")

# Stop and display the flow
flow.stop()
```

## Constructor

### `FlowDisplay()`

Creates a new FlowDisplay instance.

No parameters required.

## Methods

### `start()`

Start tracking the workflow. Registers callbacks to capture agent interactions and tool calls.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flow = FlowDisplay()
flow.start()
```

### `stop()`

Stop tracking and display the flow chart.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flow.stop()
```

### `display()`

Manually display the current flow chart without stopping tracking.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flow.display()
```

## Attributes

| Attribute     | Type   | Description                           |
| ------------- | ------ | ------------------------------------- |
| `agents`      | `list` | List of agents in execution order     |
| `agent_tools` | `dict` | Mapping of agent names to their tools |
| `tracking`    | `bool` | Whether tracking is active            |

## Visual Output

The flow display shows:

```
┌─────────────────────────────────────────────────────────┐
│                    Agent Workflow                        │
├─────────────────────────────────────────────────────────┤
│                                                          │
│  [web_search]  ──►  Researcher  ──►  [file_write]       │
│                          │                               │
│                          ▼                               │
│  [calculator]  ──►    Analyst    ──►  [chart_gen]       │
│                          │                               │
│                          ▼                               │
│                       Writer                             │
│                                                          │
└─────────────────────────────────────────────────────────┘
```

## Example with Multiple Agents

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, AgentTeam, FlowDisplay

# Create agents
researcher = Agent(
    name="Researcher",
    tools=[web_search, wikipedia]
)
analyst = Agent(
    name="Analyst",
    tools=[calculator, data_analysis]
)
writer = Agent(
    name="Writer",
    tools=[file_write]
)

# Create flow display
flow = FlowDisplay()
flow.start()

# Run workflow
agents = AgentTeam(
    agents=[researcher, analyst, writer],
    tasks=[research_task, analysis_task, writing_task]
)
agents.start()

# Display the flow
flow.stop()
```

## Thread Safety

The `FlowDisplay` class is thread-safe and uses locks to protect shared state when multiple agents run concurrently.

## Related

* [Agent Module](/docs/sdk/praisonaiagents/agent/agent) - Agent class
* [Agents Module](/docs/sdk/praisonaiagents/agents/agents) - Multi-agent orchestration
* [Display Module](/docs/sdk/praisonaiagents/display) - Display utilities
