Why Agent Systems Need a Packaging Layer
The hard part of agent development is not getting an LLM to call a tool once. The hard part starts when that tool needs to be reused, versioned, installed, trusted, and run somewhere else.

- agents
- AI agent tools
- AI agent packaging
- agent package manager
- AI agent infrastructure
- agent interoperability
- reusable AI agents
Why Agent Systems Need a Packaging Layer#
The hard part of agent development is not getting an LLM to call a tool once.
The hard part starts when that tool needs to be reused, versioned, installed, trusted, and run somewhere else.
This is the point where agent development stops looking like prompt engineering and starts looking like software architecture.
You can build a working internal agent today. You can wire up tools, prompts, memory, and a workflow and get something that genuinely helps a team. But the moment another team wants to use that same capability, or the moment you need to move it into production, the real infrastructure questions appear.
- What exactly is this thing?
- How is it versioned?
- What runtime does it require?
- How do I install it on another machine?
- How do I know I am running the same artifact that passed tests in CI?
- How do I move it between frameworks without rewriting it?
Those are not AI questions. They are packaging questions.
And they are arriving for agent systems whether the ecosystem is ready or not.
Why AI Agent Tools Are Hard to Reuse#
Frameworks are not the problem. Most of them are good at what they are trying to do: orchestrating calls, managing loops, and helping developers move from an idea to a working prototype quickly.
The problem comes later.
The moment an agent becomes useful, it stops being a one-off experiment and starts becoming a dependency. Another team wants the same tool. Another service wants the same behavior. A new runtime wants the same capability. And suddenly the thing you built inside one framework is expected to behave like a reusable software artifact.
That is where many teams hit friction.
Octomind, for example, ran LangChain in production for over a year before removing it. Their issue was not that LangChain could not help them get started. It was that once they needed tighter runtime control and better visibility into how tools were selected mid-run, the abstraction became a liability. They ended up rewriting.[1]
That story is not unusual. Teams build on one orchestration framework, discover the limits only after they have real business logic and real integration requirements, and then pay a large rewrite tax to move somewhere else. The deeper problem is not simply framework churn. It is that there is no portable artifact carrying the valuable pieces of the system across that churn.[2]
Research on real-world developer pain points in agent frameworks points in the same direction. A recent analysis of Stack Overflow questions and GitHub issues across major frameworks identified dozens of recurring challenges, with environment, platform, and dependency management ranking at the top. That is exactly what you would expect when reusable capabilities exist, but the ecosystem lacks a shared packaging layer.[3]
So the issue is not that teams cannot build agents.
The issue is that once the useful pieces of those agents need to travel outside the original system, there is no neutral, consistent layer for defining, versioning, distributing, and running them.
What Package Managers Solved That Agent Systems Still Need#
It is tempting to summarize this as “agents need npm.”
That is directionally right, but too shallow.
Package managers did not matter because they made code easy to download. They mattered because they gave ecosystems a shared contract for reuse.
Before package managers, reusable code was often copied into applications, edited locally, manually updated, and rebuilt inside every project that needed it. There was no canonical source of truth. No consistent versioning model. No dependable install flow. No reproducibility guarantee. No trust boundary around what was being pulled into a system.
Package managers changed that.
They gave software teams:
- manifests to define what a package is
- semantic versioning to express compatibility
- lockfiles to make installs reproducible
- registries to distribute reusable artifacts
- dependency resolution to compose packages safely
- shared conventions for trust, integrity, and reuse
These are the pieces worth carrying into agent systems.
The analogy is useful because the mapping is already visible:
| Traditional software | Agent systems |
|---|---|
package.json | agent.json manifest |
package-lock.json | agent.lock lockfile |
| npm / pip / cargo registry | agent registry |
| typed function signature | typed I/O schema |
| dependency install | tool install |
| runtime boundary | managed subprocess/runtime contract |
| semantic versioning | semantic versioning for tools, skills, agents |
The important point is that package managers solved reuse at the ecosystem level, not just the project level.
Agent systems now need the same shift.
The Questions an Agent Packaging Layer Answers#
A packaging layer matters because it makes obvious engineering questions answerable.
1. What exactly is this?#
A reusable agent capability needs a machine-readable contract, not just a README and a code snippet.
That means a manifest that declares:
- name
- version
- description
- kind
- runtime
- typed inputs
- typed outputs
- environment expectations
Without that, every tool is effectively tribal knowledge.
2. What version am I using?#
If an agent capability changes behavior, you need to know whether you are running 0.1.0 or 0.1.4, and whether that change was compatible.
That implies semantic versioning and a lockfile that pins exact resolved artifacts. It also implies install behavior that can fail when the resolved set changes unexpectedly. In other words, the same kind of guarantees software teams already expect from npm ci, pip-tools, or Cargo lockfiles.
3. What runtime does it need?#
Many agent tools are not written in the same language as the application using them.
A Python orchestration layer may need to call a Node-based Slack integration. A Node app may need to invoke a Python document conversion utility. If the runtime boundary is implicit, portability is fragile. If the runtime boundary is explicit, the tool can travel.
That is why runtime metadata matters. A packaging layer should make it clear whether a capability needs Python or Node, which version it expects, and how it is executed.
4. What does it depend on, and can I trust it?#
This is where the difference between a protocol and a packaging layer becomes important.
Protocols like MCP help define discovery and invocation. They are useful. But invocation alone does not answer provenance, integrity, lifecycle, or trust questions. Recent security analysis around the MCP ecosystem has made that gap harder to ignore.[4][5] A system can know how to call a tool and still have no strong answer to:
- where that tool came from
- whether the artifact changed
- whether the installed version matches the tested version
- whether another team can reproduce the same install
Checksums, explicit artifact packaging, version pinning, and reproducible installs are not optional polish. They are what make reuse safe.
5. Can another team install it?#
A reusable capability should not need to be copied out of one codebase and reassembled manually in another.
It should be publishable as an artifact, discoverable through a registry, installable through a standard flow, and runnable with the same contract outside the original project.
That is the difference between a private implementation detail and a reusable building block.
6. Can it run outside the original framework?#
This is where a packaging layer becomes more important than the framework itself.
If a tool only works inside the orchestration system that produced it, then it is not really reusable. It is framework-local.
But if the execution contract is stable, and the runtime boundary is explicit, then the same capability can be loaded into a raw script, a different orchestration stack, or a different language environment entirely.
That is what portability actually looks like.
What an AI Agent Packaging Layer Looks Like in Practice#
This gets much easier to see once you stop talking about “tools” abstractly and look at a real artifact.
Take a Slack messaging tool. In AgentPM, that tool is not just some code in a repo. It is a package with a manifest that tells any caller what it is, what runtime it needs, and how it behaves.
Here are a few real fields from the slack-post-message example tool:
{
"kind": "tool",
"name": "slack-post-message",
"version": "0.1.1",
"runtime": {
"type": "node",
"version": "20"
},
"environment": {
"vars": {
"SLACK_BOT_TOKEN": { "required": true },
"SLACK_API_BASE_URL": {
"required": false,
"default": "https://slack.com/api"
}
}
}
}That already answers several practical questions:
- what the artifact is called
- what version another team is installing
- that it needs Node 20
- which environment variable is mandatory before it can run
The manifest keeps going. It also tells the caller what actions the tool supports, what inputs are required, and what success or failure look like:
{
"inputs": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["post_message", "update_message"]
},
"channel": { "type": "string" },
"text": { "type": "string" }
},
"required": ["action", "channel", "text"]
},
"outputs": {
"oneOf": [
{
"type": "object",
"properties": {
"ok": { "const": true },
"action": { "type": "string" },
"channel": { "type": "string" },
"ts": { "type": "string" }
}
},
{
"type": "object",
"properties": {
"ok": { "const": false },
"error": {
"type": "object",
"properties": {
"code": { "type": "string" },
"message": { "type": "string" }
}
}
}
}
]
}
}That is a much stronger contract than “here is a helper function, good luck.” A Python caller and a Node caller can both read the same definition and know what this tool expects without inventing separate wrappers, hand-written docs, or framework-specific adapters.
The lockfile is what turns that contract into a reproducible install. Here is a real snippet from an AgentPM app lockfile:
{
"dependencies": {
"@zack/slack-post-message": {
"version": "0.1.1",
"integrity": "b72d2c239da44b1e1dfd40b8a6a0a53f958d29ba26f55d9625e85e1652426991"
},
"@zack/github-issues": {
"version": "0.1.1",
"integrity": "b04c929385df7ceb78ab459f9c2104006f286d57f372fc1afa8ec77db00e8935"
}
},
"lockfile_version": 1
}This is the difference between “install the Slack tool” and “install the exact Slack tool artifact we resolved, tested, and pinned.” That distinction matters the moment something moves from a local prototype into CI, production, or another team’s environment.
And then there is the runtime boundary. A packaging layer becomes real when the same artifact can be loaded from different host environments without the host app rewriting it.
In Python, that can look like this:
from agentpm import load
slack_tool = load("@zack/slack-post-message@0.1.1")
result = slack_tool(
{
"action": "post_message",
"channel": "C12345678",
"text": "Deploy complete.",
}
)In Node, it can look like this:
import { load } from "@agentpm/sdk";
const slackTool = await load("@zack/slack-post-message@0.1.1");
const result = await slackTool({
action: "post_message",
channel: "C12345678",
text: "Deploy complete.",
});The host language changes. The execution environment changes. But the packaged artifact stays the same. The manifest stays the same. The version stays the same. The lockfile pin stays the same. That is what a packaging layer buys you.
This is the deeper point: a packaging layer does not replace frameworks. It gives the useful pieces built inside frameworks a portable identity outside them.
That is the lane AgentPM is trying to occupy.
Why Agent Systems Need Packaging Infrastructure Now#
The usual objection is that it is too early.
The agent ecosystem is still moving quickly. Frameworks are changing. Standards are unsettled. Why invest in packaging now?
Because this is exactly when packaging matters.
The rewrite tax is already here. Teams are already discovering that real capabilities are trapped inside framework-local implementations. Vendors are already moving toward their own packaging and registry concepts. The churn in models, runtimes, and frameworks is not an argument against packaging. It is the argument for it.[6][7]
And the broader standards landscape makes the gap clearer, not smaller.
We now have protocols for how agents can invoke tools and communicate with each other. What we still do not have, at the ecosystem level, is a neutral layer for what those reusable capabilities are as artifacts: how they are defined, versioned, distributed, installed, verified, and carried across runtimes.[8]
That layer will exist.
The real question is whether it becomes:
- fragmented across vendor platforms
- tightly coupled to individual frameworks
- or open, portable, and ecosystem-wide
AgentPM is built around the third option.
The Foundation Reusable AI Agent Systems Need#
The history of software ecosystems is clear on this point: reuse does not become durable just because people build capable components. It becomes durable when the ecosystem agrees on packaging, versioning, trust, and installation conventions.
Agent systems are reaching that point now.
The challenge is no longer just how to make an LLM call a tool. The challenge is how to make the reusable pieces of agent systems portable outside the place they were first built.
That means:
- clear manifests
- lockfiles
- semantic versioning
- runtime boundaries
- reproducible installs
- integrity checks
- framework-independent execution contracts
In short, it means a packaging layer.
That is not a nice-to-have around the edges of agent development.
It is the foundation that makes agent capabilities portable, trustworthy, and usable outside the system they were built in.
And if agent systems are going to become part of normal software infrastructure, they will need to be built the way good software teams build everything else: with clear contracts, versioned artifacts, reusable packages, and portable infrastructure.
Sources#
- Octomind, “Why we no longer use LangChain for building our AI agents”
- Tony Kipkemboi, “Agent frameworks are getting squeezed”
- arXiv 2510.25423, “What Challenges Do Developers Face in AI Agent Systems?”
- OX Security, “MCP supply chain advisory: RCE vulnerabilities across the AI ecosystem”
- Nordic APIs, “The weak point in MCP nobody’s talking about: API versioning”
- Microsoft Agent Package Manager (APM)
- Datadog, “State of AI Engineering”
- arXiv 2505.21550 on MCP and A2A in the emerging agent ecosystem