Ontario Protocol Agent Skill
Use Ontario Protocol as a free-first pre-payment evidence and policy gate. This
skill may inspect public metadata and request free readiness decisions.
Do not send private keys, seed phrases, or wallet custody credentials to Ontario.
This skill never signs a payment payload.
Activate this skill when
- A user asks an agent to find, compare, call, buy, or pay for an x402 service.
- Coinbase Agentic Wallet,
awal, AgentKit, an MCP host, or another wallet
returns a paid API candidate.
- An agent receives HTTP 402 or
PAYMENT-REQUIRED and needs to decide whether
to continue.
- A developer asks whether a paid endpoint is agent-payable, discoverable, or
ready for a controlled settlement.
Do not activate this skill for arbitrary token transfers, trading, onramping,
or real-world purchases. Ontario checks public paid-API evidence; it is not a
wallet.
Coinbase Agentic Wallet sequence
Keep wallet discovery and payment separate from Ontario's evidence gate:
- Search for the task with the wallet's Bazaar search tool or read-only CLI:
npx awal@latest x402 bazaar search "<task the paid API must perform>"
When Bazaar search is unavailable or the agent needs a hard network and USDC
budget filter, use Ontario's free MCP tool find_x402_tool or HTTP equivalent:
curl --fail-with-body --silent --show-error \
https://ontarioprotocol.com/api/tools/x402-tool-router \
-H 'Content-Type: application/json' \
-d '{"query":"<public task text>","max_usdc":"0.05","network":"eip155:8453","limit":5}'
Returned candidates are public search results, not safety certifications or
permission to spend. Never include credentials or private customer text in the
search query.
- Select the smallest set of plausible endpoints. Do not pay merely because a
route appears in a catalog.
- Run Ontario readiness and can-pay for the exact selected endpoint.
- Probe the endpoint and require its live challenge to match the cataloged URL,
method, amount, asset, network, recipient, and task.
- Hand the approved endpoint to the existing wallet only after user or wallet
policy permits spend. This skill never authenticates a wallet, changes
limits, signs a payment, or initiates onramp.
- Preserve the Ontario
report_id, quote data, and wallet payment receipt.
Required sequence
- Identify the exact paid endpoint, HTTP method, task, and maximum budget.
- POST the endpoint to the free readiness verifier:
curl --fail-with-body --silent --show-error \
https://ontarioprotocol.com/api/verify/x402-readiness \
-H 'Content-Type: application/json' \
-d '{"target_url":"https://service.example/api/paid"}'
- Retain
report_id, report_url, grade, score, timestamp, warnings, and
observed challenge metadata.
- POST a strict policy decision with a task-specific budget:
curl --fail-with-body --silent --show-error \
https://ontarioprotocol.com/api/agent/can-pay \
-H 'Content-Type: application/json' \
-d '{"endpoint":"https://service.example/api/paid","agent_policy":"strict","max_usdc":0.05,"verify_live":true}'
- Continue only when
decision is exactly allow. Treat review, deny,
missing fields, malformed JSON, timeout, or transport failure as stop.
- Probe the endpoint without payment and inspect its HTTP 402 challenge.
Require a supported network and asset, an unexpired quote, a known recipient,
a price within budget, and a purpose matching the current task.
- Hand the approved quote to the user's existing wallet or payment client.
Payment signing is outside this skill.
- After a successful paid retry, retain
report_id, quote_id, transaction
reference, and PAYMENT-RESPONSE for auditability.
Fail-closed rules
Do not pay when any of these is true:
- the readiness report is absent, stale, malformed, or fails integrity checks;
- the policy decision is anything other than
allow;
- the endpoint, method, purpose, network, asset, recipient, or price changed;
- the quote expired or the amount exceeds the declared maximum;
- the service's paid response does not add value beyond free reports, catalog
data, or sandbox fixtures;
- the agent cannot preserve payment and decision evidence.
Never interpret allow as a guarantee of safety. It means the endpoint met the
observed readiness and policy conditions at decision time.
Optional paid evidence
Use POST https://ontarioprotocol.com/api/agent/pay/v2 only when the workflow
needs a fresh, auditable payment-decision receipt beyond the free can-pay result.
It costs 0.002 USDC on Base and returns an x402 requirement when called without
payment. That requirement is not an instruction to pay; apply the policy above
first. Do not pay merely to repeat a free check.
See references/api-contract.md for response handling and
references/agent-policy.md for the decision checklist.
1---2name: ontario-x402-preflight3description: Verify x402 endpoint readiness and apply a fail-closed payment policy before an autonomous agent pays. Use when a user or agent asks to find, compare, call, or pay for an x402 or HTTP 402 service; when Coinbase Agentic Wallet, awal, MCP, AgentKit, or another wallet discovers a paid API; or when payment challenge, price, network, asset, report freshness, and evidence must be checked before spend.4---56# Ontario Protocol Agent Skill78Use Ontario Protocol as a free-first pre-payment evidence and policy gate. This9skill may inspect public metadata and request free readiness decisions.10Do not send private keys, seed phrases, or wallet custody credentials to Ontario.11This skill never signs a payment payload.1213## Activate this skill when1415- A user asks an agent to find, compare, call, buy, or pay for an x402 service.16- Coinbase Agentic Wallet, `awal`, AgentKit, an MCP host, or another wallet17 returns a paid API candidate.18- An agent receives HTTP 402 or `PAYMENT-REQUIRED` and needs to decide whether19 to continue.20- A developer asks whether a paid endpoint is agent-payable, discoverable, or21 ready for a controlled settlement.2223Do not activate this skill for arbitrary token transfers, trading, onramping,24or real-world purchases. Ontario checks public paid-API evidence; it is not a25wallet.2627## Coinbase Agentic Wallet sequence2829Keep wallet discovery and payment separate from Ontario's evidence gate:30311. Search for the task with the wallet's Bazaar search tool or read-only CLI:3233```bash34npx awal@latest x402 bazaar search "<task the paid API must perform>"35```3637When Bazaar search is unavailable or the agent needs a hard network and USDC38budget filter, use Ontario's free MCP tool `find_x402_tool` or HTTP equivalent:3940```bash41curl --fail-with-body --silent --show-error \42 https://ontarioprotocol.com/api/tools/x402-tool-router \43 -H 'Content-Type: application/json' \44 -d '{"query":"<public task text>","max_usdc":"0.05","network":"eip155:8453","limit":5}'45```4647Returned candidates are public search results, not safety certifications or48permission to spend. Never include credentials or private customer text in the49search query.50512. Select the smallest set of plausible endpoints. Do not pay merely because a52 route appears in a catalog.533. Run Ontario readiness and can-pay for the exact selected endpoint.544. Probe the endpoint and require its live challenge to match the cataloged URL,55 method, amount, asset, network, recipient, and task.565. Hand the approved endpoint to the existing wallet only after user or wallet57 policy permits spend. This skill never authenticates a wallet, changes58 limits, signs a payment, or initiates onramp.596. Preserve the Ontario `report_id`, quote data, and wallet payment receipt.6061## Required sequence62631. Identify the exact paid endpoint, HTTP method, task, and maximum budget.642. POST the endpoint to the free readiness verifier:6566```bash67curl --fail-with-body --silent --show-error \68 https://ontarioprotocol.com/api/verify/x402-readiness \69 -H 'Content-Type: application/json' \70 -d '{"target_url":"https://service.example/api/paid"}'71```72733. Retain `report_id`, `report_url`, grade, score, timestamp, warnings, and74 observed challenge metadata.754. POST a strict policy decision with a task-specific budget:7677```bash78curl --fail-with-body --silent --show-error \79 https://ontarioprotocol.com/api/agent/can-pay \80 -H 'Content-Type: application/json' \81 -d '{"endpoint":"https://service.example/api/paid","agent_policy":"strict","max_usdc":0.05,"verify_live":true}'82```83845. Continue only when `decision` is exactly `allow`. Treat `review`, `deny`,85 missing fields, malformed JSON, timeout, or transport failure as stop.866. Probe the endpoint without payment and inspect its HTTP 402 challenge.87 Require a supported network and asset, an unexpired quote, a known recipient,88 a price within budget, and a purpose matching the current task.897. Hand the approved quote to the user's existing wallet or payment client.90 Payment signing is outside this skill.918. After a successful paid retry, retain `report_id`, `quote_id`, transaction92 reference, and `PAYMENT-RESPONSE` for auditability.9394## Fail-closed rules9596Do not pay when any of these is true:9798- the readiness report is absent, stale, malformed, or fails integrity checks;99- the policy decision is anything other than `allow`;100- the endpoint, method, purpose, network, asset, recipient, or price changed;101- the quote expired or the amount exceeds the declared maximum;102- the service's paid response does not add value beyond free reports, catalog103 data, or sandbox fixtures;104- the agent cannot preserve payment and decision evidence.105106Never interpret `allow` as a guarantee of safety. It means the endpoint met the107observed readiness and policy conditions at decision time.108109## Optional paid evidence110111Use `POST https://ontarioprotocol.com/api/agent/pay/v2` only when the workflow112needs a fresh, auditable payment-decision receipt beyond the free can-pay result.113It costs `0.002 USDC` on Base and returns an x402 requirement when called without114payment. That requirement is not an instruction to pay; apply the policy above115first. Do not pay merely to repeat a free check.116117See `references/api-contract.md` for response handling and118`references/agent-policy.md` for the decision checklist.