← All guides

How Do You Write an Agent Policy File for Your Store?

Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team

The short answer: Write it as a factual statement of your store's current terms, in five sections: who you are (name, canonical URL), what agents may do (browse, catalogue, prepare carts, create orders — yes or no each), your limits (request pacing, basket size, restricted categories, pre-registration requirements), your commitment model (who pays and how), and a contact that answers. Add a version and updated date. Keep every claim true of the store as it runs today — the file's entire value is credibility — then serve it at /.well-known/agent-policy.json, link it from the footer, and declare it in the free audit.

Audit my store — free

What is an agent policy file?

An agent policy file is the JSON document at /.well-known/agent-policy.json stating a store's terms for automated agents. Writing one means deciding and declaring — in machine-readable form — the behaviours you permit, the limits you enforce, and the way purchases are committed, so agents can comply by design rather than by discovery.

Section one: identity

Open with the store's name, canonical URL, and a policy version with an updated date. This looks ceremonial and is actually load-bearing: agents cache policies per store, and the identity block is how they know which store a cached file belongs to when domains mirror or redirect. The version and date are how they detect change. Mirror the name and URL in your Organization markup — the same facts in both places, never divergent, because divergence between your identity statements is the kind of inconsistency that reads as carelessness about all of them.

Section two: allowed behaviours

List the behaviours as explicit booleans or short statements: product browsing allowed; catalogue enumeration (feed/API) allowed; cart preparation allowed (and by what route — API or web); order creation allowed (and under what model). Explicit 'no' entries are as valuable as 'yes': an agent told plainly that order creation is not offered stops attempting it and routes its user to your human-pays flow instead. Silence, by contrast, gets probed — agents discover limits by hitting them, which costs you both load and goodwill.

Be granular where your store is granular. If most categories are open but one requires pre-registration, say exactly that, naming the category and the registration route. Precision here is hospitality: it lets a well-behaved agent serve its user inside your rules on the first attempt.

Section three: limits

State the operational limits an agent must respect: request-rate expectations for your surfaces (or a pointer to the developers page where they live), maximum basket size if your platform imposes one, any per-order value caps for agent-created orders, and crawling etiquette you expect (off-peak bulk enumeration, honoured retry-after headers). Limits stated in advance are terms; limits discovered as bans look like hostility, even when the numbers are identical.

Only publish limits you actually enforce or genuinely expect. A theatrical rate limit copied from a template (which your stack does not implement) will be tested by reality and found decorative, discounting the limits that are real. As with every layer in this series: the file is testimony. Keep it sworn.

Section four: the commitment model

State how purchases are committed in one unambiguous passage: for example, 'Agents may prepare carts and create orders; payment is completed by the customer on our hosted checkout' — or, if you run partner order creation with payment, the model, the caps, and the authentication route. This section is the one agent frameworks read most carefully, because it determines the user experience they build for your store.

Include the failure etiquette too: what an agent should do when a prepared order cannot be completed (contact whom, retry how, hand the user what link). Stores that document the unhappy path get graceful degradations; stores that document only success get improvisations.

Section five: contact, and the human door

End with a contact that reaches a person able to answer an operator's question — an email monitored by someone who knows what an agent policy is. The contact is the file's escape valve: every ambiguity, partnership request, and incident report flows through it. A policy with a dead contact address is a monologue; a policy with a live one starts relationships — operators consistently report that reachable stores get the benefit of every doubt.

Test the contact once by writing to it as an outsider would. You are checking that the mailbox exists, is monitored, and that the responder will not be baffled by the words 'agent policy'. File the test in the policy's review record.

Publishing and keeping it true

Serve the file as valid JSON at the exact well-known path, publicly fetchable, no authentication. Link it from the footer ('Agent policy'), the developers page, and the readable policy page. Declare it on the audit checklist and confirm the policy dimension's movement in a re-audit. Then govern it: version bumps on material changes, a named owner, a monthly fetch-and-click check alongside the feed's, and a changelog note on the developers page when terms change.

The drafting itself should take an hour for a typical store, because the file describes decisions most stores have already made implicitly. Writing it down is the act that converts implicit defaults into published terms — and published terms, as every guide in this cluster argues, are the difference between agents complying by design and agents discovering by collision. Compare your draft against the policy file guide and the readable page guide before shipping.

The 5-action policy drafting pass

  1. Draft the five sections — identity, behaviours, limits, commitment model, contact — from today's reality, not the roadmap.
  2. State the 'no's explicitly with the alternative route for each (human-pays link, pre-registration) so agents can comply instead of probing.
  3. Version and date it, mirror identity facts with your Organization markup, and keep prose and JSON versions consistent.
  4. Publish completely: served at the well-known path, footer-linked, developers-page linked, declared in the audit.
  5. Own and review it: named owner, monthly fetch-and-click, version bump and changelog note on every material change.

Worked example: a policy drafted in an hour, from a blank page

Example — fictional, for illustration. A plant store's owner drafts her policy on a video call with her developer, answering questions out loud. Identity: name, URL, version 1.0, today's date. Behaviours: browsing yes; feed enumeration yes ('please cache for an hour' — a real preference, now stated); cart preparation yes via the web flow; order creation no, with the human-pays route described. Limits: platform basket cap of 50 items; live plants excluded from agent orders in winter (a genuine fulfilment constraint she had never written anywhere). Commitment: agent prepares, customer pays at hosted checkout. Contact: the orders inbox she reads daily.

The file ships that afternoon. Two details reward her within the quarter: an agent platform, configuring its crawler, honours the cache request and cites the policy; and the winter-plants exclusion — previously a source of failed orders discovered at fulfilment — stops occurring because agents simply exclude the category in season. An hour of writing converted three recurring frictions into stated terms. That conversion is the whole craft of the policy file.

Related guides and the standing invitation

Companion reading for this topic: What Is /.well-known/agent-policy.json? · How Do You Write a Human-Readable Agent Policy Page? · Agent Policy vs robots.txt: What Is the Difference? · What Belongs in Your Store's /.well-known/ Directory?.

Whatever this guide led you to change, prove it the way every guide in this series ends: re-run the free audit on the same page and compare the dimension it names, read how the audit works if a finding is unclear, and see plans if you want the full guidance report and re-audit history while you work. A change you have not re-measured is a hope, not a fix.

Run the free audit · All guides

Sources

Frequently asked questions

How long should an agent policy file be?

As short as completeness allows — most stores need a few dozen lines of JSON covering identity, behaviours, limits, commitment model, and contact. Length is not a quality signal; truth and currency are.

What if some behaviours are allowed only for some categories?

Say exactly that: name the category, the restriction, and the route around it (pre-registration, human checkout). Granular honesty lets agents comply on the first attempt instead of discovering limits by collision.

Should the policy include rate limits I don't technically enforce?

Only state limits you enforce or genuinely expect to be honoured as terms. Decorative limits copied from templates get tested by reality and discount the real ones. The file is testimony; keep it sworn.

Who should own the policy file?

A named person who learns when the store's terms change — new surfaces, new limits, new categories — and updates the file the same week, with a version bump. Unowned policies drift into fiction.

How do the JSON policy and the readable policy page relate?

Same rules, two registers: JSON for programs, prose for people. Publish both (AXO credits both), keep them consistent, and let each link the other.

← Back