feat: add documentation for agent visualization using Graphviz

This commit is contained in:
Martín Bravo 2025-03-18 09:55:23 +01:00
parent 6f2f7293a0
commit c745fe156a

View file

@ -7,7 +7,7 @@ Agent visualization allows you to generate a structured graphical representation
The visualization functionality relies on the **Graphviz** package. To use it, ensure you have Graphviz installed and add it as a dependency in `pyproject.toml`. Alternatively, install it directly via pip:
```bash
pip install graphviz
pip install openai-agents[visualization]
```
## Generating a Graph
@ -22,7 +22,7 @@ You can generate an agent visualization using the `draw_graph` function. This fu
```python
from agents import Agent, function_tool
from agents.visualizations import draw_graph
from agents.extensions.visualization import draw_graph
@function_tool
def get_weather(city: str) -> str: