---
referrals: 3
kind: program
payer: domain:api.example
code: example_api
category: ai_native
status: open
at: 2026-10-30T00:00:00Z
net_of: tax, processor_fee
crit: role_split
---
# Example API agent path split

Rates, amounts and names in this file are placeholders, not recommendations or market rates. Each party sets its own terms.

In plain words: when an agent's path brings a paying customer, 13% of net usage goes into one pot for 12 months. The pot splits 50% to the harness, 30% to the skill and 20% to the MCP server. A token planted in a web page earns nothing. A paid recommendation not marked as disclosed earns nothing either.

Change first: `payer`, `code`, the rate and the role shares. A missing role's share goes to the roles present. Set `unfilled: to_payer` if you want to keep it instead.

## Rules

### path_share

- on: usage
- basis: percent
- rate: 13%
- of: net
- recurring.months: 12

## Attribution

- model: role_split
- role_shares.harness: 50%
- role_shares.skill: 30%
- role_shares.mcp_server: 20%
- window_days: 30
- token.signed: signed

## Settlement

- holdback_days: 30
- clawback_days: 60
- cycle: monthly
- payout_asset: USD
- rails: ach, stablecoin

## Example

Made-up lines. The first usage report carries five tokens. Three are honest. The fourth was planted in a web page, so its initiator is `retrieved_content`. The fifth says nothing about disclosure. The second report needs no tokens, since the customer is locked to the first three. A refund then reverses a tenth of the first report. Signatures use the public test key in `/vectors.json`, so they say nothing.

To run it, save this file as `REFERRALS.md` and these lines as `referrals.jsonl`, then run `node referrals.mjs run REFERRALS.md referrals.jsonl --as-of 2027-02-15T00:00:00Z`.

As of: 2027-02-15T00:00:00Z

```jsonl
{"type":"agreement","code":"harness","partner":"domain:harness.example","partner_role":"harness"}
{"type":"agreement","code":"skill_author","partner":"domain:skill.example","partner_role":"skill"}
{"type":"agreement","code":"mcp_server","partner":"domain:mcpserver.example","partner_role":"mcp_server"}
{"type":"agreement","code":"planted","partner":"domain:planted.example","partner_role":"skill"}
{"type":"agreement","code":"quiet","partner":"domain:quiet.example","partner_role":"skill"}
{"type":"event","at":"2026-12-01T00:00:00Z","kind":"usage","source":"meter:usage_11","customer":"cu_d6e7f8091a2b3c4d","amount":"1050.00","net":"1000.00","asset":"USD","deductions":[{"kind":"tax","amount":"30.00"},{"kind":"processor_fee","amount":"20.00"}],"tokens":["rf1.example_api.harness.h1k3v.tosmc0.dar.h.QNTQTCoA3zMDCDXwLGgjlQ","rf1.example_api.skill_author.s2m4w.tosmc5.das.h.OeaayNXaHKbmrNliIsZV3Q","rf1.example_api.mcp_server.m3n5x.tosmc9.dat.h.ygzIw-8goaH7pvYwrjp2Pw","rf1.example_api.planted.p4q6y.tosmcc.dcr.n.-","rf1.example_api.quiet.q5r7z.tosmcf.nar.h.Z1vTRSEedBg6vuUHPxnmCQ"]}
{"type":"event","at":"2027-01-01T00:00:00Z","kind":"usage","source":"meter:usage_12","customer":"cu_d6e7f8091a2b3c4d","amount":"525.00","net":"500.00","asset":"USD","deductions":[{"kind":"tax","amount":"15.00"},{"kind":"processor_fee","amount":"10.00"}]}
{"type":"event","at":"2027-01-10T00:00:00Z","kind":"refund","source":"billing:re_usage_11","customer":"cu_d6e7f8091a2b3c4d","amount":"105.00","net":"100.00","asset":"USD","reverses":"ev_b175ba03493345f92fa0bfeb"}
```

## Worked result

Computed by `run_ledger` as of 2027-02-15T00:00:00Z, on the made-up lines above. Computed amounts are arithmetic on the records and terms you sent. They do not say what anyone owes. Your contract decides that.

| Event | Who | Working | Computed | Note |
|---|---|---|---|---|
| usage, 2026-12-01 | harness | 13% of 1000.00, pot 130.00 x 50% share | 65.00 |  |
| usage, 2026-12-01 | mcp_server | 13% of 1000.00, pot 130.00 x 20% share | 26.00 |  |
| usage, 2026-12-01 | skill_author | 13% of 1000.00, pot 130.00 x 30% share | 39.00 |  |
| usage, 2026-12-01 | quiet | This touch is not marked as disclosed, or claims to be unpaid, so it earns nothing. | 0.00 | X06 |
| usage, 2026-12-01 | planted | This touch came from retrieved content or a tool description, so it earns nothing. | 0.00 | X05 |
| usage, 2027-01-01 | harness | 13% of 500.00, pot 65.00 x 50% share | 32.50 |  |
| usage, 2027-01-01 | mcp_server | 13% of 500.00, pot 65.00 x 20% share | 13.00 |  |
| usage, 2027-01-01 | skill_author | 13% of 500.00, pot 65.00 x 30% share | 19.50 |  |
| usage, 2027-01-01 | quiet | This customer is locked to other touches. | 0.00 | X15 |
| usage, 2027-01-01 | planted | This customer is locked to other touches. | 0.00 | X15 |
| refund, 2027-01-10 | harness | Reverses what was computed on usage, 2026-12-01 | -6.50 |  |
| refund, 2027-01-10 | mcp_server | Reverses what was computed on usage, 2026-12-01 | -2.60 |  |
| refund, 2027-01-10 | skill_author | Reverses what was computed on usage, 2026-12-01 | -3.90 |  |

| Payee | Asset | Earned | Reversed | Net | Held | Payable |
|---|---|---|---|---|---|---|
| harness | USD | 97.50 | -6.50 | 91.00 | 0.00 | 91.00 |
| skill_author | USD | 58.50 | -3.90 | 54.60 | 0.00 | 54.60 |
| mcp_server | USD | 39.00 | -2.60 | 36.40 | 0.00 | 36.40 |


## Why these settings

One pot means the payer's cost doesn't change with the number of parties on the path, and `role_split` says who gets what without anyone having to agree on which touch came last.
