Skip to main content

Plug-and-play agent graph visualization plugin for LangGraph and other frameworks

Project description

agent-viz

Plug-and-play agent 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 agent-viz

For LangGraph support:

pip install "agent-viz[langgraph]"

Quick Start

import agentviz

viz = agentviz.VizPlugin()
viz.start()

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

# Or use the manual tracer
tracer = agentviz.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 agentviz

class MyRenderer(agentviz.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 = agentviz.VizCustomization(
    node_renderer=MyRenderer(),
    custom_css=".custom-agent { fill: rgba(108,155,255,0.15); stroke: #6c9bff; }",
    title="My Agent Graph",
)

viz = agentviz.VizPlugin(config=agentviz.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 0.0.0.0 Server host
AGENT_VIZ_MOUNT false Mount mode (no standalone server)

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.2.0.tar.gz (17.7 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.2.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentworkflow_viz-0.2.0.tar.gz
  • Upload date:
  • Size: 17.7 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.2.0.tar.gz
Algorithm Hash digest
SHA256 74af41db1bdaa1fbb4c9070edeb86dffa29c590a4455b7f21544daad224ee12c
MD5 4ce45e21afd678117e81aa2ed1cea5fa
BLAKE2b-256 1ec81f7caacb7dbe0ce04c8fb4867fa45fb740b38cdce1bd9d42c97872694b7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentworkflow_viz-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e2ef9b6cd9383d0b37553499b264f5b5bf399dce21d0b5dbe9a61cdbfe1c218
MD5 b93237e5e20f87d59bf114c51017bb13
BLAKE2b-256 0efebb68263261bddc69e0874735e2ec305370fc533b929ad89ecf91ee0ffdd1

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