代理
- 作者仓库星标 3,717
- 作者仓库 agentation
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @benjitaylor · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Agentation Setup
Set up the Agentation annotation toolbar in this project.
## Steps
1. **Check if already installed**
- Look for `agentation` in package.json dependencies
- If not found, run `npm install agentation` (or pnpm/yarn based on lockfile)
2. **Check if already configured**
- Search for `<Agentation` or `import { Agentation }` in src/ or app/
- If found, report that Agentation is already set up and exit
3. **Detect framework**
- Next.js App Router: has `app/layout.tsx` or `app/layout.js`
- Next.js Pages Router: has `pages/_app.tsx` or `pages/_app.js`
4. **Add the component**
For Next.js App Router, add to the root layout:
```tsx
import { Agentation } from "agentation";
// Add inside the body, after children:
{process.env.NODE_ENV === "development" && <Agentation />}
```
For Next.js Pages Router, add to _app:
```tsx
import { Agentation } from "agentation";
// Add after Component:
{process.env.NODE_ENV === "development" && <Agentation />}
```
5. **Confirm component setup**
- Tell the user the Agentation toolbar component is configured
6. **Recommend MCP server setup**
- Explain that for real-time annotation syncing with AI agents, they should also set up the MCP server
- Recommend one of the following approaches:
- **Universal (supports 9+ agents including Claude Code, Cursor, Codex, Windsurf, etc.):**
See [add-mcp](https://github.com/neondatabase/add-mcp) — run `npx add-mcp` and follow the prompts to add `agentation-mcp` as an MCP server
- **Claude Code only (interactive wizard):**
Run `agentation-mcp init` after installing the package
- Tell user to restart their coding agent after MCP setup to load the server
- Explain that once configured, annotations will sync to the agent automatically
## Notes
- The `NODE_ENV` check ensures Agentation only loads in development
- Agentation requires React 18
- The MCP server runs on port 4747 by default for the HTTP server
- MCP server exposes tools like `agentation_get_all_pending`, `agentation_resolve`, and `agentation_watch_annotations`
- Run `agentation-mcp doctor` to verify setup after installing
章节与文件索引
按说明文件中的顺序排列。
步骤
注释
文件/命令 -> agentation · npm install agentation · <Agentation · import { Agentation } · app/layout.tsx · app/layout.js · pages/_app.tsx · pages/_app.js
内容校验值 -> 8f232ddbe1e3
当前原文的自动摘译,尚未人工审校。
步骤
检查是否已经安装 在 package.json 依赖项中查找
agentation如果没有找到,运行npm install agentation(或基于 lockfile 的 pnpm/yarn) 检查是否已经配置 在 src/ 或 app/ 中搜索<Agentation或import { Agentation }注释
NODE_ENV检查确保代理仅在开发中加载 代理需要 React 18 MCP 服务器默认在 HTTP 服务器的端口 4747 上运行 MCP 服务器公开诸如agentation_get_all_pending、agentation_resolve和agentation_watch_annotations运行agentation-mcp doctor以在安装后验证设置