For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Add a plugin
Bundle skills into a plugin, publish it as an image, and attach it to an agent.
A pluginPluginA bundle that an AgentTemplate attaches with spec.plugins. A plugin contains skills and can also declare Model Context Protocol servers. Plugins follow the Agent Plugins specification.Learn more is a bundle of skills that you publish and attach as one unit. An agent attaches the plugin once, and lists the skills that it wants from it. Use a plugin to ship a set of skills together, or to share the same set across several agents.
In this tutorial, you turn the skill from Add a skill into a plugin, publish it, and switch the agent to it. The kagent UI has no page for plugins, so you work from the command line.
Before you begin
Complete Add a skill. This tutorial reuses its
release-notesdirectory, itsDockerfile, and therelease-writeragent.Set the repository for the plugin image. Replace the example value with your own repository.
export PLUGIN_REPO=ghcr.io/<your-org>/release-tools
Build the plugin
A plugin is a directory with a plugin.json manifest at its root and one subdirectory per skill under skills/.
From the
release-notesdirectory, move the skill underskills/in a new plugin directory.cd .. mkdir -p release-tools/skills mv release-notes release-tools/skills/release-notes cd release-toolsAdd the manifest. Copy the
$schemavalue exactly, because kagent rejects any other value. Of the other fields, kagent reads onlyname.cat > plugin.json <<'EOF' { "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "release-tools" } EOF
Publish the plugin
Build the plugin image the same way as a skill image, so that the plugin directory is the root of the image.
mv skills/release-notes/Dockerfile .
docker buildx build --push --platform linux/amd64 -t "$PLUGIN_REPO:1.0.0" .
export PLUGIN_OCI="$PLUGIN_REPO@$(docker buildx imagetools inspect --format '{{.Manifest.Digest}}' "$PLUGIN_REPO:1.0.0")"
echo "$PLUGIN_OCI"Attach the plugin to the agent
Re-apply the AgentTemplate with
pluginsinstead ofskills, and list the skills to enable.kubectl apply -f - <<EOF apiVersion: api.kagent.dev/v1alpha3 kind: AgentTemplate metadata: name: release-writer namespace: kagent spec: modelConfig: name: default-model-config description: Writes release notes from commit subjects. systemPrompt: You help maintainers turn commit history into release notes. plugins: - source: oci: ${PLUGIN_OCI} skills: - release-notes EOFImportant
A plugin enables only the skills that you list. If you omit
skills, or leave it empty, the agent gets none of them, and kagent accepts the empty list without an error.In the kagent UI, click Agents, and wait until the
release-writeragent returns to Ready.Open the agent, start a New chat, and ask
What skills do you have?The agent reportsrelease-notes, the same as before. A chat that you started earlier keeps the version of the agent that it began with, so use a new one.