Set the wait
Agentcard writes the reply once every store answered, or once your wait passed, whichever comes first. Leave the wait out and Agentcard chooses it. The wait is in milliseconds. Agentcard ends every store search at 30 seconds, so a wait above 30 seconds waits no longer than 30 seconds does, and a wait under 2 seconds counts as 2 seconds.- SDK
- MCP
- API
Pass
storeWaitMs and lateResults to the buy tool:agentcard.ts
Show late products in a streaming chat
A chat that shows products as cards the moment they arrive waits 25 seconds and streams the late stores. Each store’s products show the moment that store answers, so the shopper sees products long before the reply. The reply waits up to 25 seconds, and 99.7% of stores show their first products within that wait. A store that answers later sends its products in the same answer, after the reply, with one message that says what they added:- SDK
- MCP
- API
Use
storeWaitMs: 25000 and lateResults: 'stream'. The late cards reach the same callbacks as the first ones: sendLink, onProducts, or onItem. The turn’s onResult lists the late cards in result.products, after the answer’s own, so a cart panel or a list of products built from onResult shows them too.Hold late products in a texting app
A texting app that cannot add a card after it sent the reply waits 20 seconds and holds the late stores. The shopper waits up to 20 seconds for the reply, and the reply is the answer’s last message. 96% of stores show their first products within that wait. A store that answers after the reply sends nothing in that answer, so about 4 stores in 100 miss the reply. A longer wait catches more of them, up to the 30-second limit, and the shopper waits that much longer.- SDK
- MCP
- API
sms.ts
Set a wait for one message
Change the wait for one message only, such as a reply you want sooner. The next message goes back to your usual wait.- SDK
- MCP
- API
Pass the same options to An app that calls
buy.turn. An option the turn leaves out keeps the tool’s:chat.ts
client.buy itself sends the fields store_wait_ms and late_results on the request.Fix a wait that is refused
A wait that is not a number, or alate_results other than stream or hold, is refused before anything runs, so a typo never reaches a shopper.
- SDK
- MCP
- API
The SDK checks the options when you build the tool or open a turn. Pass the wait as a number of milliseconds instead:
buyTool({ agentcard, externalUserId: shopper.id, storeWaitMs: '25s' }) throws:agentcard.ts