--- title: "Agent Scopes" type: concept tags: [] last_updated: 2026-04-29 --- ## Overview Agent Scopes(Agent 作用域)指 AI 编码 Agent 的生效范围,决定了 Agent 配置是全局共享还是项目专用。这是 The Agency 集成架构中的重要维度。 ## Home-Scoped Agent(全用户级 Agent) - 安装位置:用户家目录(如 `~/.claude/agents/`、`~/.gemini/`) - 生效范围:该用户所有项目均可用 - 安装方式:`./scripts/install.sh --tool ` - 代表工具:Claude Code、GitHub Copilot、Antigravity、Gemini CLI、OpenClaw、Kimi Code ## Project-Scoped Agent(项目级 Agent) - 安装位置:项目根目录(如 `./.opencode/agents/`、`./.windsurfrules`) - 生效范围:仅当前项目可用 - 安装方式:从项目根目录运行 `./scripts/install.sh --tool ` - 代表工具:OpenCode、Cursor、Aider、Windsurf、Qwen Code ## Key Differences | 维度 | Home-Scoped | Project-Scoped | |------|-------------|----------------| | 安装路径 | `~/.tool/` | `./.tool/` | | 多项目复用 | ✅ | ❌ | | 项目定制化 | ❌ | ✅ | | 权限控制 | 用户级 | 仓库级(可提交 git) | | 冲突风险 | 高(同名覆盖) | 低(项目隔离) | ## Sources - [[OpenCode Integration]](`Agent/agency-agents/integrations/README.md`)