As you dive into agentic development, sooner or later you’ll run into the need to share and manage those resources effectively. Plugins are a big part of that discussion, but how do you know which versions are in use, and how can you ensure everyone on your team has the same setup? Tools like GitHub Copilot and VS Code have configuration mechanisms that help manage some requirements, but they don’t fully cover some features such as transitive dependencies, lockfiles, or versioning.
Microsoft’s Agent Package Manager (APM) is designed to make sharing these customizations more like managing software dependencies: declare what you need, record what you installed, and reproduce it elsewhere.
A package manager for agent customizations
APM allows you to treat agentic resources – such as skills, instructions, agents, hooks, Model Context Protocol (MCP) server definitions, and plugins – as dependencies that are installed at development time. You declare dependencies in apm.yml; APM resolves them, downloads their content, and deploys supported resources where each target harness expects to find them.
To start, run apm init. This creates the apm.yml manifest that stores your settings. If you’re familiar with npm, this is very similar to creating a minimally configured package.json. It defines the current application and its dependencies.
After that, you can use the apm command line to manage dependencies. For example, to add a plugin marketplace, run apm marketplace add https://github.com/mycorp/my-marketplace. Then use apm install --verbose my-tool@my-marketplace --target copilot to install it for the Copilot harness. Under the covers, this does several things:
- Adds the marketplace to
$APM_HOME/marketplaces.json(on Linux,~/.apm/marketplaces.json). - Configures
apm.ymlwith the new plugin dependency. This file should always be committed; it defines the desired state of your application’s dependencies. - Adds
apm_modules/to.gitignore, then downloads a copy of the plugin to that folder. You’ll want to commit the updated.gitignoreto ensure nothing inapm_modulesis accidentally added to version control. - Places the plugin contents in
.agents/plugins/<plugin-name>/(APM currently recommends committing this folder to version control so they are managed by APM but do not require APM to be used) - Since the target is Copilot, it configures
.github/copilot/settings.jsonwith the marketplace and plugin details, pointing to the local plugin path in.agents/. - Writes an
apm.lock.yamlthat resolves the plugin, its location, its installation path, its commit SHA, and SHA-256 hashes for the package and deployed files. This allows you to useapm install --frozento directly download and validate the plugin without needing the marketplace available – perfect for CI. Similar tonpm, you should always commit the lock file.
If you prefer to register the marketplace in the apm.yml so it’s always available as a project dependency, you can manually edit the file to include something like this:
If that’s placed in the project’s apm.yml, then APM will use these entries for the resolution. While the version field is not required, it’s strongly recommended. It pins the plugin to a specific SHA commit, ensuring consistent and reproducible installations across different environments. If you don’t include a version, you will receive a warning that apm.lock.yaml has pinned the commit, but it was unpinned in the definition. It will encourage you to either pin it or put a semver range (such as #^1.0.0) to indicate the desired version range. Of course, mutable version ranges are a potential security risk, so use them with care!
The lockfile includes indirect dependencies
Your project may depend on a package that itself depends on another package. APM resolves those transitive dependencies too, and records them in the lockfile. That way, the dependency you didn’t list directly is still pinned to the same commit and file contents on another machine.
APM installs one version of a package at a time. If two dependencies require different commits of the same package, installation will fail and you’ll need to fix the issue in your apm.yml file. You can use apm deps tree to inspect the dependency graph and apm deps why <package> to find why a dependency is present.
What it requires
Microsoft’s documentation walks through installation, but it requires a few dependencies to work. For example, it will fail with an error that content was not found if you don’t have git installed and available in your PATH; it relies on Git to fetch package content from repositories. It can also fail to install packages if it cannot detect any available harnesses, so ensure that your harness (such as copilot) is available in your PATH.
And there’s some governance
APM also supports governance via repositories, using specific repositories to retrieve the apm-policy.yml configuration file:
- GitHub uses the first available of
<org>/.github-private,<org>/.github,<org>/.apm,<org>/_apm - Azure DevOps looks for an
apm-policyrepo in theapmproject of the organization. - GitLab uses the
apm-policyproject in the top-level group, combining it withapm-policyfrom every subgroup down the hierarchy to the current project - You can define a path or https URL for retrieving an
apm-policy.ymlfile usingapm install --policy <path-or-url>.
This policy file allows you to create allow/deny lists for dependencies and it supports * and ** wildcards for matching paths. For local development, this can gate the dependencies that it can use. For CI purposes, you can use apm audit --ci --policy org -f sarif -o apm.sarif to report violations and write them to a SARIF-formatted file for tools such as GitHub Code Scanning. By default, it warns for violations; configure the policy with enforcement: block when you want the audit to fail the build.
The policy file also has another valuable feature – it has settings such as executables, mcp, dependencies that enable you to allow list or deny packages, MCP servers, and executables (binaries, hooks, MCP servers, etc.). This gives organizations some limited control over what APM will be willing to install into the environment. In addition, it can be used to restrict whether unmanaged content – such as .github/agents/my-agent.md – is allowed or not; combined with the audit capability, this can be used to flag unauthorized content and block it from passing CI.
It’s a fairly young product, so it is still maturing and evolving – it’s no surprise there are a few issues at the moment. For example, I don’t know of any way to apply the MCP allow list to Agent Plugin 1.x plugins. In fact, there’s no easy way to deny all MCP servers except those using HTTPS to a specific domain or restrict the allowed MCP servers to those in specific plugins. You can, however, declare and approve MCP servers on their own if they are not managed by a plugin. There is also no granular control within the executables configuration; that is, you cannot deny just the hooks or approve only the language servers in a plugin. For a plugin, it’s all-or-nothing.
You’ll want to review the features and open issues on the APM GitHub repository to stay informed about other limitations and planned improvements.
Agentic packaging
With APM, you can declare agentic dependencies, lock their versions, and install them consistently across environments. It also verifies package integrity, resolves transitive dependencies, and applies policies that control what can be installed. Together, these features make it easier to share and manage agent customizations while giving your organization more control over their use.
