Ango Multi-Agent System + Nebius AI¶
This example demonstrates how to create a team of specialized agents that work together. We'll build:
- A web search agent for finding general information
- A finance agent for retrieving financial data
- A coordinator agent that delegates tasks to the specialized agents
This approach allows us to create more powerful systems by combining specialized capabilities.
Install required packages for this notebook¶
- agno: The agent framework we'll be using
- duckduckgo-search: For web search capabilities
- yfinance: For financial data retrieval
In [1]:
!pip install -qU agno duckduckgo-search ddgs openai yfinance python-dotenv ipywidgets
In [2]:
import os
from dotenv import load_dotenv
load_dotenv()
Out[2]:
True
In [3]:
from agno.agent import Agent
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.models.nebius import Nebius
from agno.tools.yfinance import YFinanceTools
# Create a specialized agent for web searches
web_agent = Agent(
name="Web Agent",
role="Search the web for information",
# Using the larger Llama 3.3 (70B) model for better performance
model=Nebius(
id="meta-llama/Llama-3.3-70B-Instruct",
api_key=os.getenv("NEBIUS_API_KEY")
),
tools=[DuckDuckGoTools()],
instructions="Always include sources",
show_tool_calls=True,
markdown=True,
)
# Create a specialized agent for financial data
finance_agent = Agent(
name="Finance Agent",
role="Get financial data",
model=Nebius(
id="meta-llama/Llama-3.3-70B-Instruct",
api_key=os.getenv("NEBIUS_API_KEY")
),
# Financial tools for stock data, analyst recommendations, and company info
tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True)],
instructions="Use tables to display data",
show_tool_calls=True,
markdown=True,
)
# Create a coordinator agent that manages the team
agent_team = Agent(
# Provide the specialized agents as a team
team=[web_agent, finance_agent],
# The coordinator also uses a powerful model
model=Nebius(
id="meta-llama/Llama-3.3-70B-Instruct",
api_key=os.getenv("NEBIUS_API_KEY")
),
# Instructions for the final output
instructions=["Always include sources", "Use tables to display data"],
show_tool_calls=True,
markdown=True,
)
agent_team.print_response("What's the market outlook and financial performance of AI semiconductor companies?", stream=True)
Output()