Pāriet uz saturu

Build an extension

Anyone can extend a mintbot agent. Extensions use the open Agent Extension Protocol (AXP): you publish one signed file, agent-extension.json, that says who you are, what the extension provides, what access it needs and how to install it. Every mintbot agent, and any other host that reads AXP, can then install it, show its owner what it asks for, keep it up to date and prove who signed it. There is no account to open with us and no review queue to wait in: your domain is your identity.

Specification SPEC.md, draft v0.5, MIT licence
Tooling the axp command line tool, from mintbot-ai/agent-extension
Catalog axp.cat, where you can also submit a package
Runtime on a mintbot agent hermes, falling back to the runtime-neutral posix target
Extension ID <your domain>/<name>, e.g. extensions.your-domain.com/hello

What an extension can bring

An extension declares its parts under provides. Ship only what you need:

Part For example
skills an instruction pack the agent loads when the topic comes up
mcp_servers an MCP server with tools of its own, stdio or http
tools native agent tools, as a Hermes plugin
services a background daemon, such as a database the extension needs
memory a memory backend: graph, vector, key-value
channels a bridge to another messaging app
cron a scheduled job
settings_section, panel_views a section of its own in the panel's Settings, and views in the panel

The full list with every field is in SPEC §4.2.

What the owner sees

The agent's owner installs an extension by asking for it in chat (“install extensions.your-domain.com”) or under Settings → Agent extensions → Install an extension. A domain, a manifest URL or a GitHub repository all work. Then:

  1. The agent fetches your manifest and checks its signature.
  2. The panel shows a consent card with everything you declared: network access, files, root, your reason, the update policy and how far the install is sandboxed. Nothing runs until the owner presses Allow & install.
  3. The install runs, and the extension appears under Installed extensions with its badges: Signed, Sandboxed or Partly sandboxed.
  4. Every night the agent checks for a newer release and follows the owner's choice: Automatic, Notify me, Pin this version or Off.

1 Get the tool

The axp tool needs Python 3.10 or newer:

pip install "axp[crypto] @ git+https://github.com/mintbot-ai/agent-extension"

Nothing it does uploads or publishes anything: init, check, pack, sign and release all work on local files.

2 Start from a template

axp init --template mcp --publisher extensions.your-domain.com \
  --name hello --description "A greeting MCP server" --dir hello
cd hello

Use a domain you control. There are four templates, each a working example with its install, uninstall and health scripts:

Template You get
skill a skill, payload/SKILL.md
cli a tool, a small Python command
mcp a stdio MCP server with one greeting tool
service a loopback HTTP service with a health endpoint

Write your extension into payload/, then fill in the manifest. Two parts deserve care:

  • permissions: every host your code talks to (network_egress), every listener it opens, the files it touches and whether it needs root, plus a reason in plain words. The owner reads this before saying yes. Declare only what you use: on a mintbot agent, scripts and services that try to go further are stopped.
  • targets: the template writes a posix target, which every AXP host can run. Add a hermes target when the extension should plug into the agent itself, for example to register its MCP server in the agent's config or load a plugin. The Hermes runtime profile lists what a mintbot agent does with each part.

3 Pack and sign

axp pack                                    # dist/package.tar.gz, from the files listed in axp.toml
axp keygen --out ../hello-signing.key       # once; prints your public key
axp release agent-extension.json --key ../hello-signing.key
axp verify agent-extension.json --artifact dist/package.tar.gz
axp check

release sets the version, writes the artifact's SHA-256 digest, stamps the dates and signs the manifest. check says plainly whether the package is ready to publish, and what to fix if it isn't. For the next version, change the payload, run axp pack --force, then axp release agent-extension.json --bump patch --key ../hello-signing.key.

Keep the signing key

Hosts pin the key that signed your first release and accept updates only when it signs them again. Keep hello-signing.key out of the repository and back it up. To change keys later, announce the new one and sign a release with both, as in SIGNING.md.

4 Publish

Upload the artifact under the versioned file name the manifest gives (hello-0.1.0.tar.gz), then publish the manifest in one of three ways:

  • at https://<your domain>/.well-known/agent-extension.json;
  • from a page on your domain with <link rel="agent-extension" href="…"> in its <head>;
  • as an asset of a GitHub release. A repository isn't your domain, so serve your public key at https://<your domain>/.well-known/agent-extension-keys.json too. axp keydir writes that file.

Several extensions on one domain: give each manifest an address of its own and put one <link rel="agent-extension" href="…"> per extension in the <head> of your home page. Someone who installs by your domain alone is then shown all of them and picks; each manifest's own address installs that extension directly. The first link is what the bare domain resolves to on a host that reads only one.

Check what a host will see:

axp resolve https://github.com/you/hello

5 Try it on an agent

Tell your mintbot agent “install extensions.your-domain.com”, read your own consent card and press Allow & install. Under Settings → Agent extensions → Installed extensions, Details shows what was installed, the sandbox actually applied to each part and the installer's steps if one failed.

6 List it in the catalog

Paste your domain, manifest URL or repository into axp.cat/submit. The gate fetches your package the way a host would, runs the same checks as axp validate and axp verify, and lists it in the catalog when it passes. Submitting again replaces the listing with your current release.


How a mintbot agent sandboxes an extension

What you declare in permissions is what the agent enforces:

  • Install, upgrade and uninstall scripts run as short-lived systemd units. The file system is read-only apart from the extension's own directories and the scopes you declared, and the network is reachable only through a proxy that lets through your own hosts and those you listed in network_egress. A script that needs root gets the whole file system, and the consent card says that too.
  • Services and stdio MCP servers run contained in the same way, each extension behind its own egress proxy.
  • Code loaded into the agent process, such as a Hermes plugin's tools, hooks or channels, can't be contained. The consent card says so, and the owner decides knowing it.
  • Asking for more later asks again. An update that widens the declared access waits for the owner's approval instead of installing on its own.

Good to know

  • Versions only move forward. Updates go only to a higher version; going back is the owner's own choice. A release past its valid_until date is no longer offered as an update, and once the installed one expires the agent warns that the extension may be held back. axp release sets the date 180 days ahead, so publish a fresh release before then.
  • One manifest, many runtimes. The same file can carry targets for other agent runtimes too, so one package serves every AXP host, not only mintbot.
  • Selling an extension is possible: AXP defines a signed entitlement the host presents to download the paid artifact, while payment stays yours. See COMMERCE.md.
  • Worked examples: mintbot-ai/graph-memory, and the packages in the catalog.