An AI agent plugin is an installable package that adds capabilities to an agent, usually by bundling tools, skills and connection settings for external services into one unit that can be versioned, shared and enabled per environment. The engineering problem is not writing the plugin. It is keeping the plugin layer portable across harnesses, models and sandboxes, so that a capability added once keeps working when the model underneath changes. HarnessRouter treats plugins, skills, tools, memory and sandboxes as configurable building blocks for supported harnesses behind one API, which is the design this article argues for.
HarnessRouter
Build Portable Agent Plugins
HarnessRouter brings plugins, tools, skills and sandboxes together as compatible building blocks for supported harnesses behind one API.
VisitTL;DR
- A tool is a single callable function, a skill is a packaged set of instructions and knowledge that may include scripts, and a plugin is the installable distribution that carries both, plus optional service connections.
- A portable plugin is a directory with a manifest, optional skills and an optional MCP configuration, following the open Agent Plugins specification.
- A plugin is a packaging decision, not a security boundary: permissions, secrets and isolation belong to the runtime that hosts it.
- Plugin architecture can affect reliability, latency and cost, so test plugins across models and under injected faults before production.
- HarnessRouter exposes plugin support, sandboxes and benchmarking through one API, with a free tier and an open-source Community Edition.
What an AI agent plugin is, and what it is not
Three terms are used loosely in agent documentation, and mixing them up leads to design mistakes.
- Tool: an atomic function the model can call at runtime, such as "search tickets" or "write file". It has a name, a schema for its arguments and a return value.
- Skill: a bundle of prompt instructions and reference knowledge that enters the model's context when the agent decides it is relevant. It can also include executable scripts; the host controls whether and how those scripts run.
- Plugin: the installable distribution that packages tools and skills, and often references external services, so they can be found, installed and updated as one unit.
One practitioner write-up of the three layers frames them by their typical failure: tools get called at the wrong time or with wrong arguments, skills produce inconsistent behavior across sessions, and plugins fail through the wrong version being installed or one plugin breaking another. That framing is useful because it tells you what to test at each layer.
Two consequences follow. First, a plugin does not by itself grant any authority. What an agent can actually do depends on the components the plugin includes and the runtime in which they are enabled. Second, because a plugin is a distribution format, it is only worth adopting if it moves between harnesses without rewriting, which is the point of the open specification described next.
Agent plugin architecture: the parts that matter
Agent plugin systems differ in detail, but they can be reviewed across five stages: packaging, discovery, admission, activation and execution. The open Agent Plugins project defines a vendor-neutral v1.0.0 standard for the first of these, and its steering committee includes maintainers from Amazon, Cursor, Microsoft, OpenAI and Vercel. Working from that specification gives you a layout that more than one harness can read.

Packaging
Per the specification, a plugin is a directory with the following structure:
| Component | Location | Required | Purpose |
|---|---|---|---|
| Manifest | plugin.json | Yes | Identity and metadata of the plugin |
| Skills | skills/<name>/SKILL.md | No | Instruction and knowledge bundles, discovered from subdirectories |
| MCP configuration | mcp.json at the plugin root | No | Declares local or remote MCP servers, with required $schema and mcpServers fields |
The specification also uses reverse-domain extension namespaces, so an individual client can add behavior without changing the portable core. If you are designing your own plugins, keep client-specific behavior in those namespaces and the core manifest clean.
Discovery and registration
Discovery is how the host finds plugins: scanning a directory, reading a registry, or accepting an uploaded package. Registration is where the host records the plugin's identity and version. Pin versions at this step. Unpinned plugins are the source of the "wrong version installed" failure described above, and it shows up as behavior drift that is hard to attribute.
Admission, activation and execution
Admission is the decision to allow a plugin into an environment at all. Activation is the moment a skill's content enters the model's context or a tool becomes callable. Execution is the actual call, where arguments are validated, the request is sent to a local function or a remote service, and the result returns to the model. Each stage should be a separate control point in your design, because a decision made at admission (this package is acceptable) says nothing about a decision at execution (this call, with these arguments, is acceptable right now).
How tool plugins connect to the agent
Most tool plugins reach external capability in one of two ways: a local function running next to the agent, or a remote service described by a manifest. The Model Context Protocol (MCP) supports both local stdio servers and remote servers. The plugin's mcp.json names a server, the host connects to it, lists its tools and presents them to the model with their schemas.
Two design choices matter here:
- Dynamic versus pinned tool sets. Resolving tools at runtime keeps the agent current when the server adds functions, but it also means the tool list can change between sessions. A pinned set trades freshness for reproducibility. For production, pin the set and update it deliberately.
- Read versus write confirmation. Calls that only retrieve data still need scoped authorization, especially for sensitive data; calls that modify data should require explicit confirmation or a policy check each time.
MCP defines how an agent talks to tools. It does not define how a whole agent harness is addressed, which is a different layer; the comparison of UHP and MCP and the overview of agent protocols in 2026 explain where each sits.
Adding plugins to an AI agent and testing them across models
A keyword like "add plugins to AI agents" implies a procedure, so here it is. The design steps apply across harnesses, but installation, loading and component support vary; the difference is how much of the surrounding work you carry yourself.
1. Decide the unit of capability
Write down what the agent must be able to do in one sentence per capability, then decide whether each is a tool (a callable action), a skill (guidance on how to do something) or both. A plugin that mixes unrelated capabilities is harder to version and harder to test. Aim for one plugin per coherent workflow, for example "issue triage" or "database migration review".
2. Package it to the open layout
Create the directory with plugin.json, put each skill under skills/<name>/SKILL.md, and add mcp.json if the plugin supplies local or remote MCP server entries. Keep secrets out of every file in the package. Credentials belong in the host's secret store, and the plugin should reference them by name.
3. Install into an isolated environment
Install in a sandbox, not on a developer machine or a shared production host. A plugin can include executable components, so the environment it runs in determines the damage a faulty or malicious one can do. The trade-offs of building that isolation yourself are covered in AI agent sandboxing: build it yourself or get it bundled. On HarnessRouter Cloud, agent tasks run in an isolated sandbox, and the platform includes plugin support and environment provisioning behind the unified interface. Community Edition runs on infrastructure you operate and secure.
4. Configure permissions at the host
Define an application-owned policy: which filesystem paths the agent may touch, which network destinations it may reach, which credentials it may use, which tool names are allowed and which actions need a human approval. Check it at the moment of use, not only at install time.
5. Test across models, not on one
Plugins are where model differences surface. Models vary in how reliably they choose a tool, fill its arguments and follow a skill's instructions. Build a small task suite that exercises every tool and skill in the plugin, then run the same suite against each model and harness you intend to support. Record at least four numbers per run: task success, tool-call error rate, latency and cost. A plugin that passes on one model and fails on another may have an ambiguous tool description, unsupported components or a skill that relies on behavior one model happens to share.
This is the step that is most expensive to do alone, because every harness has its own session handling, file handling and configuration format. HarnessRouter includes benchmarking tools alongside the unified interface, and teams can compare supported harness, model and module configurations for a task by quality, latency and cost, so the same plugin suite can be compared across combinations from one place. The current list of supported agent harnesses shows which ones you can run against.
6. Inject faults before you ship
A plugin that works on the happy path is not yet production-ready. Time out a tool, return a malformed response, drop the connection mid-call, and check whether the agent recovers, using idempotency or reconciliation to detect and prevent duplicate writes. The next section shows why this step pays for itself.
Plugin design and reliability, latency and cost
The question teams ask is whether plugin choices slow the agent down or make it expensive. The published measurements below show how recovery and isolation designs affect particular test workloads; they do not establish universal latency or cost effects.
Reliability. An ACM Queue study of fault-tolerant tool-using agents used an offline toy workload. The author's companion results report 48 scripted tasks per configuration under the medium fault profile with seed 42. A bare agent completed 33.3% of tasks. Adding retries alone raised strict success to 83.3% but created duplicate records. Combining seven patterns (retries, idempotency, timeouts, a circuit breaker, bulkheads, graceful degradation and compensation) reached 89.6% with zero duplicates and zero orphaned writes, and it cut simulated p95 latency from 0.52 s to 0.17 s. These are scripted toy results, not measured live-LLM or production latency.
Isolation overhead. A paper on an agent harness built on a cross-process bus compared it with a single-process reference. On the first 200 BFCL tasks with DeepSeek V4 Flash and one injected fault per task, the single-process design lost every session and scored 1.5% on the official validator, while the cross-process design kept every session alive and succeeded on 120 tasks. A separate local microbenchmark of 10,000 bus hops measured a median 0.215 ms per hop, about 1/823 of the 177 ms median first-token latency from three model calls. This measures local bus transport, not sandbox startup or arbitrary remote execution overhead.
Cost. Retries can increase cost when they repeat model calls or other billed work; the ACM toy study uses estimated token counts rather than billed live-model usage. Idempotency keys and timeouts matter for that reason: they reduce repeated work as well as duplicate records. The cost side is also where routing matters, because model, tool and runtime charges all contribute to cost per successful task. HarnessRouter lets teams compare harness, model and module configurations by cost per successful task; savings depend on the task, baseline and configurations tested.
For deeper treatment, see our guides to measuring and improving agent reliability and to keeping agent sessions alive through failures.

Security: what a plugin system must provide
The central point is that a plugin describes distribution and composition. It is not a sandbox and it is not a permission grant. Several separate controls are needed, and they belong to the host:
- Integrity versus trust. A matching digest shows only that the hashed content is unchanged; a manifest-only digest does not verify every package file. It does not show that the publisher is trustworthy. Treat admission as its own decision.
- Permissions as host policy. Filesystem scopes, network destinations, credential access, tool namespaces and human-approval rules should be defined by the application and checked when an action is attempted. Permission-expanding metadata inside a skill is a request to the host, not a grant.
- Secrets outside the package. Never place API keys or OAuth tokens in
plugin.json, inmcp.jsonheaders or in skill files. Use the host's secret system. - Isolation by default. Run plugin code in a sandbox with only the network and filesystem access the task needs.
- Version control. Pin plugin versions and review updates, so one plugin change cannot silently alter the behavior of others.
The v1.0.0 specification covers packaging, so permissions and secret handling stay with your runtime. With HarnessRouter Cloud, tasks run in an isolated sandbox and you can bring your own model API keys. BYOK routing is free up to $25,000 per month of model usage at listed prices; above that volume, a separate 5% routing fee applies. Platform usage charges still apply. The wider picture of controls, costs and architecture is in AI agents in production.
Where plugins fit in the agent stack
Plugins sit between the harness, which runs the agent loop, and the services the agent reaches. Because they depend on the harness's loading rules and on the model's tool-calling behavior, swapping either one can break a plugin that looked finished. That coupling is the reason to treat the harness, the model and the modules as separate, interchangeable layers, as described in the seven-layer view of the agent stack. The same discipline applies to the people running these workflows: teams that rush agents into daily use without defined checks often end up redoing the work, a pattern discussed in this piece on avoiding rework with AI tools.
Our perspective
Plugins may need rewriting when the plugin was built against one harness and one model, and both changed.
We built HarnessRouter on the view that the harness layer should be open infrastructure. The Unified Harness Protocol (UHP) is the open standard we initiated for that purpose, and it lets supported harnesses, models, providers, skills, tools, plugins, memory and sandboxes be configured as compatible building blocks instead of being fixed at design time.
In practice this means a plugin is evaluated where it will run. Teams can select supported harness, model and module configurations for each task using traces, outcomes, latency and cost, then run them in isolated HarnessRouter Cloud sandboxes. Teams get one API across 30 harnesses and growing, without a separate product integration for each supported harness; HarnessRouter Cloud manages the execution infrastructure.
The measurements above show recovery and local-transport effects in specific test settings; evaluate isolation overhead and session recovery on your own workload. A platform that bundles plugin support, sandboxes and benchmarking removes the integration work that does not differentiate your product.
Run your plugins on HarnessRouter
HarnessRouter is an open-source unified interface and cloud platform for integrating, benchmarking and managing agent harnesses in production through one API. It includes plugin support, agent session management, file handling, environment provisioning and benchmarking tools. The pricing page lists a Free plan at $0 per month, Developer at $20 per month, Production at $200 per month and Scale at $1,000 per month, plus an Enterprise plan with no published price. Tracing is a $50-per-month beta add-on on other plans and is included with Scale; task cost breakdowns are free on every plan. The top-up credit processing fee is 5.5%, with a $0.80 minimum. If you prefer to host it yourself, the Community Edition is the open-source option.

Sources
FAQ
Frequently asked questions
- What is the difference between an AI agent plugin and a tool?
- A tool is one callable function with a schema. A plugin is an installable package that can carry several tools, skills and service connections, with a version and a manifest. You test tools for correct calls and plugins for correct installation, versioning and interaction with other plugins.
- Do plugins work across different models and harnesses?
- They can, if the package follows an open layout such as the Agent Plugins specification, keeps client-specific behavior in extensions and uses component types supported by each client. Behavior still varies by model, because models differ in tool selection and argument filling. Run the same task suite on every model and harness you support.
- Is a plugin a security boundary?
- No. A plugin describes how capabilities are packaged. Effective authority comes from the components it includes and the runtime that enables them, so permissions, secrets and sandboxing must be enforced by the host and checked when each action is attempted.
- Do plugins slow an agent down?
- It depends on the workload. One local bus microbenchmark measured a median 0.215 ms per hop against a 177 ms median first-token latency from three model calls; this is not a sandbox-startup measurement. Retries and failures can also increase latency and cost, so test timeouts, idempotency and circuit breakers.
