install#

Install tools, skills, knowledge packages, memory blueprints, instruction profiles, loops, or agents, resolve package dependencies, and make the resulting packages available to your app.

Templates use agentpm new, not install

Workflow templates are consumed with agentpm new, not agentpm install. Generated multi-root workspace projects may later use agentpm install to regenerate agent.lock, but agentpm install <spec> is not the entrypoint for template consumption.

Overview#

agentpm install supports two workflows:

  • manifest-driven install from a local kind: "agent" or kind: "skill" manifest
  • direct package install for a tool, skill, knowledge, memory, profile, loop, or agent spec

In both cases, AgentPM resolves package versions, downloads artifacts, installs them into the normalized .agentpm layout, and writes agent.lock.

Default selection (@namespace/name, latest, or *) chooses the highest non-yanked stable SemVer version. A higher prerelease does not replace a stable default. If only prereleases or yanked versions exist, there is no default install candidate. Install a prerelease explicitly, for example agentpm install @namespace/name@0.2.0-rc.1, or use a range that explicitly includes a prerelease. Yanked versions are excluded from installation. Caret and tilde ranges ignore build metadata for precedence while preserving prerelease bounds, for example ^0.1.0+build.1 and ~1.2.3-alpha.1+build.1.

Command synopsis#

agentpm install [<spec>] [--manifest <path>] [--frozen] [--refresh] [--update-range] [--require-signature] [--require-attestation] [--machine] [--quiet] [--token <PAT>]

Arguments#

  • spec (optional). Install a specific package by spec, e.g. @namespace/name@0.1.2 or @namespace/name@^1.2.
    • If it resolves to a tool, AgentPM installs the tool directly.
    • If it resolves to a skill, AgentPM installs the skill artifact and resolves/installs its tool dependencies.
    • If it resolves to a knowledge package, AgentPM installs the knowledge artifact directly.
    • If it resolves to a memory package, AgentPM installs the memory artifact directly.
    • If it resolves to a profile, AgentPM installs the profile artifact directly.
    • If it resolves to a loop, AgentPM installs the loop artifact directly.
    • If it resolves to an agent, AgentPM installs the agent artifact and then resolves/installs its tool, skill, knowledge, memory, profile, and loop dependencies.
    • In a local kind: "agent" project, direct tool installs add/update agent.json → tools[], direct skill installs add/update agent.json → skills[], direct knowledge installs add/update agent.json → knowledge[], direct memory installs add/update agent.json → memory[], direct profile installs add/update agent.json → profiles[], and a direct loop install adds/updates singular agent.json → loop.
  • --manifest <path> (default: agent.json). Path to the local manifest to read/write.
  • --frozen. Require an existing agent.lock and replay its complete pinned package set, checking authored dependency constraints without re-resolution or lock/manifest updates.
  • --refresh. Re-resolve and re-download during ordinary installs; with --frozen, re-download the existing pins without re-resolution.
  • --update-range. If spec conflicts with the current range in agent.json, update the range in the manifest to match the requested spec.
  • --require-signature. Require at least one cryptographically valid recorded author signature for every installed package.
  • --require-attestation. Require a cryptographically verified Registry attestation for every installed package, including legacy versions. The Registry signing key must come from a root-authenticated key set.
  • --machine. Emit one JSON success/error result on stdout and never prompt for compatibility recovery. Errors include a category and available API details; the process still exits nonzero on failure.
  • --quiet. Reduce output noise (spinner/logs).
  • --token <PAT> (env: AGENTPM_TOKEN). Personal Access Token for headless auth (overrides env/file).

Target-aware Python releases#

For a Python Tool published in the new release format, AgentPM authenticates the complete release and selects the artifact matching your supported platform. An exact target takes precedence; any is used only when the release includes that portable payload. Only the selected artifact receives a download URL. Every provided author signature is verified, namespace-required signatures are enforced, and new-format releases always require a root-trusted Registry attestation.

The downloaded bytes must match the selected artifact's full SHA-256 and size. AgentPM checks the embedded manifest and target descriptor before replacing an existing installation. Python dependencies reuse the recorded resolution and managed environment: no new dependency solving or source builds occur during installation. A compatible Python interpreter must already be installed; use AGENTPM_PYTHON to select it when needed. Installation is reported complete only after the dependency environment is ready.

If there is no compatible artifact, the error names the package/version, requested target and available targets. An interactive fresh install with a non-exact range may offer a newer compatible version within that range, and requires explicit confirmation. Exact requests, existing lockfiles, --frozen, --machine and noninteractive installs never take that recovery path. There is no automatic architecture emulation or silent version substitution.

agentpm install @namespace/tool@1.0.0 --machine

On compatibility failure, stdout contains a JSON object with status: "error", error.category: "no_compatible_artifact" and details including the requested target and available targets. Successful machine output has status: "success".

agent.lock remains platform-neutral: it records the logical release integrity and Python resolution. The selected artifact/consumer target and environment fingerprint belong to local .agentpm/ state. Cache identity includes package kind, qualified name, version, selected target and artifact digest; cached bytes are checked before reuse. Copying an installation to another target requires running install there again.

Install sessions last two hours, independently of 10-minute artifact download URLs. An expired/denied download URL can be renewed once in the same pending session without restarting completed package work. Renewal rechecks access and cannot change the pinned package or artifact. A second denial, expired session or revoked access fails with a retry instruction. Downloads use a 30-second connection timeout and 30 seconds without transfer progress. Invalid/truncated downloads leave no usable partial cache file.

Archive extraction rejects unsupported links/device entries, absolute/traversing paths and Windows drive/stream paths. It limits an archive to 15,000 entries and 2 GiB of decompressed data, including headers/padding. A failed extraction does not replace a previous valid directory or finalize the install. Legacy releases retain their single-archive format and runtime behavior while benefiting from the same download/extraction checks.

Scope

Agents resolve tools[], skills[], knowledge[], memory[], profiles[], and optional singular loop. Skills resolve tools[].

Token resolution order

flag (--token) > env (AGENTPM_TOKEN) > token file (written by agentpm login).

Examples#

Install all tools declared in a local agent manifest#

agentpm install

Sample 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 artifact

Install a published agent package directly#

agentpm install @zack/support-agent@0.1.0

This installs:

  • the agent artifact under .agentpm/agents/zack/support-agent/0.1.0/
  • the agent's resolved skill dependencies under .agentpm/skills/...
  • the agent's resolved knowledge dependencies under .agentpm/knowledge/...
  • the agent's resolved tool dependencies under .agentpm/tools/...

Install a published skill package directly#

agentpm install @zack/incident-commander@0.1.0

This installs:

  • the skill artifact under .agentpm/skills/zack/incident-commander/0.1.0/
  • the skill's resolved tool dependencies under .agentpm/tools/...

Install a published knowledge package directly#

agentpm install @zack/python-docs@0.1.0

This installs:

  • the knowledge artifact under .agentpm/knowledge/zack/python-docs/0.1.0/

Install a published memory package directly#

agentpm install @zack/profile-memory@0.1.0

This installs:

  • the memory artifact under .agentpm/memory/zack/profile-memory/0.1.0/

Install a published profile package directly#

agentpm install @zack/support-style@0.1.0

This installs:

  • the profile artifact under .agentpm/profiles/zack/support-style/0.1.0/

Install a published loop directly#

agentpm install @zack/incident-response-loop@1.0.0

This installs:

  • the loop artifact under .agentpm/loops/zack/incident-response-loop/1.0.0/

Re-resolve and re-download everything#

agentpm install --refresh

Prevent any changes to the resolved set#

agentpm install --frozen
# restores the complete locked package set; leaves agent.lock unchanged

This works in a clean checkout with no .agentpm/ directory, including direct Agent Package and Skill installs:

agentpm install @namespace/agent@1.0.0 --frozen
agentpm install @namespace/skill@1.0.0 --frozen

The lock must already contain the requested package and its full dependency graph. Replay preserves exact kinds, versions and logical digests, including multiple versions of the same Component. Recorded root edges must satisfy the corresponding local or downloaded manifest. Transitive requirements are checked against the locked package set; missing entries are never filled from the Registry's latest versions. A direct selector that matches multiple locked versions needs an explicit version.

Changed ranges, missing dependencies, wrong kinds, unsupported standards and integrity conflicts fail with an error. Graph checks inspect verified archives before replacing installed packages. To intentionally update the graph, edit the authored dependencies and run agentpm install without --frozen, then commit the updated lock.

--frozen does not mean offline: nonempty installs still contact the Registry for authorization, download selection and finalization. Valid cached artifacts can avoid payload downloads. An unavailable Registry still fails safely, even with a populated cache. --refresh --frozen downloads the same pins again and repairs local state without selecting newer versions or rewriting the lock.

An Agent Package with no dependencies installs successfully. For a local dependency-free project, there is no dependency-resolution request; for a direct published Agent Package, the Agent artifact itself is still installed. Neither case implies the Agent is ready to run in the Harness.

Update the manifest’s version range to match your spec#

agentpm install @zack/summarize@0.1.2 --update-range

What install does#

  1. Reads credentials and, for manifest-driven installs, your local agent.json.
  2. Resolves package versions (respecting exact pins or semver ranges).
  3. Fetches download URLs and downloads artifacts.
  4. Chooses install directories by kind:
    • tools → .agentpm/tools/...
    • skills → .agentpm/skills/...
    • knowledge → .agentpm/knowledge/...
  • memory → .agentpm/memory/...
  • profiles → .agentpm/profiles/...
  • loops → .agentpm/loops/...
  • agents → .agentpm/agents/...
  1. Writes updates when installing a direct tool, skill, knowledge, memory, profile, or loop spec in a local agent project (adds or updates tools[], skills[], knowledge[], memory[], profiles[], or singular loop).

Install locations

  • Prepared tools: .agentpm/tools/<namespace>/<name>/<version>
  • Installed skill packages: .agentpm/skills/<namespace>/<name>/<version>
  • Installed knowledge packages: .agentpm/knowledge/<namespace>/<name>/<version>
  • Installed memory packages: .agentpm/memory/<namespace>/<name>/<version>
  • Installed loop packages: .agentpm/loops/<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": 4,
  "packages": {
    "tool:@zack/summarize@0.1.2": {
      "kind": "tool",
      "name": "@zack/summarize",
      "version": "0.1.2",
      "integrity": "dd58…ae6d"
    },
    "skill:@zack/incident-commander@0.1.0": {
      "kind": "skill",
      "name": "@zack/incident-commander",
      "version": "0.1.0",
      "integrity": "c3d9…8f2b"
    },
    "knowledge:@zack/python-docs@0.1.0": {
      "kind": "knowledge",
      "name": "@zack/python-docs",
      "version": "0.1.0",
      "integrity": "f1aa…921b"
    },
    "memory:@zack/profile-memory@0.1.0": {
      "kind": "memory",
      "name": "@zack/profile-memory",
      "version": "0.1.0",
      "integrity": "a8e1…114c"
    },
    "loop:@zack/incident-response-loop@1.0.0": {
      "kind": "loop",
      "name": "@zack/incident-response-loop",
      "version": "1.0.0",
      "integrity": "d9b1…55aa"
    }
  },
  "roots": {
    "local:agent": {
      "name": "research-assistant",
      "version": "0.1.0",
      "tools": ["tool:@zack/summarize@0.1.2"],
      "skills": ["skill:@zack/incident-commander@0.1.0"],
      "knowledge": ["knowledge:@zack/python-docs@0.1.0"],
      "memory": ["memory:@zack/profile-memory@0.1.0"],
      "profiles": ["profile:@zack/support-style@0.1.0"],
      "loop": "loop:@zack/incident-response-loop@1.0.0"
    }
  }
}

What’s in it

  • packages — exact package identities and integrities.
  • roots — local manifest roots and installed registry package roots.
  • integrity — the logical package digest: the archive SHA-256 for a historical single archive, or the canonical release-manifest SHA-256 for a multi-artifact release. The selected payload digest stays in local state.
  • standard and standard_origin — effective APDS identity and either declared or legacy_inferred provenance on packages and represented local roots. These fields do not certify conformance or Runner readiness.
  • generated — timestamp for traceability.
  • lockfile_version — the current format version.

How it’s used

  • On install, the lockfile pins versions and checksums.
  • --frozen will fail if the resolved set would change (protects CI from drift).
  • Without --frozen, --refresh re-resolves and re-downloads; if versions change (e.g., semver ranges), the lockfile is updated accordingly. With --frozen, it re-downloads only the existing pins.
  • Existing v2/v3/v4 locks remain readable. APDS identity/origin metadata requires v4; future versions and unknown structural fields are rejected without rewriting the lock.
  • Ordinary (nonfrozen) installation from an older lock that still used reserved.skills, reserved.knowledge, or reserved.memory rewrites the lock into the modern shape: resolvable entries move into first-class root skills, knowledge, and memory, and migrated reserved entries are removed from the rewritten lock.

Best practices

  • Commit agent.lock to version control.
  • Don’t edit it by hand—change agent.json (or pass a spec) and re-run agentpm install.
  • Use exact pins for production; if using ranges, combine with --frozen in CI.

APDS metadata and CLI upgrades#

Use CLI 0.1.47 or newer on every developer machine and CI image before sharing locks with the additive v4 standard and standard_origin fields. Publish and verify that CLI release is installable before automation or shared projects emit these locks. Earlier CLIs may report an unknown field error for either field; upgrade the CLI instead of editing away provenance. On Homebrew, run brew update && brew upgrade agentpm; on Scoop, run scoop update agentpm.

Historical packages continue to install with the same command and no additional flag. A missing declaration is recorded as legacy_inferred, without changing the immutable archive or adding validation evidence. An explicit unsupported or malformed standard is rejected, never treated as legacy. Ordinary regeneration can therefore extend a lock even when all dependencies are historical. Existing untouched locks are not rewritten solely to add metadata, and --frozen leaves lock bytes unchanged.

Resolve and download responses are derived views. Before committing an installed package, the CLI checks the embedded kind/name/version and declaration against the selected identity, provenance and verified integrity. On a conflict, retry resolution or ask the publisher for a corrected release. Local-root metadata is refreshed from the authored manifest. Selected targets and Python interpreters remain machine-local under .agentpm/.

Python and Node SDK 0.1.17 readers tolerate these additional v4 fields while rejecting unsupported lock versions. Tool invocation still requires a compatible CLI at runtime, including in containers.

Manifest-driven vs direct package install#

agentpm install supports two install sources:

  • Manifest-driven install

    • Run agentpm install in a project with a local kind: "agent" or kind: "skill" manifest.
    • For local agents, AgentPM resolves declared tools[], skills[], knowledge[], memory[], and profiles[].
    • For local skills, AgentPM resolves declared tools[].
    • agent.lock records the local manifest as local:agent or local:skill.
  • 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 a skill, AgentPM installs the skill package into .agentpm/skills/..., then resolves and installs its tools into .agentpm/tools/....
    • If that package resolves to a knowledge package, AgentPM installs the package into .agentpm/knowledge/....
    • If that package resolves to a memory package, AgentPM installs the package into .agentpm/memory/....
    • If that package resolves to a profile, AgentPM installs the package into .agentpm/profiles/....
    • If that package resolves to a loop, AgentPM installs the package into .agentpm/loops/....
    • If that package resolves to an agent, AgentPM installs the agent package into .agentpm/agents/..., then resolves and installs its tools, skills, knowledge, memory, profiles, and loop.
    • agent.lock records installed registry agents, skills, knowledge packages, memory packages, profile packages, and loops with roots like agent:@namespace/name@version, skill:@namespace/name@version, knowledge:@namespace/name@version, memory:@namespace/name@version, profile:@namespace/name@version, and loop:@namespace/name@version.

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.

Private installs#

Private package installs require valid AgentPM auth.

Use one of these:

  • agentpm login for an interactive local session
  • --token <PAT> for a single command
  • AGENTPM_TOKEN for CI or scripts

Example:

agentpm install @namespace/private-tool@0.1.0 --token "$AGENTPM_TOKEN"

If you do not have access to the namespace, install fails safely instead of exposing private package metadata.

Anonymous public installs remain supported. If credentials are supplied but are invalid, expired, or revoked, resolve/download initialization returns 401 instead of silently retrying as anonymous. The CLI reports Credentials rejected and exits 1; update the PAT rather than assuming a private package has disappeared. A valid token without namespace visibility, or an anonymous request for a private package, still receives the normal hidden/not-found result without disclosing its contents.

agent.lock does not grant access#

agent.lock records reproducibility. It does not grant access to private packages.

If a lockfile references a private package, you still need valid AgentPM auth with access to that namespace before install can resolve or download the artifact.

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.

Errors & troubleshooting#

  • Connection failed or timed out. The error names the install operation and server. Check the registry address, network, and server availability, then retry. Use RUST_LOG=agentpm=debug for the underlying transport cause.
  • Kind compatibility. If a declared dependency resolves to the wrong stored package kind, install fails before download or lockfile updates.
  • Unsupported older lock under --frozen. If an older lockfile cannot represent the requested Skill-aware graph, rerun agentpm install without --frozen to regenerate agent.lock v3.
  • Frozen mismatch. If --frozen fails, you’re attempting to change the resolved set. Remove --frozen or commit the intended updates first.
  • Stale cache. If you suspect a bad/corrupt artifact or want to force re-fetch, use --refresh.
  1. Declare tools, skills, knowledge, memory, profiles, and an optional loop in agent.json, or install packages via agentpm install @namespace/name@version.
  2. Run agentpm install locally; commit manifest and agent.lock changes.
  3. In CI, run:
agentpm lint --strict
agentpm install --frozen --quiet