NylorunDocsBeta
BuildRunDeployReferenceMore

Plugins

Load an Agent Plugin package as one capability.

Read an Agent Plugin package and attach it with .use(plugin(directory)):

import { Agent, plugin } from "@nylorun/agents";

export const assistant = Agent({
  id: "assistant",
  name: "Assistant",
  instructions: "Use the plugin tools and skills.",
}).use(plugin("./plugins/github"));

plugin(directory) calls loadPlugin and returns one capability:

  • type: "agent-plugin"
  • id is the plugin name
  • optional pluginRoot (stored beside the definition; not part of the manifest hash)
  • optional skills (load_skill / read_skill_resource)
  • optional mcpServers

loadPlugin is the lower-level reader if you want the loaded package and diagnostics before attaching it. Capability diagnostics stay on the returned object; they are not serialized into the public manifest.

MCP servers inside a plugin use the same map shape as mcp(). Runtime discovers those tools on the first turn and pins them on the session.

Next step

On this page