forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent.py
More file actions
25 lines (21 loc) · 888 Bytes
/
Copy pathagent.py
File metadata and controls
25 lines (21 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Example: Agno Agent with Finance tools
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.models.openai import OpenAIChat
from agno.tools.yfinance import YFinanceTools
from .tools.backend import get_weather
from .tools.frontend import add_proverb, set_theme_color
agent = Agent(
model=OpenAIChat(id="gpt-4o"),
tools=[
# Example of backend tools, defined and handled in your agno agent
YFinanceTools(),
get_weather,
# Example of frontend tools, handled in the frontend Next.js app
add_proverb,
set_theme_color,
],
description="You are an demonstrative agent for Agno and CopilotKit's integration.",
instructions="Format your response using markdown and use tables to display data where possible.",
)