2 minute readNewAgent-ready
Know when one more round of negotiation stops paying
A new built-in function, the optimal stopping rule, tells you whether one more round of a negotiation is worth what it costs, from the offers so far, and always says whose economics forced the stop.
lastprice/stopping-rule turns "what is my last price?" into a decision you can act on: keep negotiating, or stop and take the best offer so far.
- Send your side (seller or buyer) and the offers so far. It fits how fast the improvement per round is shrinking, compares the expected gain from one more round with that round's cost, and answers stop or continue, the best offer so far, and roughly how many more rounds would still pay.
- The cost of the next round is metered from the function that round would run, or you can send your own estimate.
- Every answer says whose economics forced the stop. When your round limit or budget runs out first, it says so plainly, so a stop forced by a budget is never presented as a fair price.
- Optional inputs cover your walk-away price, both sides' round limits, the other side's patience, and whether it knows your limit. A fairness switch, off by default, stops you at the other side's smaller limit instead of outlasting it.
- Call it through the price router by name or through the compute endpoint by its function id. Each call is billed at 1x.