OpenBBTools 使代理能够提供有关股票和公司的信息。

cookbook/tools/openbb_tools.py
from agno.agent import Agent
from agno.tools.openbb import OpenBBTools


agent = Agent(tools=[OpenBBTools()], debug_mode=True, show_tool_calls=True)

# Example usage showing stock analysis
agent.print_response(
    "Get me the current stock price and key information for Apple (AAPL)"
)

# Example showing market analysis
agent.print_response(
    "What are the top gainers in the market today?"
)

# Example showing economic indicators
agent.print_response(
    "Show me the latest GDP growth rate and inflation numbers for the US"
)

Toolkit 参数

参数类型默认值描述
read_articleboolTrue启用读取文章完整内容的功能。
include_summaryboolFalse指定是否在完整内容中包含文章摘要。
article_lengthint-要处理或返回的文章或其摘要的最大长度。

Toolkit 函数

函数描述
get_stock_price此函数获取股票代码或代码列表的当前股票价格。
search_company_symbol此函数搜索公司的股票代码。
get_price_targets此函数获取股票代码或代码列表的价格目标。
get_company_news此函数获取股票代码或代码列表的最新新闻。
get_company_profile此函数获取股票代码或代码列表的公司简介。

开发者资源