agentwheel
Manage and explicitly inspect reusable agent artifacts with Agentwheel. Use when the user asks to search, add, install, update, customize, eject, or uninstall skills, integrations, workflows, or other OpenPack artifacts across runtimes. For automatic capability suggestions, install the separate agentwheel-discovery skill.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 9
- Forks
- 0
01 前言 Front Matter
- name
- agentwheel
- license
- MIT
- metadata
- { "author": "NestDevLab", "version": "0.22.6" }
- description
- Manage and explicitly inspect reusable agent artifacts with Agentwheel. Use when the user asks to search, add, install, update, customize, eject, or uninstall skills, integrations, workflows, or other OpenPack artifacts across runtimes. For automatic capability suggestions, install the separate agentwheel-discovery skill.
- allowed-tools
- [ "Bash" ]
02 资源文件 6
- 参考文档references/hermes-background-review-routing.md4.9 KB
- 参考文档references/hermes-plugin-rollout-source-routing.md1.8 KB
- 参考文档references/hermes-self-improve-runtime-drift.md1.9 KB
- 参考文档references/multi-runtime-plugin-packs.md3.7 KB
- 参考文档references/optional-openclaw-plugin-artifacts.md2.6 KB
- 参考文档references/package-manifest-and-registry-updates.md2.6 KB
03 SKILL.md 正文
agentwheel
Agentwheel discovers reusable artifacts and manages their desired state across runtimes.
agentwheel is the control plane. It reads packages from sources, stores desired state in .agentwheel/config.json, plans runtime changes, and writes only through install. Treat runtime output directories as generated files.
Mental model:
addrecords desired packages.installmakes the declared state true in the target runtime.updatere-resolves tracking packages, then applies.skill update <name>maps a configured skill to its owning package and reconciles only that skill plus its genuine transitive composition inputs; sibling artifacts keep their runtime bytes and manifest/lock state.uninstallremoves configured packages and their managed runtime output.
Safety Rules
- Prefer
agentwheel plan ...oragentwheel install --dry-runbefore applying changes. - Do not hand-edit generated runtime files such as
skills/,.agents/skills,.claude/skills,.github/skills,~/.hermes/skills, or generated instructions. - If a plan reports
driftorconflict, stop and explain it. Do not use--forceunless the user explicitly approves that scope. - Gmail, Drive, registry publishing, git commits, pushes, and runtime reloads/restarts are separate external side effects. Get explicit approval for them.
- Programmatic adapters execute local code. Use
--adapter-moduleonly with--allow-adapter-codeafter the user approves that local code execution. - OpenClaw plugin artifacts are only planned by default. Use
--execute-pluginsonly after explicit approval. - Search results are proposals, not approval. Never add, install, enable, or change configuration until the user confirms the artifact and target scope.
Core Flow
agentwheel search tmux
agentwheel add github:NestDevLab/agent-mesh --skill codex-tmux --adapter codex --installation-type local --mode tracking
agentwheel plan
agentwheel install
If a workspace already has configured packages in .agentwheel/config.json, install without a source:
agentwheel plan
agentwheel install
To add and install in one step:
agentwheel install github:owner/repo --adapter codex,claude
Explicit source installs with explicit adapters default to user-level artifacts. Use exactly one of
--user, --local, or --fleet <fleet-id> when desired-state scope matters. Use
-i/--installation-type <type> for the runtime layout inside that scope and
-t/--target-root <project> for an explicit target root. Named fleets are optional.
Workspace Setup
Initialize an agentwheel workspace:
agentwheel init
Initialize a package authoring directory:
agentwheel init package
agentwheel init package creates openpack.json, instructions/, rules/, skills/, and instructions/AGENTS.md.
Explicit Discovery
Search configured registries and public catalogue sources:
agentwheel search "<query>"
agentwheel search "<query>" --json --limit 10
agentwheel search "<query>" --semantic --json --limit 10
Search when the user explicitly asks to find, compare, or evaluate an artifact. Search results are proposals, not approval, and never change desired state by themselves.
Semantic catalogue search
Use --semantic for a capability request whose wording is unlikely to match catalogue labels, or after bounded lexical search returns only weak matches. It queries the same published catalogue vector index used by the website and validates its checksums against the loaded catalogue before ranking. It is opt-in because first use may download the model and index assets.
agentwheel search "remember corrections from earlier conversations" --semantic --json --limit 10
Do not use --semantic for a registry-only search, and never describe a semantic score as proof
that an artifact implements a capability.
Use a trial only for instruction skills. Plugins, MCP servers, hooks, commands, and settings are not trialled because reading them is not equivalent to safely executing them in an isolated runtime.
Install skills/agentwheel-discovery separately when the user wants proactive capability-gap
detection, bounded semantic recommendations, and read-only trial suggestions during unrelated work.
Registry maintenance remains explicit:
agentwheel registry update
agentwheel registry list
Inspect an explicit source before adding it:
agentwheel list github:owner/repo
agentwheel scan github:owner/repo
agentwheel list ./local-agent-pack
agentwheel scan ./local-agent-pack
Filter source inspection to specific artifacts:
agentwheel list github:owner/repo --select skills/review --select rules/core.md
agentwheel list github:owner/repo --skill review
Sources
Use explicit sources when you know the package location:
agentwheel add github:owner/repo
agentwheel add github:owner/repo#main
agentwheel add git:https://host.example/owner/repo.git#v1.2.3
agentwheel add ./local-agent-pack
agentwheel add /absolute/path/to/agent-pack
agentwheel add skillkit:github:owner/repo
agentwheel add vercel:owner/repo
agentwheel add vercel:skills.sh/owner/repo/skill-name
Short names go through the registry:
agentwheel registry update
agentwheel add <registry-name>
Driver inference is automatic for github:, git:, skillkit:, vercel:, and local paths. Override it only when needed:
agentwheel add <source> --driver local
agentwheel add <source> --driver git
agentwheel add <source> --driver skillkit
agentwheel add <source> --driver vercel-skills
Add Packages
add saves a package entry in .agentwheel/config.json; it does not install runtime files by itself.
agentwheel add github:owner/repo --adapter openclaw --installation-type local
agentwheel add github:owner/repo --adapter claude --installation-type local
agentwheel add github:owner/repo --adapter codex --installation-type local
agentwheel add github:owner/repo --adapter hermes --installation-type user
agentwheel add github:owner/repo --adapter copilot --installation-type local
Select only part of a package:
agentwheel add github:owner/repo --skill code-review
agentwheel add github:owner/repo --select skills/code-review --select rules/core.md
agentwheel add github:owner/repo --select skills/code-review,rules/core.md
Install or persist suggested companion artifacts only when requested:
agentwheel plan github:owner/repo --skill review --with-suggestions
agentwheel install github:owner/repo --skill review --suggestion brainstorming
agentwheel add github:owner/repo --skill review --with-suggestions --adapter codex --installation-type local
Treat OpenPack suggests as opt-in soft composition, not as requires.optional.
--with-suggestions includes all suggestions relevant to selected artifacts as non-blocking
optional graph edges. --suggestion <alias> includes one named suggestion and should fail if that
explicit suggestion cannot resolve.
Use a source override when a selected package should replace the same artifact coming from another source, such as a forked skill overriding a meta-pack dependency. The declaration is explicit and planning fails if it does not match exactly one losing artifact and one selected replacement:
agentwheel add github:example-org/agent-toolkit#main \
--skill self-improve \
--override 'github:example-upstream/agent-toolkit::skills/self-improve'
Equivalent config:
{
"name": "agent-toolkit-nestdev",
"source": "github:example-org/agent-toolkit#main",
"driver": "git",
"adapter": "codex",
"installationType": "local",
"mode": "tracking",
"select": ["skills/self-improve"],
"overrides": ["github:example-upstream/agent-toolkit::skills/self-improve"]
}
source::type/name identifies the artifact being replaced. github:owner/repo matches any ref
for that repo; include #main or another ref to narrow it. Review OVERRIDE lines in
agentwheel plan, agentwheel deps tree, or agentwheel deps why before applying fleet-wide.
Use --name for a stable local alias:
agentwheel add github:owner/repo --name team-agent-pack
Choose update mode:
agentwheel add github:owner/repo#v1.0.0 --mode pinned
agentwheel add github:owner/repo#main --mode tracking
Plan And Install
Preview configured packages:
agentwheel plan
Apply configured packages:
agentwheel install
Execute semantic plugin installs only after approval:
agentwheel install --execute-plugins
If an agent or profile runtime declares structured reloadCommands, run them after executed semantic
plugin changes only with a separate explicit gate:
agentwheel install --execute-plugins --reload-runtimes
Hermes plugin rollout checks
When delivering a Hermes plugin, do not equate source package presence or plugins.enabled config with a working runtime install. Verify the gateway host has $HERMES_HOME/plugins/<plugin-name>/ with the expected plugin.yaml/code files, the Agentwheel install manifest contains the plugin artifact, and a canary exercises the middleware path. Use --execute-plugins for plugin artifacts when applying, after dry-run and explicit approval.
Preview or apply one configured package:
agentwheel plan team-agent-pack
agentwheel install team-agent-pack
Add and install a source in one step:
agentwheel install github:owner/repo --adapter codex,claude
Explicit source installs with explicit adapters default to documented user-level installs. Pass
--user, --local, or --fleet <fleet-id> to select one desired-state scope, and use
-i/--installation-type <type> for the runtime layout inside that scope. If a package can be
installed in more than one type and no CLI/context default applies, Agentwheel fails instead of
guessing.
Target selection order is --target-root, then --agent, then runtime auto-detection from the current directory, then the current directory.
Status
Use status to see configured packages, lock/manifest state, and pending install work:
agentwheel status
agentwheel status --agent lab-codex
agentwheel status --all
agentwheel status --profile daily
Blocked by another session
Governed installs that require a clean repository still refuse every dirty checkout before runtime
writes. When the local Agent Mesh graph has an exact opaque resource claim, the refusal identifies
the one live session and its start time. owner unknown is intentional when claims are missing,
inactive, malformed, or ambiguous; candidate sessions may be listed, but Agentwheel never chooses
between them. Inspect the session graph or ask the rollout coordinator to identify or clear the
owner before retrying. Do not delete a lock or bypass the clean-tree block from this diagnostic.
Repository-lock contention also reports the stored operation, PID, runtime UUID, and creation time when available, and names a graph session only for one exact live UUID match. The graph reports identity and ownership; it is not a lock manager and never authorizes proceeding.
For a named fleet, prefer agentwheel status --fleet <fleet-id> --profile <name> over
direct agent status; profile status uses the same runtime resolution, adapter
config, installation type, and graph lock fingerprinting as
install --fleet <fleet-id> --profile <name>. If that fleet defines a profile named all,
agentwheel status --fleet <fleet-id> --all checks that profile.
Named Fleets, Agents, And Profiles
Named fleets are optional control-plane configurations. Select one explicitly with
--fleet <fleet-id>; ordinary user and local work does not require fleet registration. User,
local, and fleet scopes are isolated desired state: Agentwheel does not merge them, and no fleet
has global priority.
Named fleets use workspace schema v3 or newer and require a compatible Agentwheel CLI. Upgrade first, verify
agentwheel --version and agentwheel fleet --help, then create or register fleet state. Do not
downgrade the config, strip named-fleet data, or run an old CLI against it.
Current config shape:
{
"schemaVersion": 3,
"fleetId": "example-fleet",
"packages": [
{
"name": "core-agent-pack",
"source": "github:example-org/core-agent-pack",
"driver": "git",
"adapter": "codex",
"installationType": "local",
"mode": "tracking"
}
],
"agents": {
"lab-codex": { "adapter": "codex", "installationType": "local", "root": "/workspace/project" }
},
"profiles": {
"daily": {
"runtimes": [
{ "agent": "lab-codex" }
]
}
}
}
Use named targets:
Configured packages may declare "runtimes": ["claude"] to select adapter runtimes. All
configured-package plans honor it, including --agent, --profile, status, and update. Named
targets match their declared adapter; plain workspace commands match each package's adapter.
Agents sharing an adapter cannot be selected separately. Upgrade all members to a version
supporting this field before adding it to shared configuration.
agentwheel fleet register example-fleet --root /srv/agentwheel/fleets/example-fleet --required-package core-agent-pack
agentwheel fleet list
agentwheel fleet show example-fleet
agentwheel install --fleet example-fleet --agent lab-codex --dry-run
agentwheel install --fleet example-fleet --all --dry-run
agentwheel install --fleet example-fleet --profile daily --dry-run
An intended runtime path owned by another scope is a blocking conflict even when the bytes match. Use the dedicated fleet normalization workflow: preview the transfer, review its exact plan digest, then apply only the unchanged plan. Never remove the source declaration first or hand-edit runtime output to manufacture a clean plan.
agentwheel fleet normalize example-fleet --from user --package core-agent-pack --json
agentwheel fleet normalize example-fleet --from user --package core-agent-pack \
--plan-digest <reviewed-sha256> --apply
agentwheel fleet normalize example-fleet --from user --recover
fleetId in the fleet config must match the registry key. Every repeatable
--required-package must name a package declared by that fleet. Recovery is only for a pending
journal and must fail if recorded configs, manifests, or graph locks changed externally.
Adapters
Built-in adapters:
openclawclaudecodexhermescopilot
Use a declarative adapter config:
agentwheel install ./my-pack --adapter-config ./my-runtime.jsonc --dry-run
agentwheel install ./my-pack --adapter-config ./my-runtime.jsonc
Use a local programmatic adapter only after approval:
agentwheel install ./my-pack --adapter-module ./adapter.ts --allow-adapter-code --dry-run
Update
Preview updates for configured tracking packages:
agentwheel update --dry-run
Apply updates:
agentwheel update
Target configured agents:
agentwheel update --agent lab-codex --dry-run
agentwheel update --all --dry-run
agentwheel update --profile daily --dry-run
For a named fleet, use agentwheel update --fleet <fleet-id> --profile <name> before
install --fleet <fleet-id> --profile <name> when tracking packages should move forward. If that
fleet defines a profile named all, agentwheel update --fleet <fleet-id> --all checks that
profile.
Limit an update to one configured package:
agentwheel update team-agent-pack --dry-run
agentwheel update team-agent-pack
Named package updates preserve artifacts owned by other configured roots, including unrelated drift.
For one configured skill, resolve its owner and reconcile only that skill plus genuine transitive composition inputs:
agentwheel skill update code-review --fleet example-fleet --profile daily --dry-run
agentwheel skill update code-review --fleet example-fleet --profile daily
Pinned owners use install semantics; tracking owners re-resolve. Sibling artifacts from the same package retain their runtime bytes and manifest/graph-lock entries; only composition inputs actually used by the requested skill join the update scope. Unrelated configured packages are not resolved. If ownership is ambiguous, pass --package <name>. Use --adopt only after explicit approval of the dry-run's unmanaged destinations.
Advance one tracking dependency while unrelated graph nodes remain locked:
agentwheel update --dependency shared-core --dry-run
agentwheel update --dependency shared-core
agentwheel update --dependency github:your-org/shared-core --agent lab-codex
The selector must uniquely match a locked tracking dependency by name, alias, node id, or source.
Its required tracking closure also advances. Configured selections stay unchanged; this mode
rejects package arguments, --select, --skill, --frozen-lock, and --offline.
install uses the graph lock as input when present. update re-resolves tracking packages and writes a new lock. Pinned packages stay on the locked graph unless their declaration changes.
Drift And Customization
Drift means a managed runtime output changed outside agentwheel. Fix drift by choosing one of the supported customization channels in .agentwheel/, then re-run a dry-run:
- Layer local instructions with
agentwheel remember. - Add separate local artifacts under
.agentwheel/additions. - Override upstream content under
.agentwheel/overrides. - Override source precedence with package
overrideswhen a forked source should replace a colliding upstream artifact. - Eject an item into
.agentwheel/ejectedwhen the user wants local ownership.
When the plan instead keeps a file as foreign or refuses because another workspace owns it, that is an ownership problem, not drift: see "Choosing an ownership command" under Troubleshooting.
Append durable local instruction text:
agentwheel remember --runtime codex "Always run the formatter before tests."
agentwheel plan
agentwheel install
Eject an artifact:
agentwheel eject <package-name>/skills/<skill-name>
agentwheel plan
agentwheel install
For package names with slashes, keep the full package name:
agentwheel eject NestDevLab/agent-mesh/skills/codex-tmux
Uninstall
Preview uninstall for a configured package:
agentwheel uninstall team-agent-pack --dry-run
Uninstall clean managed files and remove the package from config:
agentwheel uninstall team-agent-pack
Remove from config and manifest but keep runtime files unmanaged:
agentwheel uninstall team-agent-pack --keep-files
By default, uninstall keeps drifted managed files. Use --force only with explicit approval:
agentwheel uninstall team-agent-pack --force
For a one-time MCP rename, use a dedicated cutover workspace with one legacy MCP artifact and an
explicit agent stateKey. Preview each runtime separately:
agentwheel mcp retire legacy-mcp --agent legacy-codex --from-workspace-root /exact/old/workspace --dry-run
agentwheel mcp retire legacy-mcp --agent legacy-claude --dry-run
Require exactly one REMOVE, the expected target and legacy server, and zero drift/conflict.
Unexpected owner, manifest contents, arguments, environment, or MCP fields are blockers. Apply only
after separate runtime approval by replacing --dry-run with --apply.
Package Manifest Reference
An OpenPack package uses openpack.json or openpack.jsonc:
{
"schemaVersion": 2,
"name": "owner/agent-pack",
"version": "0.1.0",
"provides": [
{ "type": "instructions", "path": "instructions/AGENTS.md" },
{ "type": "rules", "path": "rules" },
{ "type": "skills", "path": "skills" }
]
}
Supported artifact types are instructions, rules, skills, commands, subagents, mcp, hooks, settings, plugins, and fragments.
Skills convention:
skills/<name>/SKILL.md
Skill frontmatter is YAML:
---
name: code-review
description: Review code, configuration, or documentation for correctness, safety, maintainability, and missing validation.
allowed-tools: [Bash]
---
Troubleshooting
If there are no configured packages:
agentwheel add <source> --adapter <runtime>
agentwheel plan
agentwheel install
If the current directory has multiple runtime markers:
agentwheel install --adapter codex --installation-type local --dry-run
If a selected artifact is missing:
agentwheel list <source>
If a registry short name fails:
agentwheel registry update
agentwheel search "<query>" --scope registry
If npm update checks are noisy:
agentwheel --no-update-check install --dry-run
AGENTWHEEL_NO_UPDATE_CHECK=1 agentwheel install --dry-run
If install fails with Locked install cache missing or stale for locked graph node, or a pinned
dependency snapshot lacks a selected artifact:
agentwheel list <source> --select <artifact>
The native fetch refreshes the source cache. If the refreshed content hash matches the lock, stop —
nothing else is stale. If it differs, regenerate only the affected graph locks (lock-only) and
leave them uncommitted: lock commits belong to the approved install. update --dependency cannot
recompute an edge whose root node id changed (e.g. after renaming the root package's artifacts);
regenerate the locks instead.
If target-state discovery rejects an invalid historical graph-lock/manifest pair, first write and
review agentwheel ownership recovery-plan. For a complete local report, preview a stable-state
recovery with the exact Fleet target:
agentwheel plan --fleet <fleet-id> --agent <agent> \
--recover-legacy-state --force-conflict --replace-conflict
--recover-legacy-state preserves the invalid historical files and only bypasses their use as the
planning base. --force-conflict adopts exact existing content; --replace-conflict permits the
reviewed plan to update differing unmanaged content. Apply only the same reviewed target and flags.
After the first stable install, rerun the ordinary plan without recovery flags and require a no-op.
An advanced tracked graph lock with an otherwise valid owned v2 manifest is an ordinary migration:
Agentwheel keeps the manifest as prior runtime state, resolves the graph fresh, and does not trust the
advanced lock as installed history. If stale foreign ownership blocks that migration, use
agentwheel ownership retire-stale --destination-state-key <exact-fleet-state-key> to produce a
metadata-only, revision-gated retirement plan against the already-installed Fleet manifest. Do not
guess the state key or apply without the exact command emitted by the dry-run.
When a nested non-Fleet workspace is refused because another plain workspace root, or its own root
before Fleet qualification, owns paths under a fingerprint-only legacy key, run
agentwheel ownership adopt-legacy --agent <agent> --source-state-key <legacy-key> --from-workspace-root <previous-owner-root> --json from that workspace. It moves only proven,
still-desired entries into the stable state; add --carry-drift only after reviewing the drifted
paths. Apply the emitted command, then require a normal install plan without force flags.
Choosing an ownership command
agentwheel ownership --help lists the commands; each subcommand's --help is the authoritative flag
reference. All of them dry-run by default and change only manifest metadata.
| Situation | Command |
|---|---|
| Unclear who owns what | ownership recovery-plan (read-only evidence report) |
| Refused: paths owned under a fingerprint-only legacy key | ownership adopt-legacy |
adopt-legacy says entries are "already owned by the destination owner" (mixed legacy manifest) |
Run a normal install --agent <agent> first; it migrates the state and keeps the foreign entry. Then hand off that entry. |
Plan keeps one file as a foreign artifact owned by … in a stable manifest |
ownership handoff <type/name> with --from-workspace-root <root>, or --from-unknown-owner for workspace:unknown; add --to-fleet <id> for a Fleet owner |
| Stale foreign entry already covered by the Fleet manifest | ownership retire-stale |
handoff refuses a file whose runtime hash differs from the manifest. If the drift is reviewed and
harmless, add --carry-drift; applying then also needs --expected-runtime-hash from the dry-run.
The recorded hash is kept, so the next install reports DRIFT for that file. Replacing it needs
install --agent <agent> --force-drift, which also force-refreshes every merge contribution of that
target (for example hooks): check that each merge destination is byte-identical afterwards. Never
narrow that install with --select: it removes unselected merge contributions.
04 同仓库更多 Skills
agentwheel-smoke-skill
Deterministic smoke skill used by Agentwheel installation tests.
demo-skill
Demo skill for agentwheel tests.
agentwheel-smoke
Run a read-only smoke diagnostic for the current AI harness and its Agentwheel-managed installation state. Use when asked to smoke test an agent, verify fleet deployment, inspect whether a harness is installed in the expected Agentwheel path, or summarize local Agentwheel status without mutating files or external systems.
agentwheel-discovery
MUST use proactively when a request expresses an operational intent that an existing reusable skill or integration could plausibly fulfill—even if the user did not ask for a skill or describe a capability gap. Inspect installed artifacts, then run Agentwheel semantic search before generic or manual solution design when none already covers the intent. Suggest up to three evidence-backed matches and offer a read-only trial without installing or changing anything.
agentwheel-artifact-evolution
Generate or evolve OpenPack artifacts from a verified capability gap, correction, or rollout request. Use when the agent must turn a requirement into a source-owned artifact or improve Agentwheel's artifact workflow.