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
max_rank_nodes_per_row = 3
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.2.tar.gz (216.9 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.2-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for crewai_flowviz-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6a1b7d9fd79e570e1b17cbd4c31290924739b42ef8c2d7bbe5e3600131224568
MD5 4c4f7ff63ec6bd0ea960244dc440bf9d
BLAKE2b-256 e2a9602b0895ea10b627a27aaa2278273bf711d5849e05373552a99c125ae969

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crewai_flowviz-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a1b33ed1a9241100ce521007dc22332fbf4f7f07764ad30e63f316120210a763
MD5 e93653f2615021176608331371980d65
BLAKE2b-256 dc2dfc74858f920766456520f471c1482217f86b4de5e67d6c92da52a4c673cd

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