
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.
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.
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
- Source / github.com/Muneer320/CounterProof ↗
- CounterProof / README.md ↗
- CounterProof / docs/ARCHITECTURE.md ↗
- CounterProof / counterproof/protocol.py ↗
- CounterProof / counterproof/policy.py ↗
- CounterProof / tools/replay.py ↗
- CounterProof / evidence/default-run.txt ↗
Written by Muneer Alam · Reviewed 2 December 2026