Inspiration
AI shopping agents are becoming capable of searching, comparing, selecting products, and initiating purchases. But there is a critical gap: an agent can technically follow a user's instructions while still making a purchase that violates what the user actually intended.
Imagine asking an AI agent to buy a laptop for under $1,000. It selects an $899 laptop but adds a $199 warranty and a $79 annual antivirus subscription. The laptop is within budget, but the overall purchase is not.
Who ensures the agent respects the user's complete intent—not just individual instructions?
That question inspired IntentOS: an independent trust and accountability layer that sits between human intent and autonomous commerce.
Our vision is simple: Your AI can decide. IntentOS makes sure it decides what you meant.
What it does
IntentOS converts natural-language shopping requests into enforceable purchase boundaries and validates AI-proposed transactions before they reach payment.
Its two central capabilities are:
1. IntentVault – Protecting the user before payment
- Converts natural-language requests into structured Intent Contracts using Amazon Bedrock Nova.
- Allows users to review and confirm budgets, product categories, specifications, and purchase restrictions.
- Uses an AI Shopping Agent to select products from a configurable simulated merchant catalog.
- Calculates complete transaction quotes, including product costs, tax, and shipping.
- Applies an independent deterministic Java policy engine to evaluate budget, product requirements, quantities, merchant rules, subscriptions, and recurring-payment restrictions.
- Produces four possible decisions: APPROVE, MODIFY, HOLD, or BLOCK.
- Supports bounded cart repair, fresh quote generation, and revalidation, with a maximum of three repair attempts.
- Requires the buyer to review the exact approved cart revision before proceeding to PayPal.
2. AgentReceipt – Making AI decisions accountable
AgentReceipt connects the original user intent, agent proposals, policy decisions, cart revisions, and payment evidence into an auditable record.
It captures:
- What the user requested and what the Intent Agent understood.
- What the Shopping Agent proposed.
- Which policy checks passed or failed.
- What changes were made during cart repair.
- The final approved transaction and its amount.
- PayPal order, capture, and verified payment event details.
Elasticsearch stores and indexes the shopping and decision history. Receipt intelligence enables users to ask questions about previous decisions using evidence retrieved through backend-authorized tools and Elastic Agent Builder, with a Bedrock-based explanation mode also available.
How we built it
We built IntentOS as a modular monolith with a React frontend and Java Spring Boot backend.
Technology stack:
- Java 21 and Spring Boot: Backend APIs, shopping orchestration, deterministic policy engine, cart repair, checkout, and receipt management.
- React and TypeScript: Interactive shopping dashboard, intent review, cart evaluation, validation results, and checkout experience.
- Amazon Bedrock – Nova Micro: Intent extraction, clarification assistance, and decision explanations.
- Amazon Bedrock – Nova Lite: Shopping candidate selection, intent reasoning, and repair assistance.
- Elasticsearch: Persistent storage and retrieval of intents, merchant quotes, shopping runs, decisions, payment events, and AgentReceipts.
- Elastic Agent Builder and MCP: Conversational access to historical receipt and decision evidence through owner-scoped, read-only tools.
- PayPal Orders API: Sandbox order creation, hosted buyer approval, and server-side payment capture.
- AWS and Terraform: Cloud infrastructure and deployment automation.
One important architectural decision was to separate AI reasoning from transaction authorization.
The AI proposes products and suggests changes, but Java independently calculates transaction totals and enforces the original Intent Contract. The model cannot approve or capture a payment.
Our checkout flow requires an approved cart, fresh quote, exact-revision buyer review, PayPal buyer approval, and server-side capture. An AgentReceipt is finalized only after a signature-verified PayPal PAYMENT.CAPTURE.COMPLETED webhook.
Challenges we ran into
- Converting natural language into enforceable constraints: AI-generated intent drafts can misunderstand product categories, specifications, quantities, or optional preferences. We needed user review and clarification rather than silently accepting model interpretations.
- Validating the complete transaction: Product prices alone are insufficient. Shipping, tax, recurring subscriptions, warranties, and other add-ons can change the actual amount.
- Keeping AI separate from payment authority: We needed a deterministic backend boundary that models and shopping tools cannot bypass.
- Building safe cart repair: Correcting a cart must not weaken the user's original requirements. Every repair needs a fresh quote and another policy evaluation.
- Handling incomplete merchant information: Missing prices, stock, shipping rules, tax treatment, or subscription terms must result in HOLD rather than invented values.
- Preserving transaction integrity: The cart, quote, policy decision, and buyer approval must refer to the same revision. A changed cart cannot reuse an earlier approval.
- Creating trustworthy payment evidence: An AI-generated explanation or a successful API response is not sufficient proof of payment. We needed verified PayPal webhook evidence to finalize AgentReceipt.
- Making historical decisions explainable: Receipt intelligence must retrieve evidence belonging to the authenticated user and distinguish actual payment events from unpaid shopping decisions.
Accomplishments that we're proud of
- Built an end-to-end AI shopping prototype with natural-language intent extraction, user-reviewed Intent Contracts, and Nova-powered product selection.
- Implemented an independent Java policy engine with APPROVE, MODIFY, HOLD, and BLOCK outcomes.
- Built a configurable simulated merchant catalog with product attributes, purchase terms, stock limits, destination-based shipping rules, tax calculations, quote expiry, and immutable quote snapshots.
- Implemented bounded cart repair with fresh quote generation, revalidation, and a persisted three-attempt limit.
- Added exact-cart-revision review and server-side PayPal Sandbox checkout orchestration.
- Designed AgentReceipt to connect user intent, agent decisions, policy evidence, and verified payment events.
- Integrated Elasticsearch for persistent shopping history and transaction evidence.
- Implemented owner-scoped, read-only MCP tools for receipt, decision, detail, and metrics retrieval.
- Added automated regression coverage for policy enforcement, quote validation, repair, authorization, checkout, and webhook handling.
- Performed live scenario verification of Bedrock intent extraction and shopping behavior, including approved purchases, budget violations, missing merchant evidence, and clarification cases.
We are particularly proud of the separation between an AI agent's ability to make decisions and the system's responsibility to enforce what the user actually authorized.
What we learned
- Natural-language intent needs to become explicit, reviewable, and testable before an autonomous system can safely act on it.
- AI reasoning and deterministic policy enforcement solve different problems. Trustworthy agentic systems need both.
- A purchase must be evaluated as a complete transaction, not just a collection of individually acceptable products.
- Safe automation includes knowing when to stop. Missing evidence and ambiguous intent should trigger HOLD or clarification, not assumptions.
- Cart repair must preserve the original user intent and require fresh validation.
- Payment authorization and payment confirmation are separate events. Verified provider evidence is essential for trustworthy receipts.
- Auditability is more than storing logs. Users need to understand what the agent proposed, why the system accepted or rejected it, and what actually happened.
- Integrating AI with Elasticsearch and MCP can make complex decision histories accessible through natural-language questions.
What's next for IntentOS
We see IntentOS evolving into a reusable trust and accountability layer for agentic commerce.
Our next priorities are:
- Expand beyond the simulated merchant catalog with verified real-retailer integrations.
- Complete and verify the full deployed PayPal Sandbox purchase-to-webhook-to-AgentReceipt journey.
- Strengthen distributed concurrency, idempotency, inventory handling, and persistent quote management.
- Complete historical receipt detail, timeline, and search experiences.
- Finish the secured Elastic Agent Builder tool attachment and end-to-end analyst acceptance.
- Improve shopping-agent candidate exploration, progress visibility, and bounded execution controls.
- Expand Intent Contracts to cover more complex preferences, subscriptions, recurring payments, and transaction limits.
- Explore integrations with additional payment providers and third-party AI shopping agents.
Our long-term vision is to make intent validation and accountability a standard layer in autonomous commerce—so users can delegate decisions without giving up control.
Built With
- amazon-web-services
- elastic
- java
- mcp
- paypal
- react
