publish#
Validate, package, and upload your tool to the AgentPM registry.
Goal#
Run a dry-run to confirm your package, then publish the real artifact.
0) Namespace required#
Before publishing, you need a namespace.
- Create it on your profile at the AgentPM site.
- Once created, your namespace is automatically applied to any published tools.
- The namespace is linked to your PAT (Personal Access Token), so publishing uses the namespace associated with the token’s account.
New here?
Create an account by signing in at https://agentpackagemanager.com/signUp , then authenticate via agentpm login. You can verify auth anytime with agentpm whoami.
1) Sanity check (optional but recommended)#
Run lint and a packaging dry-run:
agentpm lint --strict
agentpm publish --dry-runWhat you should see:
• Reading credentials…
✓ Reading credentials (0ms)
• Validating manifest…
✓ Validating manifest (3ms) — schema + semantics
• Packaging files…
✓ Packaging files (24ms) — 23866 bytes, sha256: fca0ef9660eb
Dry-run: artifact created at target/agentpm/summarize-0.1.3.tar.gzNote
Lint runs automatically during publish. With --strict, warnings will also block.
2) Publish for real#
agentpm publishTypical successful output:
• Reading credentials…
✓ Reading credentials (0ms)
• Validating manifest…
✓ Validating manifest (2ms) — schema + semantics
• Packaging files…
✓ Packaging files (4ms) — 23866 bytes, sha256: fca0ef9660eb
• Uploading artifact…
✓ Uploading artifact (1.5s) — done
✓ Published summarize@0.1.3
id: 21
url: https://www.agentpackagemanager.com/tools/db32af01-3c9f-47d7-ba91-06638f088531/v0.1.3/overviewWhat gets produced
- A
.tar.gzattarget/agentpm/<name>-<version>.tar.gzcontainingagent.json- your
entrypointtarget - everything matched by
files[](paths/globs preserved)
- A SHA-256 digest is shown and used for integrity on install.
3) Versioning & immutability#
- SemVer only. Bump the
versioninagent.jsonfor changes. - No overwrites. Re-publishing an existing version is rejected—use a new version.
Common options#
# Treat warnings as errors (same as lint)
agentpm publish --strict
# Package without uploading
agentpm publish --dry-run
# Quieter output (useful in CI)
agentpm publish --quietTool execution contract#
For a tool to work with the SDK, it must follow this process protocol:
- SDK writes inputs JSON to stdin.
- Your tool writes one JSON object (final result) to stdout.
- Logs/diagnostics → stderr only.
- Exit code 0 on success (non-zero = failure).
If you break this contract, publish --dry-run may succeed (it only packages), but runtime calls via the SDK will fail. See SDKs → Node/Python for examples.
Troubleshooting#
- Validation failed. Fix the reported issues, or drop
--strictif you’re okay shipping with warnings. - Missing files in the tarball. Ensure
files[]includes built artifacts and thatentrypoint.argspoints to a packaged path. - Interpreter mismatch. Align
runtime.typewithentrypoint.command(e.g.,nodewith a Node entrypoint).
After publishing#
- Install from another project
agentpm install @namespace/summarize@0.1.3- Pin in production. Consumer commits the
agent.lockso installs are deterministic. - Changelog & docs. Keep
descriptionand schema field descriptions sharp—registry pages render from your manifest.