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

# 网页读取

## 功能说明

对应工具标识 `link_reader`。

`link_reader` 接收一组 URL，读取并解析其网页内容，常与搜索工具搭配，让智能体先检索链接再深入阅读。它使用 `MODEL_AGENT_API_KEY` 进行鉴权。

导入路径：`from veadk.tools.builtin_tools.link_reader import link_reader`

## 环境变量与前提

环境变量：

* `MODEL_AGENT_API_KEY`：智能体推理模型的 API Key

## 使用方法

```python title="examples/tools/link_reader/agent.py" lines theme={null}
import asyncio

from veadk import Agent, Runner
from veadk.memory.short_term_memory import ShortTermMemory
from veadk.tools.builtin_tools.link_reader import link_reader

agent = Agent(
    name="link_reader_agent",
    model_name="doubao-seed-1-8-251228",
    description="An agent that reads and summarizes web pages.",
    instruction="Use the link_reader tool to read the given URLs, then summarize them.",
    tools=[link_reader],
)

runner = Runner(agent=agent, short_term_memory=ShortTermMemory())


async def main():
    response = await runner.run(
        "读取 https://www.volcengine.com/docs/85508/1650263 并总结要点"
    )
    print(response)


if __name__ == "__main__":
    asyncio.run(main())
```
