Add cool GIF of agent run inspection using Phoenix (#277)

* Add cool GIF of agent run inspection using Phoenix
This commit is contained in:
Aymeric Roucher 2025-01-21 13:43:48 +01:00 committed by GitHub
parent 16f7910df8
commit cfbd527438
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View File

@ -127,8 +127,8 @@ If you use `smolagents` in your publication, please cite it by using the followi
```bibtex ```bibtex
@Misc{smolagents, @Misc{smolagents,
title = {`smolagents`: The easiest way to build efficient agentic systems.}, title = {`smolagents`: a smol library to build great agentic systems.},
author = {Aymeric Roucher and Thomas Wolf and Leandro von Werra and Erik Kaunismäki}, author = {Aymeric Roucher and Albert Villanova del Moral and Thomas Wolf and Leandro von Werra and Erik Kaunismäki},
howpublished = {\url{https://github.com/huggingface/smolagents}}, howpublished = {\url{https://github.com/huggingface/smolagents}},
year = {2025} year = {2025}
} }

View File

@ -34,7 +34,14 @@ We've adopted the [OpenTelemetry](https://opentelemetry.io/) standard for instru
This means that you can just run some instrumentation code, then run your agents normally, and everything gets logged into your platform. This means that you can just run some instrumentation code, then run your agents normally, and everything gets logged into your platform.
Here's how it goes: Here's how it then looks like on the platform:
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/smolagents/inspect_run_phoenix.gif"/>
</div>
### Setting up telemetry with Arize AI Phoenix
First install the required packages. Here we install [Phoenix by Arize AI](https://github.com/Arize-ai/phoenix) because that's a good solution to collect and inspect the logs, but there are other OpenTelemetry-compatible platforms that you could use for this collection & inspection part. First install the required packages. Here we install [Phoenix by Arize AI](https://github.com/Arize-ai/phoenix) because that's a good solution to collect and inspect the logs, but there are other OpenTelemetry-compatible platforms that you could use for this collection & inspection part.
```shell ```shell
@ -97,7 +104,8 @@ manager_agent.run(
"If the US keeps its 2024 growth rate, how many years will it take for the GDP to double?" "If the US keeps its 2024 growth rate, how many years will it take for the GDP to double?"
) )
``` ```
And you can then navigate to `http://0.0.0.0:6006/projects/` to inspect your run! Voilà!
You can then navigate to `http://0.0.0.0:6006/projects/` to inspect your run!
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/smolagents/inspect_run_phoenix.png"> <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/smolagents/inspect_run_phoenix.png">