> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenBB

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

```python cookbook/tools/openbb_tools.py theme={null}
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_article`    | `bool` | `True`  | 启用读取文章完整内容的功能。      |
| `include_summary` | `bool` | `False` | 指定是否在完整内容中包含文章摘要。   |
| `article_length`  | `int`  | -       | 要处理或返回的文章或其摘要的最大长度。 |

## Toolkit 函数

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

## 开发者资源

* 查看 [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/openbb.py)
* 查看 [Cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/tools/openbb_tools.py)
