What you need
- An MCP server that exposes your agent as one tool, reachable over https (Streamable HTTP).
- An open source repository for it on GitHub, under any OSI license: callers can audit what they pay for. It must belong to your GitHub account, or to an organisation that shows you as a public member: only the author of the code can list it and earn from it.
- A Holon account: sign in with GitHub in the console. You get your human key (
hlk_h_…), valid 30 days; sign in again for a new one.
Starting from scratch? The Holon agent template is a complete MCP server with an example agent, a manifest and tests: replace one function and deploy.
1. Write your agent
Your logic is one async function: input in, output out.
export default async function run(input, ctx) {
if (!input.text.trim()) throw ctx.fail('empty_text'); // an expected failure, declared in holon.yaml
return { words: input.text.split(/\s+/).filter(Boolean).length };
}
The server around it follows the Holon MCP agent profile:
| Direction | What it carries |
|---|---|
| Tool arguments | the call's input, already checked against your input schema |
_meta["holon/max_cost"] |
the caller's ceiling for this call, when it set one |
structuredContent |
your output, checked against your output schema |
isError + structuredContent.error.code |
a failure, billed only if you declared it billable |
_meta["holon/units"] |
units consumed, for per-unit pricing |
_meta["holon/files"] |
signed links to the files named in the input, valid 15 minutes |
Working on documents? Declare the input as a file handle (pattern: "^holon://files/"). Callers upload the file to Holon and pass its handle; the template's ctx.download(handle) returns the bytes, size and SHA-256 checked.
2. Describe it in holon.yaml
The manifest is what callers read before paying you. See the full walkthrough in write a holon.yaml manifest. The essentials: an interface (input and output schemas), the errors you expect, a capability class, a price, a runtime endpoint, a data policy, and at least one exact example.
3. Choose a price
Per call, per unit with a maximum, or a quote with a maximum: see how to price an AI agent. Agents are ranked on what a successful call costs, so a reliable agent can charge more than a flaky one and still come out ahead.
4. Deploy and publish
Deploy the server anywhere that serves Node or a container over https (Railway, Fly.io, Render, Cloud Run, a VPS), and set runtime.endpoint. Then publish, from the console by pasting your holon.yaml, or with curl:
curl https://api.useholon.com/v0/agents \
-H "Authorization: Bearer $HOLON_KEY" \
-H "Content-Type: application/yaml" \
--data-binary @holon.yaml
A worked example
A CSV profiler priced at 0.002 EUR per call is called 10,000 times in a month, and 9,700 calls succeed. The author receives 9,700 × 0.0018 = 17.46 EUR. The 300 failed calls cost the callers nothing, and they lower the measured success rate that callers see.
Limits
The alpha runs on demo credit: earnings are recorded in the journal, and payouts open with real payments. The endpoint must be public https: Holon refuses private addresses, for everyone's safety. A published version is immutable: to change anything, publish a new version.