Skip to content

Commit 10e842e

Browse files
coldfire-xmaxkorp
andauthored
bump agno version to >=v2.0.0 (#579)
Co-authored-by: Max Korp <[email protected]>
1 parent d2d6642 commit 10e842e

File tree

6 files changed

+544
-463
lines changed

6 files changed

+544
-463
lines changed

integrations/agno/python/examples/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT"
99
readme = "README.md"
1010
requires-python = ">=3.12,<4.0"
1111
dependencies = [
12-
"agno>=1.7.7",
12+
"agno>=2.0.0",
1313
"httpx>=0.27.0",
1414
"openai>=1.99.1",
1515
"yfinance>=0.2.63",

integrations/agno/python/examples/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
agno>=1.6.3
1+
agno>=2.0.0
22
openai>=1.88.0
33
yfinance>=0.2.63
44
fastapi>=0.115.13

integrations/agno/python/examples/server/api/agentic_chat.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
This example shows how to create an Agno Agent with tools (YFinanceTools) and expose it in an AG-UI compatible way.
44
"""
55
from agno.agent.agent import Agent
6-
from agno.app.agui.app import AGUIApp
6+
from agno.os import AgentOS
7+
from agno.os.interfaces.agui import AGUI
78
from agno.models.openai import OpenAIChat
89
from agno.tools.yfinance import YFinanceTools
910
from agno.tools import tool
@@ -21,20 +22,16 @@ def change_background(background: str) -> str: # pylint: disable=unused-argument
2122
agent = Agent(
2223
model=OpenAIChat(id="gpt-4o"),
2324
tools=[
24-
YFinanceTools(
25-
stock_price=True, analyst_recommendations=True, stock_fundamentals=True
26-
),
25+
YFinanceTools(),
2726
change_background,
2827
],
2928
description="You are an investment analyst that researches stock prices, analyst recommendations, and stock fundamentals.",
3029
instructions="Format your response using markdown and use tables to display data where possible.",
3130
)
3231

33-
agui_app = AGUIApp(
34-
agent=agent,
35-
name="Investment Analyst",
36-
app_id="agentic_chat",
37-
description="An investment analyst that researches stock prices, analyst recommendations, and stock fundamentals.",
32+
agent_os = AgentOS(
33+
agents=[agent],
34+
interfaces=[AGUI(agent=agent)]
3835
)
3936

40-
app = agui_app.get_app()
37+
app = agent_os.get_app()

integrations/agno/python/examples/server/api/backend_tool_rendering.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"""
55

66
from agno.agent.agent import Agent
7-
from agno.app.agui.app import AGUIApp
7+
from agno.os import AgentOS
8+
from agno.os.interfaces.agui import AGUI
89
from agno.models.openai import OpenAIChat
910
from agno.tools.yfinance import YFinanceTools
1011
from agno.tools import tool
@@ -115,7 +116,7 @@ async def get_weather(location: str) -> str:
115116
instructions="""
116117
Your primary function is to help users get weather details for specific locations. When responding:
117118
- Always ask for a location if none is provided
118-
- If the location name isnt in English, please translate it
119+
- If the location name isn't in English, please translate it
119120
- If giving a location with multiple parts (e.g. "New York, NY"), use the most relevant part (e.g. "New York")
120121
- Include relevant details like humidity, wind conditions, and precipitation
121122
- Keep responses concise but informative
@@ -124,11 +125,9 @@ async def get_weather(location: str) -> str:
124125
""",
125126
)
126127

127-
agui_app = AGUIApp(
128-
agent=agent,
129-
name="Weather Agent",
130-
app_id="backend_tool_rendering",
131-
description="A helpful weather assistant that provides accurate weather information.",
128+
agent_os = AgentOS(
129+
agents=[agent],
130+
interfaces=[AGUI(agent=agent)]
132131
)
133132

134-
app = agui_app.get_app()
133+
app = agent_os.get_app()

integrations/agno/python/examples/server/api/tool_based_generative_ui.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from typing import List
77

88
from agno.agent.agent import Agent
9-
from agno.app.agui.app import AGUIApp
9+
from agno.os import AgentOS
10+
from agno.os.interfaces.agui import AGUI
1011
from agno.models.openai import OpenAIChat
1112
from agno.tools import tool
1213

@@ -47,11 +48,9 @@ def generate_haiku(english: List[str], japanese: List[str], image_names: List[st
4748
debug_mode=True,
4849
)
4950

50-
agui_app = AGUIApp(
51-
agent=agent,
52-
name="Tool-based Generative UI Agent",
53-
app_id="tool_based_generative_ui",
54-
description="A tool-based generative UI agent with haiku generation and background changing capabilities.",
51+
agent_os = AgentOS(
52+
agents=[agent],
53+
interfaces=[AGUI(agent=agent)]
5554
)
5655

57-
app = agui_app.get_app()
56+
app = agent_os.get_app()

0 commit comments

Comments
 (0)