Skip to main content

Configurable static and interactive visualizations for CrewAI Flows

Project description

crewai-flowviz

Configurable static and interactive diagrams for CrewAI Flows.

It extracts a CrewAI Flow into a stable graph model, then renders SVG/PNG/JSON/DOT from that model. It also includes a local studio for trying themes, orientation, spacing, and dimensions without changing code.

Installation

For now, use Python 3.10-3.13. CrewAI's dependency stack currently fails under Python 3.14 in local uv --with crewai runs.

For a CrewAI project, install it as a dev dependency:

uv add --dev crewai-flowviz

Then run it inside that project environment:

uv run crewai-flowviz studio package.module:MyFlow
uv run crewai-flowviz render package.module:MyFlow --out artifacts/flow.svg
uv run crewai-flowviz render package.module:MyFlow --out artifacts/flow.png --transparent

For a one-off run without adding it to the project:

uvx --from crewai-flowviz --with-editable . crewai-flowviz studio package.module:MyFlow

For an unpackaged src/ layout:

uvx --from crewai-flowviz --with crewai crewai-flowviz render \
  package.module:MyFlow \
  --pythonpath src \
  --out artifacts/flow.svg

Local Development

Run the included example:

PYTHONPATH=src:examples uv run --with crewai python -m crewai_flowviz.cli studio \
  branching_flow:BranchingSupportFlow

CLI

crewai-flowviz render package.module:MyFlow --out flow.svg
crewai-flowviz render package.module:MyFlow --out flow.png --width 1800 --theme slate
crewai-flowviz render package.module:MyFlow --out flow.png --transparent
crewai-flowviz render package.module:MyFlow --out flow.svg --direction horizontal --height 900
crewai-flowviz studio package.module:MyFlow

PNG export is available from both the CLI and the studio. Use --transparent or turn off "Export background color" in the studio to leave the SVG/PNG background transparent.

Configuration

JSON and TOML config files can contain [render] values and [theme] overrides. CLI flags override config file values.

[render]
theme = "mint"
direction = "vertical"
width = 1600
node_width = 300
rank_gap = 140
node_gap = 70
title = "Support Flow"
show_source_refs = true
export_background = false

[theme]
edge_back = "#e11d48"

Built-in themes: crew, slate, mono, mint.

Design Notes

  • Uses CrewAI's build_flow_structure() when available.
  • Falls back to private Flow metadata for older CrewAI versions.
  • Treats retry router paths as back edges, so forward execution remains readable.
  • Does not require Graphviz.
  • Static SVG is the canonical vector renderer. PNG is rendered natively with Pillow.

Publishing

The package name is crewai-flowviz.

rm -rf dist
uv build
uv publish

PyPI versions are immutable, so bump version in pyproject.toml before each release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_flowviz-0.1.0.tar.gz (212.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_flowviz-0.1.0-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file crewai_flowviz-0.1.0.tar.gz.

File metadata

  • Download URL: crewai_flowviz-0.1.0.tar.gz
  • Upload date:
  • Size: 212.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for crewai_flowviz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f71b1d3a497eeb6969fd38aa119a5f1555ff71b77a95309a0ebcb2ec65852f77
MD5 9f6f8b4d057a6af6d62d55f6385fa485
BLAKE2b-256 e10eb5c1c342c97d388b9166b7addf385e0d372db66bc7bd053d07ac25e81294

See more details on using hashes here.

File details

Details for the file crewai_flowviz-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_flowviz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 850e83ccd3d58594953f4357bf2501522e41a8091d7eb90c0cf7a385fee909dc
MD5 fe0721634184a60431d7dfd63120b268
BLAKE2b-256 e27e207f5e29bc1e3ee0bf7ac0708d7f62768d3b369019cc84d87f3116e2301e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page