Skip to main content

Agent workflow graph visualization plugin for LangGraph and other frameworks

Project description

agentworkflow-viz

Agent workflow graph visualization plugin for LangGraph and other frameworks.

Render live graphs of your agent workflows with a built-in web UI, trace logging, and full customization via Python callbacks or raw HTML/CSS/JS injection.

Installation

pip install agentworkflow-viz

For LangGraph support:

pip install "agentworkflow-viz[langgraph]"

Quick Start

import agentworkflow_viz

viz = agentworkflow_viz.VizPlugin()
viz.start()

# Wrap a LangGraph graph
graph = viz.wrap(my_langgraph_graph)

# Or use the manual tracer
tracer = agentworkflow_viz.VizTracer()
with tracer.span("my_step"):
    do_work()

viz.stop()

Then open http://localhost:8100/graph in your browser.

Customization

Full node customization with Python renderers, HTML templates, and CSS/JS injection:

import agentworkflow_viz

class MyRenderer(agentworkflow_viz.NodeRenderer):
    def render(self, node_id, node_data):
        if node_id == "agent":
            return {
                "icon": "\U0001f916",
                "css_class": "custom-agent",
                "width": 160,
                "height": 60,
            }
        return {}

customization = agentworkflow_viz.VizCustomization(
    node_renderer=MyRenderer(),
    custom_css=".custom-agent { fill: rgba(108,155,255,0.15); stroke: #6c9bff; }",
    title="My Agent Graph",
)

viz = agentworkflow_viz.VizPlugin(config=agentworkflow_viz.VizConfig(customization=customization))
viz.start()

See examples/custom_nodes.py for a full working example.

Configuration

Environment variables:

Variable Default Description
AGENT_VIZ_ENABLED true Enable/disable the plugin
AGENT_VIZ_PORT 8100 Server port
AGENT_VIZ_HOST 127.0.0.1 Server host. Set to 0.0.0.0 to expose on all interfaces (e.g. inside Docker)
AGENT_VIZ_MOUNT false Mount mode (no standalone server)

The default host is loopback (127.0.0.1) so the UI — which can execute injected JS — is not exposed to your network unless you opt in with 0.0.0.0.

Building from source

To set up a dev environment, run the examples, or build the wheel/sdist yourself, see BUILDING.md. Quick version:

python -m venv .venv
# activate it (see BUILDING.md), then:
python -m pip install -e ".[langgraph]"   # editable dev install
python -m pip install --upgrade build twine
python -m build                           # -> dist/*.whl and dist/*.tar.gz
python -m twine check dist/*

License

MIT

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

agentworkflow_viz-0.3.2.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

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

agentworkflow_viz-0.3.2-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file agentworkflow_viz-0.3.2.tar.gz.

File metadata

  • Download URL: agentworkflow_viz-0.3.2.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for agentworkflow_viz-0.3.2.tar.gz
Algorithm Hash digest
SHA256 7f02363b8f4766a31777edd0554b14843cdf69cfe1291aa84092b4439bfbe310
MD5 e7901fd3c384b00a08bc1eca8617dd95
BLAKE2b-256 9d8d79a064f5b244f2fd22b22668007f8e7c5dda798551e1d59e9b82823ff948

See more details on using hashes here.

File details

Details for the file agentworkflow_viz-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for agentworkflow_viz-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa65517abcaf302ed878eac1248d7e3ad5d9ed187bcb2e5469a361df5fe3e6cc
MD5 a90e8cee06a5b52c28bbfeceeb2b7352
BLAKE2b-256 2e8b2c72408983d704e90ce2eca0c5876daef0e7486a050c39fee4019c09582d

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