
Hugging Face Blog
· 1 min read
Trace & Evaluate your Agent with Arize Phoenix
So, you’ve built your agent. It takes in inputs and tools, processes them, and generates responses. Maybe it’s making decisions, retrieving information, executing tasks autonomously, or all three. But now comes the big question – how effectively is it performing? And more importantly, how do you know?
Building an agent is one thing; understanding its behavior is another. That’s where tracing and evaluations come in. Tracing allows you to see exactly what your agent is doing step by step—what inputs it receives, how it processes information, and how it arrives at its final output. Think of it like having an X-ray for your agent’s decision-making process. Meanwhile, evaluation helps you measure performance, ensuring your agent isn’t just functional, but actually effective. Is it producing the right answers? How relevant are its findings at each step? How well-crafted is the agent’s response? Does it align with your goals?
Arize Phoenix provides a centralized platform to trace, evaluate, and debug your agent's decisions in real time—all in one place. We’ll dive into how you can implement them to refine and optimize your agent. Because building is just the beginning—true intelligence comes from knowing exactly what’s happening under the hood.
For this, let’s make sure that we have an Agent setup! You can follow along with the following steps or use your own agent.
Make An Agent
Step 1: Install the Required Libraries
pip install -q smolagents
Step 2: Import all the Essential Building Blocks
Now let’s bring in the classes and tools we’ll be using:
from smolagents import (
CodeAgent,
DuckDuckGoSearchTool,
VisitWebpageTool,
HfApiModel,
)
Step 3: Set Up Our Base Models
We’ll create a model instance powered by the Hugging Face Hub Serverless API:
hf_model = HfApiModel()
Step 4: Create the Tool-Calling Agent
agent = CodeAgent(
tools=[DuckDuckGoSearchTool(), VisitWebpageTool()],
model=hf_model,
add_base_tools=True
)
Step 5: Run the Agent
Your agent will now:
Original source
This story was published by Hugging Face Blog. SyncAI.news shows a preview; the complete article is on the publisher's site.
Read the full story on huggingface.co


