← All projects

TRACE

Agentic retail, end to end.

A conversational shopping system that joins GPT-4o, RFID inventory and the Universal Commerce Protocol. You describe what you want, it finds what is physically on the shelf, and nothing is bought until you say so.

TRACE screenshot
EPC verifiedShelf B-04 · RFID-UHF

Type

Master's thesis prototype

Timeline

2025 - 2026

Stack

Next.js · Express · GPT-4o · LangChain · Stripe

Status

Live · Vercel + Railway

Agents can browse. They can't yet verify or earn trust.

Today's commerce protocols let an AI place an order. They say nothing about whether the item exists, or whether the person wants it. TRACE closes three gaps.

Gap 01

Discovery

Storefronts are built for humans, so an agent can't turn an abstract intent into one specific SKU.

Trace's answerRAG · vector search

Gap 02

Physical stock

Protocols reason about logical inventory. Nothing checks that the item is actually on the shelf.

Trace's answerEPC / RFID verification

Gap 03

Trust

People won't hand a financial decision to a process they can't see.

Trace's answerHuman-in-the-loop guardrail

Three independent layers

Each layer can be understood and evaluated on its own. The protocol only touches the bottom one, so swapping the calling agent never changes the AI or the inventory logic.

Layer 1

AI

GPT-4o reads the request, decides which tool to call and drives the conversation. LangChain runs the tool-use loop.

GPT-4oLangChainsearch_productsplace_order

Layer 2

IoT + RAG

Semantic retrieval over the whole catalogue, then a physical check that the chosen item has an EPC on a shelf.

text-embedding-3-smallMemoryVectorStoreEPC / RFID

Layer 3

UCP transaction

Standardised agentic checkout. Any UCP-compatible agent can discover and buy here without platform approval.

/.well-known/ucp/checkouts/orders/:idcom.trace.*

Layers 1 and 2 are unchanged, whichever agent calls TRACE.

Any UCP agent

Gemini, Copilot or a custom agent

From one sentence to a verified purchase

Five steps, and the last one belongs to the human.

1

Discover

search_products

Semantic search returns the top three matches as product cards.

2

Place order

place_order

The agent looks up product, colour and size, and gets the EPC.

3

Verify

GET /trace/epc/:epc

The EPC is checked against inventory. Unverified means no checkout.

4

Open session

POST /checkouts

A UCP checkout session is created with the verification embedded.

5

Authorize

POST /checkouts/:id/complete

Only after the person clicks Authorize & Pay.

The guardrail is a checkpoint in the protocol, not a UI nicety

  • Nothing completes without a human. The backend does not call complete until the GuardrailCard is authorised.
  • Every exit is clean. Cancel, or abandoning the chat, both call DELETE /checkouts/:id.
  • Inaction is safe. An ignored session expires. No charge, no order.
Review your ordercom.trace.human_guardrail
CALM LOW PRICE SWEATER
White/Black · Size 170
19.99 EUR

EPC verified

Shelf B-04 · RFID-UHF303ac8e9c1745419d8b6347b
Session cs_1773094023975
Order ORD-1773094023999
CardApple PayGoogle Pay

GuardrailCard

Two additions to UCP, nothing removed

Custom fields live under the reverse-domain namespace com.trace.*. A standard UCP agent ignores what it does not know, so compliance holds by design.

com.trace.epc_verification

Grounds the digital transaction in physical inventory.

"com.trace.epc_verification": {
  "epc": "303ac8e9c1745419d8b6347b",
  "verified": true,
  "location": "Shelf B-04",
  "signal": "RFID-UHF",
  "lastSeen": "2026-03-19T14:33:09Z"
}

Embedded in every checkout session and in GET /products/:id.

com.trace.human_guardrail

Requires explicit human authorization before the sale completes.

"com.trace.human_guardrail": {
  "required": true,
  "status": "pending_authorization"
}

// after the person authorizes "status": "authorized"

Standard UCP lets an agent call complete on its own. This puts a person in the way.

ACP vs UCP vs MCP

TRACE can sit under any of the three agentic protocols. Each changes who can talk to it and how much of the design survives.

ComparedACPOpenAI + Stripe · late 2025TRACE todayUCPGoogle + Shopify · Jan 2026MCPAnthropic · Linux Foundation
DiscoveryPlatform-mediated by OpenAIDecentralised via /.well-known/ucpClient config or MCP Registry
Who connectsChatGPT onlyAny UCP-compatible agentAny MCP client: Claude, ChatGPT, Cursor
PaymentStripe SharedPaymentToken, mandatoryGoogle Pay, Shop Pay, any PSPOut of scope
ExtensionsNo custom mechanismReverse-domain namespaceCustom tools and resources
Human in the loopNot natively supportedVia a custom extensionNative elicitation
VerdictAn OpenAI-dependent shop.An open, self-sovereign backend.Infrastructure for any AI.

What the evaluation showed

Two-level testing against validity conditions defined before testing: Postman-driven API sequences, plus the full user-facing flow.

3/3

Hypotheses validated

13/15

Conversation scenarios passed fully

15/15

Functional checklist areas passed

Two scenarios passed only partially — open-ended, emotional queries like “treat myself to something nice” didn't map cleanly to product embeddings. See Limitations.

A seller backend any agent can call

Discovery, catalogue, checkout and the full post-purchase lifecycle, all over plain REST.

Discovery & catalogue

GET/.well-known/ucpCapabilities
GET/products/:idProduct + EPC status
POST/trace/chatGPT-4o agent

Checkout

POST/checkoutsCreate session
POST/checkouts/:id/completeAfter authorization
DELETE/checkouts/:idCancel

Orders

POST/orders/:id/fulfillMock carrier
GET/orders/:id/trackingEvent timeline
POST/orders/:id/returnReturn label

POST /checkouts · response

{
  "id": "cs_1773094023975",
  "status": "ready_for_complete",
  "currency": "eur",
  "totals": [{ "type": "total", "amount": 1999 }],
  "com.trace.epc_verification": {
    "verified": true,
    "location": "Shelf B-04"
  },
  "com.trace.human_guardrail": {
    "required": true,
    "status": "pending_authorization"
  }
}

Try TRACE yourself

Ask for a sweater, watch the shelf check run, then authorize the purchase.