fix: Update XAI Finance Agent to use new AgentOS and enable debug mode

This commit is contained in:
Shubhamsaboo
2025-11-08 22:11:03 -08:00
parent 15623fd4c6
commit b374ad906a
2 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
agno
agno>=2.2.10
duckduckgo-search
yfinance
fastapi[standard]

View File

@@ -3,7 +3,7 @@ from agno.agent import Agent
from agno.models.xai import xAI
from agno.tools.yfinance import YFinanceTools
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.playground import Playground, serve_playground_app
from agno.os import AgentOS
# create the AI finance agent
agent = Agent(
@@ -11,12 +11,13 @@ agent = Agent(
model = xAI(id="grok-beta"),
tools=[DuckDuckGoTools(), YFinanceTools(stock_price=True, analyst_recommendations=True, stock_fundamentals=True)],
instructions = ["Always use tables to display financial/numerical data. For text data use bullet points and small paragrpahs."],
show_tool_calls = True,
debug_mode = True,
markdown = True,
)
# UI for finance agent
app = Playground(agents=[agent]).get_app()
agent_os = AgentOS(agents=[agent])
app = agent_os.get_app()
if __name__ == "__main__":
serve_playground_app("xai_finance_agent:app", reload=True)
agent_os.serve(app="xai_finance_agent:app", reload=True)