Level 2: Simple Agent with Web Search

In this notebook, we will be building a simple web search agent using Llama Stack.

Focus

Building a web search-enabled agent using Llama Stack’s built-in tools to demonstrate tool integration and usage.

Learning Objective

  • Understand how to equip an agent with Llama Stack’s built-in tools, specifically web search

  • Utilize tools to fulfill user requests

  • Grasp the basic architecture of an agent framework and the concept of tool invocation

Task Example

Users will create an agent that can perform web searches to gather current information and answer questions using retrieved web content.

Expected Agent Behavior

The agent should automatically determine when to use web search, perform searches effectively, and incorporate search results into coherent responses.

Key Concepts Demonstrated

  • Tool integration and invocation within agent frameworks

  • Web search tool configuration and usage

  • Dynamic tool selection based on user queries

  • Information synthesis from external sources

Run Notebook 2

To run this notebook, please select Level2_simple_agent_with_websearch.ipynb from the file browser.

Level 2 - Simple Agent with websearch

To execute the notebook cells, navigate to the top toolbar. Click the fast-forward (⏩) icon to restart the kernel and execute all cells sequentially from top to bottom.

Run Notebook