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

# Olostep + Composio

> 通过 Olostep 工具包为使用 Composio 构建的代理提供实时网页搜索、抓取、爬取、批处理和答案。

[Composio 上的 Olostep 工具包](https://composio.dev/toolkits/olostep)为你的代理提供 16 个 Olostep 工具，可以通过托管的 MCP 服务器或直接在你的代理代码中使用。[Olostep](https://www.olostep.com) 是用于 AI 代理和企业 AI 工作流的网页数据基础设施。其 API 提供实时网页搜索、抓取和爬取功能，以从网页中提取、清理和结构化数据。

[在 Composio 上查看 →](https://composio.dev/toolkits/olostep)

## 开始之前

* **拥有 Olostep 账户和 API 密钥：** [免费获取](https://www.olostep.com/dashboard/api-keys)，无需信用卡。你的前 500 个积分已包含在内。
* **拥有 Composio 账户和 API 密钥：** 在 [composio.dev](https://composio.dev) 注册。

当你连接工具包时，Composio 会要求提供你的 Olostep API 密钥，并将其加密存储。

## 通过 MCP 使用工具

Composio 为你的每个用户创建一个带有 Olostep 工具包的 MCP 服务器。此示例将其连接到 Vercel AI SDK：

```bash theme={null}
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

```ts theme={null}
import { Composio } from "@composio/core";
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["olostep"],
  mcp: true,
});

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Crawl competitor website for pricing changes",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## 直接使用工具

你也可以在没有 MCP 的情况下将工具传递给你的模型提供者。此示例使用 OpenAI Responses API：

```bash theme={null}
npm install @composio/core @composio/openai openai
```

```ts theme={null}
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["olostep"] });
const tools = await session.tools();

let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Crawl competitor website for pricing changes" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

查看 [Composio 的文档](https://docs.composio.dev) 以获取其他框架和 Python 的信息。

## 工具

| 工具 | 功能 |
| - | - |
| `OLOSTEP_SEARCH_WEB` | 搜索网页并返回链接 |
| `OLOSTEP_SCRAPE_PAGE` | 抓取一个页面并返回其内容、链接和元数据 |
| `OLOSTEP_ANSWER_QUESTION` | 在网上研究一个问题并返回带有来源的答案 |
| `OLOSTEP_MAP_WEBSITE` | 列出网站的 URL，可按相关性排序 |
| `OLOSTEP_START_BATCH` | 启动多个 URL 的批量抓取并返回批次 ID |
| `OLOSTEP_LIST_BATCH_ITEMS` | 获取批次结果的一页 |
| `OLOSTEP_START_CRAWL` | 启动网站爬取并返回爬取 ID |
| `OLOSTEP_LIST_CRAWL_PAGES` | 获取爬取处理过的 URL 的一页 |
| `OLOSTEP_RETRIEVE_CONTENT` | 通过检索 ID 获取抓取页面的内容 |
| `OLOSTEP_GET_OPERATION_RESULT` | 通过 ID 获取存储的抓取、搜索、映射、答案、爬取或批次 |
| `OLOSTEP_CREATE_MONITOR` | 按计划监控页面或网络查询，可选警报和 webhook |
| `OLOSTEP_LIST_MONITORS` | 列出你的监控及其设置 |
| `OLOSTEP_LIST_MONITOR_EVENTS` | 获取监控的快照和更改摘要 |
| `OLOSTEP_UPDATE_MONITOR` | 更改监控的计划、通知或 webhook |
| `OLOSTEP_SET_MONITOR_STATE` | 暂停或恢复监控 |
| `OLOSTEP_GET_CREDIT_BALANCE` | 检查剩余积分和计划 |

批次和爬取在后台运行。启动后，使用 `OLOSTEP_LIST_BATCH_ITEMS` 或 `OLOSTEP_LIST_CRAWL_PAGES` 和 `OLOSTEP_RETRIEVE_CONTENT` 来读取页面。Olostep API 在单个批次中最多可处理 10 万个 URL，你可以通过 10 个并行批次扩展到 100 万请求。

## 资源

> [card] [Composio 上的 Olostep](https://composio.dev/toolkits/olostep)
>
> Olostep 工具包页面

> [card] [Composio 文档](https://docs.composio.dev)
>
> 会话、MCP 和框架

> [card] [Olostep 网站](https://www.olostep.com)
>
> 计划和定价

> [card] [支持](mailto:info@olostep.com)
>
> [info@olostep.com](mailto:info@olostep.com)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.