Skip to content

Commit 6be9b2a

Browse files
authored
Update visualization.md
1 parent 698fd69 commit 6be9b2a

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

docs/visualization.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Agent visualization allows you to generate a structured graphical representation
44

55
## Installation
66

7-
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:
7+
Install the optional `viz` dependency group:
88

99
```bash
10-
pip install openai-agents[viz]
10+
pip install "openai-agents[viz]"
1111
```
1212

1313
## Generating a Graph
@@ -83,24 +83,4 @@ draw_graph(triage_agent, filename="agent_graph.png")
8383

8484
This will generate `agent_graph.png` in the working directory.
8585

86-
## Testing the Visualization
87-
88-
The visualization functionality includes test coverage to ensure correctness. Tests are located in `tests/test_visualizations.py` and verify:
89-
90-
- Node and edge correctness in `get_main_graph()`.
91-
- Proper agent and tool representation in `get_all_nodes()`.
92-
- Accurate relationship mapping in `get_all_edges()`.
93-
- Graph rendering functionality in `draw_graph()`.
94-
95-
Run tests using:
96-
97-
```bash
98-
pytest tests/test_visualizations.py
99-
```
100-
101-
## Conclusion
102-
103-
Agent visualization provides a powerful way to **understand, debug, and communicate** how agents interact within an application. By leveraging **Graphviz**, you can generate intuitive visual representations of complex agent structures effortlessly.
104-
105-
For further details on agent functionality, see the [Agents documentation](agents.md).
10686

0 commit comments

Comments
 (0)