A skill that only runs in your terminal is not yet something an authorized AI agent can discover, call, and pay for. On a B2A marketplace, the missing piece is often a small, documented HTTP contract in front of work you already run yourself.
I build OpenAny, a B2A marketplace in the Business-to-Agent sense — selling to an agent that acts for a person or an organization, not the older Business-to-Administration sense. This article is a local, self-contained example of that packaging step. It is not a listing walkthrough, not an official OpenAny SDK, and not a promise that a listing will sell.
The longer seller guide lives on the OpenAny Blog. Use that for Seller Console binding, pricing, and publication. Keep this file for the runtime contract you can test on your own machine first.
What you are wrapping
OpenAny’s seller docs distinguish two products. A downloadable template gives the buyer files or a package to run in their environment. A callable service is work you run, through an endpoint you control, that returns an agreed result. OpenAny connects the two sides. It does not host or operate your bot, skill, or external service.
This example wraps the official illustrative Competitor research skill from those docs: the buyer sends an industry, a region, competitor names, and a question; you return a comparison, source links, a brief, and explicit gaps. The sample is not a listing we have sold. The server below does not search the web and does not call a paid API. It answers from a hard-coded example set so you can inspect the contract locally, at no charge.
A Hermes agent, a Grok Bot, or any other bot follows the same rule: it is sellable as a callable service only if you can expose a trigger and return a result. Uploading a template is not the same as selling remote execution.
The path of a call — and where this demo sits
Conceptual flow, not a product screenshot. The buyer’s agent and your service both run outside OpenAny. Charges follow the listing’s billing unit and charge conditions; payment does not have to be a separate step before every call. Same diagram as the main blog guide.
The local server in this article stands in only for the box on the right: your endpoint executes. It does not implement OpenAny routing, metering, buyer authorization, or Seller Console binding. Sign-in is not permission to spend; a person still has to authorize a budget before a paid call. Those steps belong in the main guide.
An illustrative contract, not an OpenAny schema
The JSON below is a sample payload for this skill. It is not an OpenAny platform API contract, not a required field list, and not a live route. The public seller docs do not publish one fixed request/response schema that every listing must use. Field names such as ok, coverage, and error.code belong to this illustration. Example company names are fictional.
Request:
{
"industry": "developer tools",
"target_region": "Southeast Asia",
"competitor_names": ["ExampleCo", "Sample Labs"],
"question": "How do these companies describe their agent integrations in public, and where is the evidence thin?"
}
A useful result states sources, freshness, and coverage, not only a paragraph of prose. A useful failure is a business error you have already described — for example, a region outside published coverage — not a crashed process disguised as an empty brief.
One charge-rule warning, because it is easy to get wrong: in a 17 November 2026 Seller Console recording, the visible default charge condition was “HTTP status is 200–299”. Seller Terms say an HTTP success status alone does not establish that you delivered the agreed result. If this demo returns HTTP 200 with "ok": false for an out-of-scope request, that is a contract choice you must publish. If your charge rule is “HTTP 200–299”, that response could be billed. Either use a charge condition that matches agreed delivery, or return a non-success status when you do not intend to charge. Do not invent a platform-wide rule beyond what your listing says.
A local adapter you can actually run
The complete script is below (Python 3 standard library only). Save it as dev-local-demo.py on your own machine if you want to run it. It binds to 127.0.0.1. The default port 8765 is a local example only — not an OpenAny port. If that port is busy, pass --port and use the same value in the curl commands. There is no go-live command, no official timeout, and no installable OpenAny client in this file.
#!/usr/bin/env python3
"""Local demonstration only.
This is not an OpenAny SDK, not a Seller Console binding, not a live listing,
and not a billed call. It shows how a local function can sit behind a JSON
HTTP contract on your own machine.
The default bind address is 127.0.0.1. The default port 8765 is only a local
example; change it with --port if that port is busy. It is not an OpenAny port.
Example company names and URLs are illustrative. The handler does not call
paid APIs or the public internet.
"""
from __future__ import annotations
import argparse
import json
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
# Example coverage only — not a production catalog.
ALLOWED_REGIONS = {"Southeast Asia", "North America"}
EXAMPLE_PUBLIC_PAGES = {
"ExampleCo": "https://example.com/docs/agents",
"Sample Labs": None,
}
def handle(payload: dict, include_usage: bool) -> tuple[int, dict]:
industry = payload.get("industry")
region = payload.get("target_region")
names = payload.get("competitor_names")
question = payload.get("question")
if (
not industry
or not region
or not question
or not isinstance(names, list)
or not names
or not all(isinstance(n, str) and n.strip() for n in names)
):
return 400, {
"ok": False,
"error": {
"code": "INVALID_INPUT",
"message": "industry, target_region, competitor_names, and question are required.",
},
}
if region not in ALLOWED_REGIONS:
return 200, {
"ok": False,
"error": {
"code": "OUT_OF_SCOPE",
"message": "The requested region is outside the published coverage. No research was run.",
},
"coverage": {
"as_of": "2026-11-18",
"limits": "This local demo only accepts the example regions Southeast Asia and North America.",
},
}
comparison = []
gaps = []
for name in names:
url = EXAMPLE_PUBLIC_PAGES.get(name)
if url:
comparison.append(
{
"name": name,
"finding": "Public docs describe an official agent integration.",
"source_urls": [url],
}
)
else:
comparison.append(
{
"name": name,
"finding": "No comparable public integration page was found in the local example set.",
"source_urls": [],
}
)
gaps.append(
f"No public pricing page for {name} was found as of the coverage date."
)
body = {
"ok": True,
"brief": "Local simulation only: results come from a fixed example set, not a live web search.",
"comparison": comparison,
"evidence_gaps": gaps,
"coverage": {
"as_of": "2026-11-18",
"sources": "Hard-coded example pages in this demo (example.com). Not a live crawl.",
"limits": "English-language public web only in this illustration; not complete, real-time, or legally cleared.",
},
}
# usage.count is shown only when requested. A fixed-price brief does not need it.
# The shape matches the 17 November 2026 Seller Console helper; this demo does not bill anyone.
if include_usage:
body["usage"] = {"count": len(names)}
return 200, body
class Handler(BaseHTTPRequestHandler):
def log_message(self, fmt, *args):
print("[demo]", self.address_string(), "-", fmt % args)
def _send(self, status: int, body: dict) -> None:
raw = json.dumps(body, ensure_ascii=False, indent=2).encode("utf-8")
self.send_response(status)
self.send_header("Content-Type", "application/json; charset=utf-8")
self.send_header("Content-Length", str(len(raw)))
self.end_headers()
self.wfile.write(raw)
def do_POST(self) -> None:
if self.path.split("?", 1)[0] != "/brief":
self._send(404, {"ok": False, "error": {"code": "NOT_FOUND", "message": "POST /brief only."}})
return
length = int(self.headers.get("Content-Length") or 0)
try:
payload = json.loads(self.rfile.read(length).decode("utf-8") or "null")
except (UnicodeDecodeError, json.JSONDecodeError):
self._send(400, {"ok": False, "error": {"code": "INVALID_JSON", "message": "Body must be JSON."}})
return
if not isinstance(payload, dict):
self._send(400, {"ok": False, "error": {"code": "INVALID_JSON", "message": "JSON object required."}})
return
include_usage = self.path.endswith("?usage=1") or payload.get("include_usage") is True
status, body = handle(payload, include_usage)
self._send(status, body)
def main() -> None:
parser = argparse.ArgumentParser(description="Local JSON contract demo (not an OpenAny service).")
parser.add_argument("--host", default="127.0.0.1", help="Bind address (default: 127.0.0.1).")
parser.add_argument(
"--port",
type=int,
default=8765,
help="Local example port only (default: 8765). Change it if the port is busy. Not an OpenAny port.",
)
args = parser.parse_args()
server = ThreadingHTTPServer((args.host, args.port), Handler)
print(f"Local demo listening on http://{args.host}:{args.port}/brief", flush=True)
print("This is a machine-local example. It is not an OpenAny endpoint and does not bill.", flush=True)
try:
server.serve_forever()
except KeyboardInterrupt:
print("\nStopping local demo.")
server.shutdown()
if __name__ == "__main__":
main()
Start it:
python3 dev-local-demo.py --host 127.0.0.1 --port 8765
The important part is the handler: validate inputs, reject out-of-scope work without pretending to research it, and return coverage notes. The field usage.count is omitted for a fixed-price brief. It appears only when you pass "include_usage": true, in the shape shown by the Seller Console helper on 17 November 2026. This demo does not bill anyone.
ALLOWED_REGIONS = {"Southeast Asia", "North America"}
EXAMPLE_PUBLIC_PAGES = {
"ExampleCo": "https://example.com/docs/agents",
"Sample Labs": None,
}
def handle(payload: dict, include_usage: bool) -> tuple[int, dict]:
industry = payload.get("industry")
region = payload.get("target_region")
names = payload.get("competitor_names")
question = payload.get("question")
if (
not industry or not region or not question
or not isinstance(names, list) or not names
):
return 400, {
"ok": False,
"error": {
"code": "INVALID_INPUT",
"message": "industry, target_region, competitor_names, and question are required.",
},
}
if region not in ALLOWED_REGIONS:
return 200, {
"ok": False,
"error": {
"code": "OUT_OF_SCOPE",
"message": "The requested region is outside the published coverage. No research was run.",
},
"coverage": {
"as_of": "2026-11-18",
"limits": "This local demo only accepts the example regions Southeast Asia and North America.",
},
}
comparison, gaps = [], []
for name in names:
url = EXAMPLE_PUBLIC_PAGES.get(name)
if url:
comparison.append({
"name": name,
"finding": "Public docs describe an official agent integration.",
"source_urls": [url],
})
else:
comparison.append({
"name": name,
"finding": "No comparable public integration page was found in the local example set.",
"source_urls": [],
})
gaps.append(
f"No public pricing page for {name} was found as of the coverage date."
)
body = {
"ok": True,
"brief": "Local simulation only: results come from a fixed example set, not a live web search.",
"comparison": comparison,
"evidence_gaps": gaps,
"coverage": {
"as_of": "2026-11-18",
"sources": "Hard-coded example pages in this demo (example.com). Not a live crawl.",
"limits": "Not complete, real-time, or legally cleared research.",
},
}
if include_usage:
body["usage"] = {"count": len(names)}
return 200, body
The HTTP server in the same file only accepts POST /brief and never leaves your machine. Copy the script, then run the checks below against whatever local port you chose.
In-scope example (HTTP 200, ok: true, example.com sources only):
curl -sS -H 'Content-Type: application/json' -d '{
"industry": "developer tools",
"target_region": "Southeast Asia",
"competitor_names": ["ExampleCo", "Sample Labs"],
"question": "How do these companies describe their agent integrations in public, and where is the evidence thin?"
}' http://127.0.0.1:8765/brief
Out-of-scope example (HTTP 200, ok: false, OUT_OF_SCOPE — see the charge-rule warning above):
curl -sS -H 'Content-Type: application/json' -d '{
"industry": "developer tools",
"target_region": "Antarctica",
"competitor_names": ["ExampleCo"],
"question": "Example question only."
}' http://127.0.0.1:8765/brief
A malformed body should not look like a brief. In this demo it returns HTTP 400 and INVALID_INPUT.
These checks were run locally on 18 November 2026 against a copy of the script on 127.0.0.1 (the example port was already in use on the test machine, so a different local port was used). All three outcomes matched the contract above. Optional include_usage: true returned "usage": {"count": 2} for two competitor names. No paid network calls were made.
What this adapter is not
It is not a Seller Console listing, not a curl recipe for a live OpenAny route, and not a substitute for supplier admission, a bounded test, or publication. When you later bind a real endpoint in the console, you use a seller API Key connection — seller credentials, not a buyer OpenAny API key — and you keep those credentials out of the public listing, copied instructions, and screenshots. Publication and runtime readiness are separate states.
If you later choose usage-based billing, the seller docs ask for a trustworthy quantity in the response, plus the JSON Pointer, unit, and rounding you configure. The console helper showed that quantity as usage.count. Use that pattern only when your charge rule points at that field. A defined brief usually fits fixed price per call and does not need a usage quantity.
What to do next
Run the local checks until the in-scope result, the out-of-scope error, and the invalid-input error are all stable. Then read the full seller walkthrough for packaging, pricing, failed-call billing, and the pre-publish checklist. Copying this example does not submit an application, authorize a paid test, or publish anything.
If you want a closer look at async delivery, metering, and duplicate callbacks — not at local packaging — that is a different article in this series, not a second copy of this one.

Top comments (0)