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

1.3 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Agent Scopes concept
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