> ## 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.

# Flow

> Launch the Langflow visual workflow builder with PraisonAI Agent + AgentTeam components pre-loaded

The `praisonai flow` command launches Langflow with PraisonAI components pre-loaded, and provides YAML ↔ Langflow JSON conversion utilities.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    CLI[🖥️ praisonai flow] --> LF[🌐 Langflow<br/>:7860]
    LF --> UI[👁️ Browser UI]
    LF --> Agent[🤖 Agent]
    LF --> Team[🤝 Agent Team]

    classDef input fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef process fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef service fill:#189AB4,stroke:#7C90A0,color:#fff
    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff

    class CLI input
    class LF process
    class UI service
    class Agent,Team agent
```

## Quick Start

<Steps>
  <Step title="Install">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    pip install "praisonai[flow]"
    ```
  </Step>

  <Step title="Launch">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai flow
    ```
  </Step>

  <Step title="Build visually">
    Open `http://localhost:7860` and drag **Agent** / **Agent Team** components from the PraisonAI sidebar.
  </Step>
</Steps>

***

## How It Works

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant CLI as praisonai flow
    participant Langflow
    participant Components as PraisonAI Components

    User->>CLI: praisonai flow
    CLI->>Langflow: langflow run + LANGFLOW_COMPONENTS_PATH
    Langflow-->>User: Visual UI on :7860
    User->>Components: Configure Agent / Agent Team
    Components-->>User: Workflow result
```

| Phase       | Description                                                 |
| ----------- | ----------------------------------------------------------- |
| **Install** | `pip install "praisonai[flow]"` pulls Langflow and requests |
| **Launch**  | CLI sets `LANGFLOW_COMPONENTS_PATH` to PraisonAI components |
| **Build**   | Drag Agent and Agent Team nodes in the browser              |
| **Export**  | `praisonai flow export <flow_id>` converts back to YAML     |

***

## Subcommands

### `praisonai flow`

Start the visual builder.

| Flag                | Type  | Default     | Description                                                 |
| ------------------- | ----- | ----------- | ----------------------------------------------------------- |
| `--port`, `-p`      | `int` | `7860`      | Port to listen on                                           |
| `--host`, `-H`      | `str` | `127.0.0.1` | Host to bind to (use `0.0.0.0` to expose)                   |
| `--env-file`        | `str` | `None`      | Path to a `.env` file Langflow should load                  |
| `--no-open`         | flag  | `False`     | Don't open the browser on start                             |
| `--log-level`, `-l` | `str` | `error`     | `debug`, `info`, `warning`, `error`, `critical`             |
| `--backend-only`    | flag  | `False`     | Run backend API only (no frontend UI)                       |
| `--components-path` | `str` | `None`      | Extra custom components directory (appended to PraisonAI's) |

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai flow --host 0.0.0.0 --port 8080
```

### `praisonai flow import`

Convert PraisonAI YAML → Langflow JSON and upload.

| Flag             | Type  | Default                 | Description                             |
| ---------------- | ----- | ----------------------- | --------------------------------------- |
| `yaml_path`      | `str` | —                       | Path to YAML workflow file (positional) |
| `--url`          | `str` | `http://localhost:7860` | Langflow server URL                     |
| `--dry-run`      | flag  | `False`                 | Preview JSON without uploading          |
| `--open`         | flag  | `False`                 | Open the imported flow in the browser   |
| `--output`, `-o` | `str` | `None`                  | Save JSON to file instead of uploading  |

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai flow import my_workflow.yaml --open
```

### `praisonai flow export`

Download a Langflow flow and convert back to YAML or JSON.

| Flag             | Type  | Default                 | Description                     |
| ---------------- | ----- | ----------------------- | ------------------------------- |
| `flow_id`        | `str` | —                       | Flow ID to export (positional)  |
| `--output`, `-o` | `str` | `<flow_name>.<ext>`     | Output file path                |
| `--url`          | `str` | `http://localhost:7860` | Langflow server URL             |
| `--format`       | `str` | `yaml`                  | Output format: `yaml` or `json` |

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai flow export abc-123-def -o my_workflow.yaml
```

### `praisonai flow list`

List flows on a running Langflow server.

| Flag             | Type  | Default                 | Description                         |
| ---------------- | ----- | ----------------------- | ----------------------------------- |
| `--url`          | `str` | `http://localhost:7860` | Langflow server URL                 |
| `--search`, `-s` | `str` | `None`                  | Search flows by name or description |

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai flow list --search research
```

### `praisonai flow version`

Show installed Langflow version.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai flow version
```

***

## Common Patterns

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# YAML → visual editor round-trip
praisonai flow                                   # 1. start the builder
praisonai flow import my_workflow.yaml --open    # 2. push YAML in
# (edit in browser, copy the flow ID from the URL)
praisonai flow export <flow_id> -o my_workflow.yaml   # 3. pull edits back to YAML

# Preview the converted JSON without uploading
praisonai flow import my_workflow.yaml --dry-run

# Run on a custom port / expose to LAN
praisonai flow --host 0.0.0.0 --port 8080

# Headless / API-only deploy
praisonai flow --backend-only --no-open
```

***

## Best Practices

<AccordionGroup>
  <Accordion title="Keep YAML as source of truth">
    Always export back to YAML for version control after visual edits.
  </Accordion>

  <Accordion title="Use --dry-run before uploading">
    Preview JSON conversion with `praisonai flow import workflow.yaml --dry-run` before pushing to a running server.
  </Accordion>

  <Accordion title="Add custom components with --components-path">
    Extend the sidebar with your own Langflow components via `--components-path /path/to/components`.
  </Accordion>

  <Accordion title="Run --backend-only for headless deployments">
    Skip the UI in CI or Docker with `praisonai flow --backend-only --no-open`.
  </Accordion>
</AccordionGroup>

***

## Related

<CardGroup cols={2}>
  <Card title="Visual Workflow Builder" icon="sitemap" href="/docs/ui/flow">
    UI guide for Agent and Agent Team nodes
  </Card>

  <Card title="Langflow Integration" icon="diagram-project" href="/docs/integrations/langflow">
    Component reference and model formats
  </Card>

  <Card title="Dashboard" icon="layout-dashboard" href="/docs/cli/dashboard">
    Unified dashboard — launches Flow + Claw + UI together
  </Card>

  <Card title="Installation Extras" icon="puzzle-piece" href="/docs/features/installation-extras">
    `[flow]` extra reference
  </Card>
</CardGroup>
