install#
Install tools or agents, resolve tool dependencies, and make the resulting packages available to your app.
Overview#
agentpm install supports two workflows:
- manifest-driven install from a local
kind: "agent"manifest - direct package install for either a tool spec or an agent spec
In both cases, AgentPM resolves package versions, downloads artifacts, installs them into the normalized .agentpm layout, and writes agent.lock.
Command synopsis#
agentpm install [<spec>] [--manifest <path>] [--frozen] [--refresh] [--update-range] [--require_attestation] [--quiet] [--token <PAT>]Arguments#
spec(optional). Install a specific package by spec, e.g.@namespace/name@0.1.2or@namespace/name@^1.2.- If it resolves to a tool, AgentPM installs the tool directly.
- If it resolves to an agent, AgentPM installs the agent artifact and then resolves/installs its tool dependencies.
- In a local
kind: "agent"project, direct tool installs still add/update the entry inagent.json → tools[].
--manifest <path>(default:agent.json). Path to the agent manifest to read/write.--frozen. Fail if anything would change the resolved set (no re-resolution or lock updates).--refresh. Force re-resolution and re-download even if everything looks satisfied locally (bypass caches).--update-range. Ifspecconflicts with the current range inagent.json, update the range in the manifest to match the requested spec.--require_attestation— Fail install if any resolved artifact is missing a registry attestation signature (supply-chain enforcement).--quiet. Reduce output noise (spinner/logs).--token <PAT>(env:AGENTPM_TOKEN). Personal Access Token for headless auth (overrides env/file).
Tools are the only resolved dependency type today. skills, knowledge, memory, and profiles are preserved in manifest/lock metadata but are not resolved or installed.
flag (--token) > env (AGENTPM_TOKEN) > token file (written by agentpm login).
Examples#
Install all tools declared in a local agent manifest#
agentpm installSample output:
• Reading credentials…
✓ Reading credentials (0ms)
• Resolving versions…
✓ Resolving versions (10ms)
• Requesting download URLs…
✓ Requesting download URLs (50ms)
• Downloading packages…
✓ Downloading packages (1ms)
• Finalizing install…
✓ Finalizing install (10ms)
Installed ✓Add + install a specific tool by spec#
agentpm install @zack/summarize@0.1.2
# writes/updates the entry in agent.json → tools[] and installs the artifactInstall a published agent package directly#
agentpm install @zack/support-agent@0.1.0This installs:
- the agent artifact under
.agentpm/agents/zack/support-agent/0.1.0/ - the agent's resolved tool dependencies under
.agentpm/tools/...
Re-resolve and re-download everything#
agentpm install --refreshPrevent any changes to the resolved set#
agentpm install --frozen
# exits with an error if resolution would changeUpdate the manifest’s version range to match your spec#
agentpm install @zack/summarize@0.1.2 --update-rangeWhat install does#
- Reads credentials and, for manifest-driven installs, your local
agent.json. - Resolves package versions (respecting exact pins or semver ranges).
- Fetches download URLs and downloads artifacts.
- Chooses install directories by kind:
- tools →
.agentpm/tools/... - agents →
.agentpm/agents/...
- tools →
- Writes updates when installing a direct tool spec in a local agent project (adds/updates
tools[]).
Install locations
- Prepared tools:
.agentpm/tools/<namespace>/<name>/<version> - Installed agent packages:
.agentpm/agents/<namespace>/<name>/<version> - Download cache (tgz artifacts):
.agentpm/cache(used unless you pass--refresh)
Lockfile (agent.lock)#
agentpm install writes agent.lock at the project root to guarantee repeatable installs across machines and CI.
Example:
{
"lockfile_version": 2,
"packages": {
"tool:@zack/summarize@0.1.2": {
"kind": "tool",
"name": "@zack/summarize",
"version": "0.1.2",
"integrity": "dd58…ae6d"
}
},
"roots": {
"local:agent": {
"name": "research-assistant",
"version": "0.1.0",
"tools": ["tool:@zack/summarize@0.1.2"],
"reserved": {
"skills": [],
"knowledge": [],
"memory": [],
"profiles": []
}
}
}
}What’s in it
packages— exact package identities and integrities.roots— local manifest roots and installed registry-agent roots.integrity— a cryptographic checksum of the artifact used to verify content.generated— timestamp for traceability.lockfile_version— the current format version.
How it’s used
- On install, the lockfile pins versions and checksums.
--frozenwill fail if the resolved set would change (protects CI from drift).--refreshre-resolves and re-downloads; if versions change (e.g., semver ranges), the lockfile is updated accordingly.- Existing tool-only v1 lockfiles are still read where practical, but normal installs now write v2.
Best practices
- Commit
agent.lockto version control. - Don’t edit it by hand—change
agent.json(or pass a spec) and re-runagentpm install. - Use exact pins for production; if using ranges, combine with
--frozenin CI.
Manifest-driven vs direct package install#
agentpm install supports two install sources:
-
Manifest-driven install
- Run
agentpm installin a project with a localkind: "agent"manifest. - AgentPM reads the local
agent.json, resolves the tools declared there, and installs those tools into.agentpm/tools/.... agent.lockrecords the local manifest as alocal:agentroot.
- Run
-
Direct package install
- Run
agentpm install @namespace/name@version. - If that package resolves to a tool, AgentPM installs the tool directly into
.agentpm/tools/.... - If that package resolves to an agent, AgentPM installs the agent package into
.agentpm/agents/..., then resolves and installs its tools into.agentpm/tools/.... agent.lockrecords installed registry agents with roots likeagent:@namespace/name@version.
- Run
Verify registry attestation on install#
Ensure every artifact you pull has a registry attestation:
agentpm install --require_attestation- Fails the install if any resolved artifact lacks the registry’s attested signature.
- Works alongside your normal resolution/lockfile flow.
- Use in CI and production to prevent un-attested packages from entering your environment.
Common flows#
- Declared in manifest → install all
# agent.json already has tools[] entries
agentpm install- Ad-hoc add a tool
agentpm install @namespace/my-tool@0.3.1
# now present in tools[] and installed- Pin vs range
- Use exact pins (
0.1.2) for reproducibility.
- Use exact pins (
Errors & troubleshooting#
- Reserved field warnings under
--strict. If your agent manifest populatesskills,knowledge,memory, orprofiles, lint will warn that those fields are validated and preserved but not resolved today. Leave them empty unless you intentionally want to track future references now. - Unsupported v1 agent graph under
--frozen. If a legacy v1 lockfile cannot represent the requested agent dependency graph, rerunagentpm installwithout--frozento regenerateagent.lockv2. - Frozen mismatch. If
--frozenfails, you’re attempting to change the resolved set. Remove--frozenor commit the intended updates first. - Stale cache. If you suspect a bad/corrupt artifact or want to force re-fetch, use
--refresh.
Recommended workflow#
- Declare tools in
agent.json → tools[]or install viaagentpm install @namespace/name@version. - Run
agentpm installlocally; commit manifest andagent.lockchanges. - In CI, run:
agentpm lint --strict
agentpm install --frozen --quiet