Notebooks
A
Arize AI
Lab1and2 Base Agent

Lab1and2 Base Agent

agentslabsarize-tutorialsagent-mastery-courseLLMPython

Arize Agent Mastry Course: Trace your First Agent

In this first lab, we will create a simple travel agent powered by the Agno framework and OpenAI models. We’ll begin by installing the necessary OpenInference packages and setting up tracing with Arize.

Next, we’ll define a set of basic tools that provide destination information, estimate trip budgets, and suggest local activities.

Finally, we’ll build and run our agent, viewing the resulting trace outputs in Arize to understand how the agent uses its tools and reasoning.

You will need a free Arize account, an OpenAI API key, and a free Tavily API Key.

Set up keys and dependenies

[ ]
[ ]

Setup tracing

[ ]
[ ]

Define tools

First, we’ll define a few helper functions to support our tools. In particular, we’ll use Tavily Search to help the tools gather general information about each destination.

[ ]

Our agent will have access to three tools, which we’ll continue to enhance in upcoming labs:

  1. Essential Info – Provides key travel details about the destination, such as weather and general conditions.

  2. Budget Basics – Offers insights into travel costs and helps plan budgets based on selected activities.

  3. Local Flavor – Recommends unique local experiences and cultural highlights.

[ ]

Define agent

Next, we’ll construct our agent. The Agno framework makes this process straightforward by allowing us to easily define key parameters such as the model, instructions, and tools.

[ ]

Run agent

Finally, we are ready to run our agent! Run this cell to see an example in action.

[ ]

Observe

Within the Arize platform, you can explore every step your agent takes from LLM calls and tool executions to inputs, outputs, and intermediate reasoning steps.

This detailed trace view allows you to understand how the agent arrived at its final answer, providing transparency into its decision-making process. You can also monitor key metrics such as cost, latency, and metadata to evaluate performance and optimize future runs.

Agent Trace