The Allegiance Rule

When an agent should keep a record.

An agent acts for someone. Afterwards, somebody asks what it did and why. This is the line at which the agent should have written the answer down.

Issue a receipt when the action does any of these on behalf of a person, or of an agent acting for one:

  1. moves value, or commits someone to a cost
  2. ranks, filters, selects, or advises among options where the agent or its operator could benefit from the choice
  3. gives advice the recipient will act on where the outcome is hard to reverse: money, health, legal standing, safety, and the like
  4. changes another agent’s behaviour in a way that affects any of the above

Do not issue for internal steps, retrievals with no selection, or actions with no recipient.

Why each line is there

The four are not arbitrary.

Moving value

If money left someone’s account, or they are now committed to a cost, the action is hard to undo and the person has an obvious interest in the record. This is the least controversial line and the easiest to apply.

Ranking, filtering, selecting, advising

This is the one that matters most and the one most often missed. When an agent picks a winner among options, the person sees the winner and not the process. If the agent or its operator gains from that pick, the person cannot tell from the outcome. The record is the only way they could.

The clause says could benefit, not did benefit. An agent that took no commission on this particular action still operates inside a business that takes commissions, and that fact belongs in the record whether or not it applied this time.

Advice that is hard to reverse

Money, health, legal standing and safety are examples, not the definition. What they share is that the recipient acts on the advice and cannot easily undo the consequence. That shared property is the rule; the domains are how you recognise it.

Changing another agent’s behaviour

An agent that rewrites another agent’s ranking, prompt, or tool access is acting for whoever that agent serves. A bias introduced there travels downstream to every action the modified agent takes, and nobody downstream can see where it came from.

Where the line falls

What counts, and what does not.

Agent to agent

The recipient can be another agent.

When one agent hands work to another and they answer to different operators, the second agent’s record is how the first can tell whose side it was on. Every link in a chain is the recipient of the link before it, and the chain ends in a person.

This does not mean a receipt for every call. Internal handoffs with no selection stay out, exactly as they do for a single agent. A multi-agent system produces one record per link where something was ranked, chosen, advised, or spent.

Adopt it

Copy this into your project.

Paste the rule into your AGENTS.md, your contributing guide, your policy, or your paper. It needs no attribution and no permission.

Issue a receipt when the action does any of these on behalf of a person, or of an agent acting for one: - moves value, or commits someone to a cost - ranks, filters, selects, or advises among options where the agent or its operator could benefit from the choice - gives advice the recipient will act on where the outcome is hard to reverse: money, health, legal standing, safety, and the like - changes another agent’s behaviour in a way that affects any of the above Do not issue for internal steps, retrievals with no selection, or actions with no recipient. The Allegiance Rule. Public domain. https://getstub.dev/rule
Licence

The text of this rule is released under CC0. Use it, change it, build a different mechanism for it, argue with it in public. It is a rule, not a product, and it is better for Stub if other people can meet it without us.

A mechanism that meets it

Stub.

A signed receipt an agent issues after acting, resolvable at a registry the operator does not control. Checking is free for anyone, with no key and no account.

How an agent issues one
Stub · Directory · Witness key · hello@getstub.dev

The Mark reflects the registry. If an operator stops issuing, it changes on its own within minutes.