Skip to content

Commit a58ca39

Browse files
committed
add agno example
1 parent e31a3f7 commit a58ca39

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
__pycache__
2+
3+
# LangGraph API
4+
.langgraph_api
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Extracted from with-agno
2+
3+
To install deps
4+
pip install -r requirements.txt
5+
6+
to run
7+
python agent.py
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"""Example: Agno Agent with Finance tools
2+
3+
This example shows how to create an Agno Agent with tools (YFinanceTools) and expose it in an AG-UI compatible way.
4+
"""
5+
6+
from agno.agent.agent import Agent
7+
from agno.app.agui.app import AGUIApp
8+
from agno.models.openai import OpenAIChat
9+
from agno.tools.yfinance import YFinanceTools
10+
11+
agent = Agent(
12+
model=OpenAIChat(id="gpt-4o"),
13+
tools=[
14+
YFinanceTools(
15+
stock_price=True, analyst_recommendations=True, stock_fundamentals=True
16+
)
17+
],
18+
description="You are an investment analyst that researches stock prices, analyst recommendations, and stock fundamentals.",
19+
instructions="Format your response using markdown and use tables to display data where possible.",
20+
)
21+
22+
agui_app = AGUIApp(
23+
agent=agent,
24+
name="Investment Analyst",
25+
app_id="investment_analyst",
26+
description="An investment analyst that researches stock prices, analyst recommendations, and stock fundamentals.",
27+
)
28+
29+
app = agui_app.get_app()
30+
31+
if __name__ == "__main__":
32+
agui_app.serve(app="agent:app", host="0.0.0.0", port=9001, reload=True)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
agno>=1.6.3
2+
openai>=1.88.0
3+
yfinance>=0.2.63
4+
fastapi>=0.115.13
5+
uvicorn>=0.34.3
6+
ag-ui-protocol>=0.1.5

0 commit comments

Comments
 (0)