Files
nexus/wiki/concepts/AgentScopes.md
2026-05-03 05:42:12 +08:00

34 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Agent Scopes"
type: concept
tags: []
last_updated: 2026-04-29
---
## Overview
Agent ScopesAgent 作用域)指 AI 编码 Agent 的生效范围,决定了 Agent 配置是全局共享还是项目专用。这是 The Agency 集成架构中的重要维度。
## Home-Scoped Agent全用户级 Agent
- 安装位置:用户家目录(如 `~/.claude/agents/``~/.gemini/`
- 生效范围:该用户所有项目均可用
- 安装方式:`./scripts/install.sh --tool <tool>`
- 代表工具Claude Code、GitHub Copilot、Antigravity、Gemini CLI、OpenClaw、Kimi Code
## Project-Scoped Agent项目级 Agent
- 安装位置:项目根目录(如 `./.opencode/agents/``./.windsurfrules`
- 生效范围:仅当前项目可用
- 安装方式:从项目根目录运行 `./scripts/install.sh --tool <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`