Reliable AI systems / market infrastructure
CLEAR
AI proposes. Deterministic systems verify, allocate, and authorize execution.
Policy boundaries, deterministic allocation, and verification
Python · Pydantic · OR-Tools CP-SAT · SQLite · Pytest · Razorpay Test Mode
Open-source research / demo system
OVERVIEW
Proof-carrying market infrastructure that separates advisory AI from authority. Buyer intent becomes a validated policy; authenticated merchant offers enter an explicitly closed market; a replayable allocation certificate must pass an independent verifier before execution can be authorized.
Architecture
- 01ADVISORY PROPOSAL
Strict parsing freezes a policy against trusted context.
- 02CLOSE → ALLOCATE
Authenticated offers enter deterministic allocation.
- 03CERTIFICATE → VERIFY
An independent oracle replays the decision.
- 04AUTHORIZE EXECUTION
The Money Governor requires explicit authority.
BOUNDARYNo verified certificate means no authorized money action. AI output, a stored allocation, and browser callbacks are insufficient.
AI can propose buyer or merchant values, but strict parsing and trusted-context validation create the authoritative records. Merchant offers are signed and authenticated before admission.
After explicit market close, OR-Tools CP-SAT selects a deterministic multi-winner allocation. The certificate binds policy, offers, and the result. An independent reference allocator replays it; the Money Governor then checks financial authorization and reserves an execution plan in SQLite.
Key decisions & trade-offs
The objective prioritizes fulfilled quantity, then total payment, then soft preferences, with a canonical tie-break. Integer paise avoid floating-point ambiguity in money calculations.
The verifier does not import the production allocator. This separation makes independent replay possible, while adding implementation and testing work. Certificates establish consistency with supplied evidence and trust roots; they do not establish physical inventory truth.
Verification / results
The repository includes property, differential, adversarial, and integration tests for parsing, admission, allocation, certificate tampering, authorization, and payment boundaries. AgentMarketBench publishes a frozen-corpus evaluation with provenance and explicit limits.
Razorpay integration is Test Mode only. The repository records a historical provider run covering order creation, authenticated webhook ingress, and deterministic captured-payment replay. That evidence does not establish live settlement, merchant payout, fulfillment, or real-money movement.
Limitations
The demo is a single-process, one-buyer/many-seller system with an ephemeral SQLite session. It does not establish production tenancy or scale. Signatures do not prove inventory truth or transcript completeness; replayable certificates are not formal verification, blockchain consensus, or zero-knowledge proofs.
Exactly-once external delivery, real-money settlement, physical fulfillment, and general resistance to market manipulation are not claimed.