Portable agent format
bnw.agent-manifest/1 is the first Milestone 9 application profile. bnw.agent-manifest/2 extends it with templates (see Version 2), and bnw.agent-manifest/3 adds suggestions for setting up the tools a template needs (see Version 3). It describes a portable agent without binding that agent to one machine, model provider, tool server, or centralized scheduler.
The manifest is an immutable descriptor carried by an ordinary agent.portable capability manifest. The outer BNW capability identifies the publisher and logical subject. The descriptor references immutable instructions and exact stable capabilities required to run the agent.
Version 1 contract
Section titled “Version 1 contract”An agent manifest contains:
- a display name and optional description;
- one immutable instructions content ID;
- 1–64 required roles, each bound to one exact capability ID;
- up to 32 immutable policy content IDs;
- an optional exact memory capability ID; and
- the fixed
agent/runinput/output contract.
Requirement roles are machine-safe local names such as model, search, or finance-data. Roles must be unique. Version 1 uses exact capability IDs deliberately: fuzzy constraints, pricing, ranking, and automatic substitutions require explicit later resolution semantics.
Version 2: slots and labels
Section titled “Version 2: slots and labels”bnw.agent-manifest/2 lets an agent work as a template, wherever suitable tools exist, rather than only with the exact capabilities its author picked:
"requirements": [ { "role": "calendar", "capability_id": "<CAPABILITY_ID>", "slot": { "kind": "tool.mcp", "tags": ["calendar"] } }, { "role": "model", "slot": { "kind": "inference.model", "model": "claude-sonnet-5-5" } }],"categories": ["productivity"],"tags": ["scheduling"]- Requirements. Each one names an exact
capability_id, aslot, or both:- A slot is any capability of
kindthat carries every one of itstags(at most 4). Aninference.modelslot may also name themodelthe capability must serve, compared trimmed and lowercased. - With both, the exact capability is preferred and the slot is its fallback. They must be of the same kind.
- A slot is any capability of
- Labels.
categories(up to 3, from the tool categories) andtags(up to 8, only with a category), so templates can be found in the catalog by what they’re for. - Compatibility. A manifest that uses neither slots nor labels is written as version 1, byte for byte as before. Nodes that predate version 2 cannot read it: they store and relay it, but can’t resolve or run it.
Slots match tools by their publishers’ tags, so tools should be tagged by what they connect to. The recommended tags (bnw_profile::RECOMMENDED_TOOL_TAGS), which the web form suggests, are banking, calendar, civic, code, contacts, crm, documents, email, health, home, identity, maps, markets, media, meetings, messaging, notes, payments, research, shopping, tasks, transit, travel, and weather. Any valid label works; these are conventions.
Version 4: connection slots
Section titled “Version 4: connection slots”A template usually needs a kind of service rather than one tool: a calendar, maps. bnw.agent-manifest/4 adds slots that a whole connection fills: one MCP server, API, or model provider, with all its tools (see Connections).
{ "role": "calendar", "slot": { "kind": "connection", "need": "calendar", "purpose": "Find an evening everyone is free" } }- Fields.
needis one label from the tool vocabulary;purposeis an optional sentence of at most 280 characters, shown to the person choosing a provider. - Rules. A connection slot names no preferred capability, model, or setup suggestions, and only a connection slot names a need.
- Compatibility. A manifest is written as version 4 only when it has a connection slot. Older nodes can’t read it.
- The CLI.
--slot calendar=connection:calendar.
Resolution. A connection slot resolves to, in order:
- The connection chosen for that agent:
agent-slot-fill, kept as the local settingslot-fill:<agent>:<role>. - A connection whose tools are tagged with the need: this node’s own first, then ones others share. Another publisher’s connection counts only when it published the tools too.
- Nothing, with the reason “no connection for
calendaryet”.
Inspection lists the other candidates as options, so the choice can be changed. This node’s connections not tagged with the need come last, as other-connection.
Connecting a new one. When nothing fits, the setup checklist offers connectors tagged with the need: published recipes for connecting a provider, such as Calendly for calendar (see Connectors). Picking one runs its steps in a sheet: getting access, signing in, connecting its tools, and its questions. The new connection then fills the slot, and the answers become the agent’s fixed values for it.
Choosing. Choosing a connection grants the agent agent:invoke-connection:<connection>, which covers every tool of it, including ones shared later. For this node’s own tools, the node also signs its provider grant, as it does for a single tool.
Version 3: setup suggestions
Section titled “Version 3: setup suggestions”A template often needs tools that the person starting from it doesn’t have yet. bnw.agent-manifest/3 lets a tool slot carry up to 3 setup suggestions: where to set up a tool that fills it, and where to get a key.
{ "role": "weather", "slot": { "kind": "tool.rest", "tags": ["weather"], "setup": [{ "kind": "rest", "url": "https://api.weather.gov/openapi.json", "name": "US National Weather Service", "auth": "none", "docs_url": "https://www.weather.gov/documentation/services-web-api" }] } }- Fields.
kind:mcp(urlis a remote MCP server’s Streamable HTTP endpoint) orrest(urlis an OpenAPI document).auth: optional, one ofnone,bearer,api-key, oroauth.key_url: optional, where to sign up or create a key.docs_url: optional, the vendor’s page about it.name: optional, at most 64 characters.
- Rules.
- Suggestions are allowed only on tool slots, and their kind must match the slot:
mcpfortool.mcp,restfortool.rest. - Every URL is
https, with a host and no user name or password, at most 512 bytes. - Unknown fields are refused.
- Suggestions are allowed only on tool slots, and their kind must match the slot:
- Compatibility. A manifest is written as version 3 only when a slot carries suggestions; otherwise it stays version 2 or 1. Nodes that predate version 3 cannot read it, as with version 2 before.
- Trust. Suggestions are the template publisher’s, untrusted like the rest of the manifest. Nothing connects to a suggested server, fetches a suggested document, or signs anything because of one. A person sets one up only by choosing to, under Tools & models, for their own account, the same as an integration an agent proposes.
The CLI takes them as --slot-setup ROLE=mcp|rest,URL[,auth=AUTH][,key=URL][,docs=URL][,name=NAME], once per suggestion, with name= last since it may contain commas:
bnw capability descriptor create-agent weekly-planner.json \ --name "Weekly planner" --instructions <INSTRUCTIONS_BLOB_ID> \ --slot model=inference.model \ --slot tasks=tool.mcp:tasks \ --slot-setup "tasks=mcp,https://mcp.linear.app/mcp,auth=oauth,docs=https://linear.app/docs/mcp,name=Linear" \ --category productivitycapability descriptor inspect lists them as slot-setup: lines, and agent resolve prints them under each slot it couldn’t fill. The agent template skill walks you through writing a template with Claude, including finding and checking suggestions.
Instructions and policies are references, not embedded authority. Their content, confidentiality, availability, and interpretation remain application concerns. A capability reference identifies a signed stable definition; a later resolver must still find acceptable active provider offers and apply local trust and authorization policy.
Create and publish
Section titled “Create and publish”First store the instructions and any policy documents as immutable BNW blobs. Record the printed blob IDs:
bnw blob put agent-instructions.md --media-type text/markdownbnw blob put agent-policy.json --media-type application/jsonCreate the portable manifest. Repeat --require for every exact dependency and --policy for every policy object:
bnw capability descriptor create-agent portable-agent.json \ --name "Portable research agent" \ --description "Researches a topic using fixed model and search capabilities" \ --instructions <INSTRUCTIONS_BLOB_ID> \ --require model=<INFERENCE_CAPABILITY_ID> \ --require search=<SEARCH_CAPABILITY_ID> \ --policy <POLICY_BLOB_ID> \ --memory <MEMORY_CAPABILITY_ID>For a template, give slots as ROLE=KIND[:TAG,TAG][@MODEL], and labels with --category and --tag. A --require and a --slot for the same role make that capability preferred, with the slot as its fallback:
bnw capability descriptor create-agent weekly-planner.json \ --name "Weekly planner" \ --instructions <INSTRUCTIONS_BLOB_ID> \ --slot model=inference.model \ --slot calendar=tool.mcp:calendar \ --require tasks=<TASKS_CAPABILITY_ID> --slot tasks=tool.mcp:tasks \ --category productivity --tag schedulingThe command sorts requirements and policies into their deterministic representation, validates every identifier and bound, stores the descriptor locally, and prints its content ID.
Validate, inspect, and publish it:
bnw capability descriptor validate portable-agent.jsonbnw capability descriptor inspect <AGENT_DESCRIPTOR_ID>bnw capability publish agent.portable <AGENT_DESCRIPTOR_ID>Another peer can discover and follow the agent through the existing bounded capability path:
bnw capability discover agent.portablebnw capability list --kind agent.portablebnw capability inspect <AGENT_CAPABILITY_ID>bnw capability follow <AGENT_CAPABILITY_ID>Publishing an agent manifest does not execute it, grant access to its dependencies, or endorse their providers. Version 1 establishes the immutable portable definition. Local resolution checks each exact requirement against canonical manifests and active provider offers while retaining missing and policy-rejected outcomes rather than hiding them behind a global scheduler.
Resolve dependencies
Section titled “Resolve dependencies”After following and synchronizing every referenced capability, resolve the agent locally:
bnw agent resolve <AGENT_CAPABILITY_ID>The resolver validates each exact capability and descriptor, ignores expired and zero-slot offers, collapses offer renewals by provider, and selects a stable local candidate. For a requirement with a slot, it then works as follows:
- Preferred first. A named capability that has a usable offer is chosen (
via=preferred). - Then the slot. Otherwise the resolver looks through up to 32 matching capabilities in this node’s catalog: available ones of the slot’s kind, carrying its tags, serving its model, not blocked, most used first. It picks the first with a usable offer under the same rules (
via=slot). - Or a reason. When neither yields an offer, the reason names what is missing, such as “no capability
tool.mcptagged maps on the network yet”.
Inspecting a template (agent-manifest-inspect, as its page in the web client and the app do) also lists options for each tool slot nothing fills, in this order:
network: up to 5 available tools of the slot’s kind that carry some of its tags, the close matches.setup: the template’s suggestions.directory: up to 2 directories this node knows, which are tools taggeddirectorythat list MCP servers and APIs.
Routing policy, rankings, and credit constraints apply to slot candidates as they do to exact capabilities. Economic constraints are optional:
bnw agent resolve <AGENT_CAPABILITY_ID> \ --credit-issuer <ISSUER_BNW_ID> \ --max-per-invocation-micros 5000000Prices are compared only within one issuer’s service-credit system. See ECONOMICS.md. Resolution does not invoke dependencies, reserve credits, or grant authority.
In the web client
Section titled “In the web client”Capabilities → Provide a capability → Agent publishes a manifest: name, description, instructions, categories and tags, and requirements by role. Each requirement is picked from the catalog, given as “any <kind> tagged …”, or both. The node stores the instructions as a blob, sorts the requirements by role, and publishes the capability, as capability descriptor create-agent and capability publish agent.portable do. The form warns when no inference.model requirement is present.
The requirement picker filters the catalog by kind on the node and by name in the browser, and can load more pages.
Policies, memory, and the run contract, a collapsed section of the form, covers what the CLI flags do:
- Policies. Texts separated by a line holding only
---, at most 8 from the web client. Each becomes an immutable blob, and the manifest lists their content IDs, sorted. - Memory. An exact memory capability.
- The
agent/runcontract. Media types, size limits, privacy, and optional JSON Schemas.
Published agents appear under My capabilities. They need no offer or backend, because they run on whichever node adopts them.
An agent.portable capability’s page shows the instructions, fetching them from peers when missing. The publisher’s node, and every node that follows the agent, serves its instructions and policies, so they can be fetched while the publisher is offline. It also shows each requirement with the provider and terms the resolver would choose, or the reason there is none. For a slot, it says what the slot asks for and whether the capability was the preferred one or found in the catalog. The iPhone app shows the same, read-only.
Publish an agent you host
Section titled “Publish an agent you host”An agent hosted on your node can be published as a portable agent from its page: Publish as portable agent opens the Agent form, filled in from how the agent runs now. The form includes its name, its instructions (or the built-in ones), its model as the model requirement, and each tool its operators let it use as tool-1, tool-2, and so on. A manifest names at most 63 tools while a hosted agent may be granted 256, so the draft keeps the first 63 by capability ID and says so. Review it, then publish.
- Signing. The node signs the manifest as its publisher and names the hosted agent as its subject, so the catalog shows which agent it describes. The agent’s own key first delegates
capability:publishto the node for a year, renewed on a later publish when less than a month remains. Other nodes verify that delegation before they show the node’s authority over the agent. - Access. Publishing grants nothing. Whoever runs the agent needs their own access to its model and tools.
- Instructions. They become a blob anyone who finds the agent can fetch, so keep secrets out of them.
Run on this node
Section titled “Run on this node”Run this agent here (or bnw agent runtime --from-manifest <AGENT_CAPABILITY_ID> [--enable]) configures the node’s agent runtime from the manifest:
- the instructions;
- its
inference.modelrequirement as the model (preferring the rolemodel), whether named exactly or found through a slot; - the resolved provider of that model.
It is refused in these cases, with the reason shown:
- the instructions are not local yet;
- they exceed the runtime’s 8 KiB limit;
- there is no model requirement;
- the model has no offer;
- the only offer belongs to the node’s own identity, which cannot invoke itself.
Other requirements are tools. The agent’s operators still decide which of them it may use, through agent:invoke grants.
To start a new hosted agent from a portable agent, go to Agents → New agent → Start from an agent. The list shows the portable agents in your catalog, such as the templates, and searches them by words. It shows what the chosen agent needs and what fills each requirement here, or how a missing one could be filled. Copy it creates the agent and sets its runtime up from the template, as Run this agent here does, with answering off. It then opens the agent’s page.
Filling what a template needs
Section titled “Filling what a template needs”On the page of an agent started from a template, a Set up checklist lists its model and what it needs, with how many are ready:
- A connection slot (version 4) shows what it’s for and why.
- Once filled, it names the connection, with Change.
- Otherwise it lists your connections and ones shared with you to Use, plus Connect a new … service. That opens Tools → Connect with the slot’s need as the tag, so the new connection is offered when you come back.
- Choosing one grants the agent the whole connection.
- A tool slot (versions 2 and 3) works tool by tool:
- Found. A tool on your network fills it. Let it use this grants it to the agent (
agent:invoke). - Missing. It lists the inspection’s
options:- Close matches on your network, each with Let it use this.
- The template’s suggestions. Get a key opens the suggestion’s key page. Set it up opens Tools → Connect for the MCP server or OpenAPI document, filled in with its address and sign-in. You store the key as a provider secret, or sign in with OAuth, as for any tool. The tool is connected for your own account only and tagged with the slot’s tags, so the slot finds it, and a link leads back to the agent to let it use it.
- Directories to look in.
- Found. A tool on your network fills it. Let it use this grants it to the agent (
The iPhone app shows the same for each missing slot: the close matches, and the suggestions with a Get a key link. Tools run on a computer, so you set them up there.
