-
Notifications
You must be signed in to change notification settings - Fork 4
AgentTarget Installation and Integration
Language: English · 简体中文
MCP standardizes runtime communication, but it does not standardize where each Agent stores MCP configuration, Skills, Hooks, Instructions, or permissions. LWC therefore uses one AgentTarget interface with a handwritten adapter for every supported host.
All registered targets are strong adapters: LWC implements every stable official file-based surface available for that host and scope. “Strong” does not mean inventing a private format when the host declares a surface unsupported, UI-managed, or preview-only.
LWC registers 12 targets:
claude Claude Code
cursor Cursor
codex Codex
opencode OpenCode
hermes Hermes Agent
gemini Gemini CLI
antigravity Antigravity
kiro Kiro
copilot-vscode VS Code with GitHub Copilot Chat
copilot-cli GitHub Copilot CLI
copilot-jetbrains JetBrains IDEs with GitHub Copilot
pi Pi Agent
Each cell shows global / local behavior.
| Target | MCP | Skill | Instructions | Lifecycle Hook | Permissions |
|---|---|---|---|---|---|
| Claude Code | installed / installed | installed / installed | installed / installed | installed / installed | installed / installed |
| Cursor | installed / installed | installed / installed | user_managed / installed | installed / installed | not_applicable / not_applicable |
| Codex | installed / installed | installed / installed | installed / installed | installed / installed | not_applicable / not_applicable |
| OpenCode | installed / installed | installed / installed | installed / installed | installed / installed | not_applicable / not_applicable |
| Hermes Agent | installed / unsupported | installed / unsupported | installed / installed | installed / unsupported | not_applicable / not_applicable |
| Gemini CLI | installed / installed | installed / installed | installed / installed | installed / installed | not_applicable / not_applicable |
| Antigravity | installed / installed | installed / installed | installed / installed | installed / installed | not_applicable / not_applicable |
| Kiro | installed / installed | installed / installed | installed / installed | configured_preview / configured_preview | user_managed / user_managed |
| Copilot VS Code | installed / installed | installed / installed | user_managed / installed | unsupported / configured_preview | user_managed / user_managed |
| Copilot CLI | installed / installed | installed / installed | installed / installed | installed / installed | user_managed / user_managed |
| Copilot JetBrains | installed / user_managed | configured_preview / configured_preview | user_managed / configured_preview | unsupported / unsupported | user_managed / user_managed |
| Pi Agent | extension_bridge / extension_bridge | installed / installed | installed / installed | installed / installed | not_applicable / not_applicable |
configured_preview means LWC writes the host's documented preview surface and reports that lifecycle explicitly. user_managed means no stable official file allows safe automated installation. unsupported means the host does not provide that capability in the selected scope.
Pi has no built-in MCP configuration, so its official extension bridge exposes LWC integration without pretending that a native MCP file exists.
lwc agent installThe installer:
- detects installed Agents;
- preselects the detected targets;
- lets the user edit the target list;
- asks for
globalorlocallocation; - verifies that a compatible global
lwcis onPATH; - installs each target through its official adapter;
- records an ownership receipt for refresh and uninstall.
Global installs configure a user-level Agent. Local installs write only the current project surfaces supported by that host.
--yes means “use detected targets and defaults,” not “install every target”:
lwc agent install --yesIt selects detected Agents and defaults to global location. For an explicit set:
lwc agent install \
--target codex,claude,pi \
--location global \
--yesUse --target all only when all 12 integrations are genuinely required. Installing unused targets adds config surface without benefit.
lwc agent install --print-config codex --location global--print-config renders the selected target's MCP, Hook, Skill, and Instruction guidance to standard output without writing files. Use it for review, managed environments, or hosts whose UI owns part of the configuration.
Depending on the adapter, installation may write:
- one
lwcMCP entry runninglwc serve --mcp; - the complete
using-lwcSkill bundle; - one marker-bounded guidance block in the official instruction file;
- native lifecycle Hook configuration;
- an official plugin or extension bridge for OpenCode, Antigravity, or Pi;
- Claude Code MCP permissions where its official permission model supports them.
The installer also migrates LWC-owned legacy standalone CodeGraph entries. CodeGraph remains available through lwc_explore and is not left as a duplicate MCP server.
lwc agent status --target auto --location globalStatus reports target detection separately from integration state. Common values include:
-
installed: receipt version and all tracked post-install hashes match; -
modified: a tracked file changed after installation; -
not_installed: no current LWC receipt exists; -
unsupported: the target or location has no official integration scope.
It also reports MCP, Skills, Instructions, Hook, permissions, configured paths, and whether the host was detected or already configured.
Do not treat modified as permission to overwrite user changes. Inspect the target paths before refresh when drift may be intentional.
lwc agent refresh --target codex,claude,pi --location globalRefresh re-runs the same adapter, replaces owned Skill files and marker blocks, and de-duplicates owned MCP and Hook entries. A no-drift refresh is byte-idempotent.
Claude's prompt-Hook choice is preserved from the installation receipt. Refresh never silently changes an earlier --no-prompt-hook decision.
lwc agent uninstall \
--target codex,claude,pi \
--location global \
--yesReceipts store original content, modes, post-install hashes, owned MCP metadata, and created directories. Uninstall removes or restores only files and fragments still matching LWC-owned state. Foreign entries and later user edits are preserved.
Shared files used by several target receipts are restored only when ownership permits it. Directories are removed only when empty.
Agent integration requires:
- a compatible global
lwccommand onPATH; - the Agent's official user or project directories;
- no exported
LWC_PROJECT_ROOTfor normal current-directory use; - no
LWC=/private/path/to/lwcalias; - no AMC installation;
- no files copied from a maintainer's HOME.
An explicit LWC_PROJECT_ROOT remains available only when intentionally operating on a different authorized project root.
Installation does not enable project graphs. At the next supported boundary, the Hook reports readiness. If a substantive task needs missing graph capabilities, the Agent asks once using the portable four-choice text flow and initializes only the approved capability.
The document graph Work and CodeGraph project index are accepted independently. Agent integration success must never hide a graph initialization failure, and graph readiness must never be mistaken for successful Agent configuration.
An AgentTarget installation is complete when:
- the intended targets and global/local location are explicit;
-
statusreportsadaptation=strongand accurate per-surface modes; - the MCP entry is named
lwc, with no duplicate CodeGraph server; - the Skill, Instructions, and Hook load through the host's official mechanism;
- repeated refresh is byte-idempotent when no user drift exists;
- uninstall restores the pre-install state without deleting foreign content;
- no maintainer-local path or private tool is required.
LWC Wiki
- Home · 首页
- Project overview · 项目简介
- Basic concepts · 基本概念
- Use cases · 应用场景
- Installation and upgrades · 安装与升级
- Quick start · 快速开始
- Persistent memory · 持久记忆体系
- Agent workflow and memory policy · Agent 工作流与主动记忆策略
- Sources and ingestion · 来源与知识整合
- Wiki pages and provenance · Wiki 页面与来源证明
- Search and context · 搜索与上下文载入
- Document knowledge graph · 文档知识图(记忆图网)
- Code graph · 代码图
- Word graph · 词图
- Tags and strong context · 标签与强上下文
- Document conversion · 文档转换
-
MCP server and
lwc_explore· MCP 服务与lwc_explore - Skills, Hooks, and Instructions · Skills、Hooks 与 Instructions
- AgentTarget installation · AgentTarget 安装与集成
- Changesets · Changeset 原子变更
- Work system · Work 任务系统
- Checkpoints and rollback · Checkpoint、恢复与回滚
- Read-only Viewer · 只读可视化界面
- Architecture overview · 总体架构
- Storage and data model · 存储与数据模型
- Retrieval and indexing · 检索与索引设计
- Graph projection and performance · 图投影与性能设计
- MCP, Hooks, and AgentTarget design · MCP、Hook 与 AgentTarget 设计
- Safety and trust boundaries · 安全模型与信任边界
- Maintenance and diagnostics · 维护与诊断
- Troubleshooting and FAQ · 故障排查与常见问题
- Migration and compatibility · 迁移与版本兼容
- Support and issue reporting · 获取帮助与问题反馈
- CLI and configuration reference · CLI 与配置参考
- JSON output and error contract · JSON 输出与错误契约
- Limits and glossary · 系统限制与术语表
- Contributing and development · 贡献与开发指南
- Testing and release process · 测试与发布流程
- Wiki style guide · Wiki 编写规范