---
title: "使用 Cursor 开发"
description: "让 Cursor 加载 AG-UI 文档，更快构建自定义服务端与客户端。"
---

> Documentation Index
> Fetch the complete documentation index at: https://ag-ui.ndjp.net/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 Cursor 开发

本指南帮助你把 Cursor 配置为更快构建自定义 AG-UI 服务端与客户端的助手。同样的原则适用于 Windsurf、VS Code 等其他 IDE。

## 将文档添加到 Cursor

1. 打开 Cursor 设置
2. 进入 **Features > Docs**，点击 **“+ Add new Doc”**
3. 粘贴以下 URL：[https://docs.ag-ui.com/llms-full.txt](https://docs.ag-ui.com/llms-full.txt)
4. 点击 **Add**

## 使用文档

现在你可以用这些文档帮助构建 AG-UI 项目。在当前提示中键入 `@` 符号，选择 **Docs**，然后从列表中选择 **Agent User Interaction Protocol**。

## 最佳实践

使用 Cursor 构建 AG-UI 服务端时：

- 把复杂问题拆解为更小的步骤
- 查看智能体改动了哪些文件（聊天输入框上方），了解它做了什么
- 让智能体编写单元测试验证你的实现
- 仔细遵循 AG-UI 协议规范

## 相关资源

- [LLMs 全文](https://docs.ag-ui.com/llms-full.txt)
- [快速开始：构建服务端](https://ag-ui.ndjp.net/quickstart/server/)
- [事件参考](https://ag-ui.ndjp.net/reference/events/)

Source: https://ag-ui.ndjp.net/tutorials/cursor/index.mdx
