Amana
Agentic commerce you can trust. AI understands shopping intent and merchant interfaces; deterministic software controls identity, authority, and money.
Let AI reason. Keep authority in software.
AI can understand a shopping request or diagnose a merchant API, but neither ability makes its answer financially authoritative. Amana separates those responsibilities in a deterministic trust layer for agentic commerce.
The Merchant Agentization Agent turns merchant-approved interfaces into tested, evidence-backed capabilities. The Safe AI Buyer interprets multimodal intent, discovers eligible products, and prepares a transaction without giving the model independent authority over money.

Two agents. One control plane.
The backend is a Java 25 / Spring Boot 4.1.1 modular monolith. PostgreSQL is the system of record. Authority-critical rules stay inside explicit module and transaction boundaries rather than introducing unnecessary distributed-system failure modes.
Gemini handles interpretation, multilingual and visual understanding, interface reasoning, diagnosis, and bounded planning. The application owns readiness, identity, authoritative quotes, policy evidence, proposals, authorization, exact money, execution, payment truth, and refund accounting.

The frontend uses Next.js, React, TypeScript, Tailwind CSS, and Razorpay Blade. Retrieval combines PostgreSQL full-text search, pg_trgm, pgvector, and Gemini embeddings. The deployed stack uses Vercel, Render, and Supabase; P0 requires no Kafka, BullMQ, or Redis service.
A plausible API is not a ready capability
Merchant catalogues and APIs differ in money units, inventory semantics, fulfilment behaviour, policies, authentication, and response shapes. Amana starts with merchant-approved structured sources, not arbitrary website crawling.
The agentization lifecycle moves through inspection, discovery, mapping, contract testing, observation, diagnosis, bounded repair, and retest. AI may propose a mapping or diagnose a failure. Only deterministic evidence reduction can mark a capability READY.

The demo exposes a concrete mismatch: an API returns 2999 for a ₹2,999 product, while the canonical money contract expects 299900 minor units. A rupees-to-paise repair must create a new mapping version, receive merchant approval, pass deterministic contract tests, and satisfy the readiness reducer.

An exact proposal before any payment
The Buyer can interpret typed, spoken, visual, multilingual, and conversational requests. Its execution path is stricter: eligible READY merchants, grounded catalogue records, an authoritative quote, stock and serviceability evidence, an immutable proposal, explicit authorization, and the execution gate.

A canonical proposal hash binds authorization to the exact transaction. If execution attempts a modified amount, product, variant, merchant, currency, or provider account, the authorization no longer binds. Safety-critical missing evidence fails closed.
Browser callbacks and provider webhooks are observations, not unquestioned financial truth. The backend binds and reduces Razorpay evidence, reconciles ambiguous outcomes, and models proposal, authorization, execution, order, payment, fulfilment, and refunds separately.
Stable identities, constraints, and transactional locking make retries and concurrent callers converge. Durable work after commit uses a PostgreSQL transactional outbox. An uncertain provider outcome moves toward reconciliation rather than an invented success.
Trade-offs
| Choice | Why | Cost |
|---|---|---|
| Deterministic authority around AI reasoning | Keep readiness, exact money, and execution application-owned. | More explicit contracts, state, and evidence handling. |
| A modular monolith | Keep authority-critical invariants inside clear transaction boundaries. | Modules share a deployment boundary. |
| Merchant-approved structured sources | Test known interfaces and preserve merchant authority. | Arbitrary merchant websites are not automatically supported. |
| Hash-bound proposals and explicit authorization | Bind the buyer’s approval to one exact transaction. | Current purchases need on-screen authorization. |
| Fail closed and reconcile unknown outcomes | Avoid guessing about safety-critical or financial state. | Ambiguity can delay execution or completion. |
| Synthetic merchants and Razorpay Test Mode | Provide a reproducible reviewer-facing demonstration. | The demo does not establish production transaction or revenue claims. |
Measured evidence
The verification suites measure distinct boundaries, so their results are kept separate. These figures come from the repository’s committed evidence and README.
| Suite | Result |
|---|---|
| Deterministic safety cases | 250 / 250 passed · 0 hard safety violations |
| Guard-removal negative controls | 12 / 12 killed |
| Concurrency scenarios | 10 / 10 passed |
| Concurrent critical operations | 5 operations at N=8 and N=32 |
| Backend verification | 297 tests · 0 failures · 2 skipped |
| Frontend verification | 145 / 145 passed |
The intent and retrieval fixtures report 92.41% buyer intent field accuracy, 83.58% hybrid-v3 discovery Recall@5, and 76.12% valid-product Recall@5. Valid-product recall improved by 20.90 percentage points over hybrid-v2. Exact-identity precision and valid no-match accuracy were both 100% on those fixtures.
The safety harness covers proposal integrity, money integrity, callback truth, payment and refund idempotency, capability readiness, evidence, and policy enforcement. The core pnpm proof:verify path runs offline without Gemini, Razorpay, or deployment services.
What is live, and what comes next
The public demo includes Buyer, Merchant, Proof, Security, Failure Lab, Architecture, and Performance surfaces. It uses synthetic merchants and products, Razorpay Test Mode, and explicit on-screen authorization for current purchases.
The fastest reviewer path is a Buyer request for Auralink Buds under ₹3,000, followed by the merchant money-unit repair and retest. The proof and security surfaces expose the evidence behind the authority boundaries.
Unattended scheduled AutoBuy is not presented as complete. Native Buyer applications remain a future direction. The current system makes no production revenue, security certification, or compliance certification claim.
The backend uses Render’s free tier and can sleep after inactivity. If the live demo is unavailable, open its health endpoint ↗, wait for an UP response, then reload the product.
FAQ
Can the AI execute a payment on its own?
No. AI interprets and plans; the deterministic execution gate requires an exact, authorized proposal and the necessary evidence. There is no direct AI-to-Razorpay authority path.
What makes a merchant capability READY?
Deterministic contract tests, observed evidence, and a readiness reducer. A model can propose mappings and diagnose failures, but it cannot declare readiness.
How does Amana handle concurrent checkout attempts?
Stable identities, PostgreSQL constraints, and transactional locking make attempts converge. The documented suite covers five critical operations at eight and thirty-two concurrent callers.
Are payments real in the public demo?
The public system uses Razorpay Test Mode and synthetic demo merchants and products. It does not claim production revenue or unattended scheduled purchasing.
Does a browser success callback prove a payment succeeded?
No. Callbacks and webhooks are evidence observations. The backend binds provider order and payment evidence and deterministically reduces payment state; ambiguous outcomes are reconciled.
Can the core safety proof run without hosted services?
Yes. pnpm proof:verify runs the deterministic core proof offline. Provider-backed evaluation is a separate command and should be interpreted separately.