Muneer Alam Work / CounterProof

A deal is only useful if it obeys the rules.

A program that negotiates product prices for a fictional shop. It responds to customer offers and suggests prices for groups of products while following the shop’s stock and minimum-profit rules.

CounterProof / contribution
Designed and implemented the negotiation protocol, pricing strategy, evaluation tooling and public demo.
Timeline & status
November 2026
Competition prototype
Built with
Python · Standard-library HTTP API · Decimal arithmetic · Independent replay validation
Backend systemsBUILD NOTES / 2026
CounterProof / project preview
The actual CounterProof public demonstration, with its recorded simulated benchmark and scripted-negotiation controls.
CounterProof↗
View full project screenshot ↗
Actual public demo with a fictional store. The recorded benchmark is separate from the live examples; no real purchases or external AI calls.

A buyer offers one total for a bundle. Some items have room for a discount; others are already close to their margin floor. Accept too quickly and the store gives away profit. Counter again and the buyer might leave.

CounterProof is my attempt to make those decisions inspectable. It separates the conversation, the commercial rules and the final agreement, so there is a concrete answer to “what did the seller actually accept?”

The conversation has to become an exact agreement

I separated transaction handling from pricing policy. The protocol tracks the current basket and offer; the negotiation logic decides what to quote. An acceptance binds the exact current legal bid. Reallocating prices within a bundle or changing the basket requires another explicit agreement.

Buyer message enters protocol and pricing logic constrained by stock, discount and margin. The reply is an offer, exact acceptance or walk-away. A separate checker replays the recorded run afterwards.
The seller’s decision path and the separate replay check. Open the diagram to inspect it at full size.

The floor price comes from the stricter of the discount and margin constraints, rounded up to whole rupees. Decimal arithmetic makes that calculation explicit, while a second check conservatively matches the organizer’s floating-point rules. A one-rupee boundary is still a boundary.

When is one more counteroffer worth it?

The seller uses Python and the standard library, without an LLM. It watches the buyer’s bids, limits ordinary upward probes and uses a cautious forecast near the deadline.

Accepting a legal offer secures a sale; making another counteroffer might improve the result or lose it. Sparse, stale or weak bid histories keep a larger forecast cushion. An explicit spending ceiling stops further probing only when the current basket bid reaches it.

This remains a heuristic about observed bids, not knowledge of the buyer’s true budget. A rejected final quote can still end without a deal.

Compare the same buyers

I ran CounterProof and the organizer’s baseline against the same public scripted scenarios, rather than comparing unrelated demo runs.

Recorded public comparison, 1,050 negotiations per seller. Simulated profit: baseline ₹1,084,909, CounterProof ₹1,166,942, an increase of ₹82,033 or 7.561%. Deals: 756 to 762. Deadlocks: 115 to zero. Profit bars start at zero.
Fictional-store results from the matched public panel, not business revenue or a hidden LLM-buyer benchmark.

CounterProof retained every baseline sale and closed six additional orders in this sample. Both sellers had zero observed policy or truth violations. The manipulative-buyer subset produced a 10.023% improvement in simulated profit.

Comparison conditions. The five public seeds were 6203, 7309, 8713, 9049 and 9923. Default runs and development panels use other scenario sets, so their scores stay separate. Manual demo outcomes are not added to this benchmark.

Check the agreement with different code

The independent replay checker deliberately does not import the seller’s policy or receipt helpers. Repeating the same implementation could also repeat its mistakes.

The repository records successful replay checks for 9,212 scripted traces and 18 model-driven diagnostic traces. These establish consistency within the supplied transcripts. Receipt hashes identify a supplied snapshot; they do not authenticate its origin or guarantee performance against unseen buyers.

Try making an offer

The public demo lets you watch both sellers handle the same seeded scenario or negotiate yourself. Its bounded-history API reconstructs turns without a database-backed session. There are no real purchases or external AI calls.

I built this as a solo-team entry for the IIT Bombay Techfest AgentX hackathon, taking on Challenge 2, “Selling to Machines.” I used AI assistance and retained the Techfest / AgentX starter kit unchanged. The architecture note and evaluation commands provide the implementation details and a way to reproduce the comparison.

Code & further reading

Written by Muneer Alam · Reviewed 2 December 2026