Metadata-Version: 2.4
Name: agentworkflow-viz
Version: 0.3.0
Summary: Agent workflow graph visualization plugin for LangGraph and other frameworks
Author: agentworkflow-viz contributors
License-Expression: MIT
Project-URL: Repository, https://github.com/OliverDolle/agent-viz
Keywords: langgraph,visualization,agent,graph,tracing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.115.0
Requires-Dist: uvicorn[standard]>=0.34.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: langgraph
Requires-Dist: langgraph>=0.2.0; extra == "langgraph"
Requires-Dist: langchain-core>=0.3.0; extra == "langgraph"
Requires-Dist: langchain-openai>=0.3.0; extra == "langgraph"
Dynamic: license-file

# 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

```bash
pip install agentworkflow-viz
```

For LangGraph support:

```bash
pip install "agentworkflow-viz[langgraph]"
```

## Quick Start

```python
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:

```python
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`.

## License

MIT
