Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integrations/agno/python/examples/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
readme = "README.md"
requires-python = ">=3.12,<4.0"
dependencies = [
"agno>=1.7.7",
"agno>=2.0.0",
"httpx>=0.27.0",
"openai>=1.99.1",
"yfinance>=0.2.63",
Expand Down
2 changes: 1 addition & 1 deletion integrations/agno/python/examples/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
agno>=1.6.3
agno>=2.0.0
openai>=1.88.0
yfinance>=0.2.63
fastapi>=0.115.13
Expand Down
17 changes: 7 additions & 10 deletions integrations/agno/python/examples/server/api/agentic_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
This example shows how to create an Agno Agent with tools (YFinanceTools) and expose it in an AG-UI compatible way.
"""
from agno.agent.agent import Agent
from agno.app.agui.app import AGUIApp
from agno.os import AgentOS
from agno.os.interfaces.agui import AGUI
from agno.models.openai import OpenAIChat
from agno.tools.yfinance import YFinanceTools
from agno.tools import tool
Expand All @@ -21,20 +22,16 @@ def change_background(background: str) -> str: # pylint: disable=unused-argument
agent = Agent(
model=OpenAIChat(id="gpt-4o"),
tools=[
YFinanceTools(
stock_price=True, analyst_recommendations=True, stock_fundamentals=True
),
YFinanceTools(),
change_background,
],
description="You are an investment analyst that researches stock prices, analyst recommendations, and stock fundamentals.",
instructions="Format your response using markdown and use tables to display data where possible.",
)

agui_app = AGUIApp(
agent=agent,
name="Investment Analyst",
app_id="agentic_chat",
description="An investment analyst that researches stock prices, analyst recommendations, and stock fundamentals.",
agent_os = AgentOS(
agents=[agent],
interfaces=[AGUI(agent=agent)]
)

app = agui_app.get_app()
app = agent_os.get_app()
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"""

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

agui_app = AGUIApp(
agent=agent,
name="Weather Agent",
app_id="backend_tool_rendering",
description="A helpful weather assistant that provides accurate weather information.",
agent_os = AgentOS(
agents=[agent],
interfaces=[AGUI(agent=agent)]
)

app = agui_app.get_app()
app = agent_os.get_app()
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from typing import List

from agno.agent.agent import Agent
from agno.app.agui.app import AGUIApp
from agno.os import AgentOS
from agno.os.interfaces.agui import AGUI
from agno.models.openai import OpenAIChat
from agno.tools import tool

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

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

app = agui_app.get_app()
app = agent_os.get_app()
Loading