How kalpanabhaskar/agentic-commerce works
Vortex Commerce is a multi-vertical shopping agent: users describe what they want, the agent classifies the request and searches live sources, then presents comparison cards and can create a Razorpay payment link. The graph also preserves direct ordering, catalog/upsell, webhook recovery, audit, and observability capabilities. Several agent and UI implementations were not excerpted, so those links rely on README-documented behavior; unsampled implementation details are not inferred.
Main entry points: server.js HTTP gateway · razorpay.js Razorpay orders · run.js Agent runner · handler.js Failure recovery
Components 30
User experience
- Chat interface
client/src/components/ChatWidget.jsx - Home page
client/src/components/HomePage.jsx - Catalog page
client/src/components/CatalogPage.jsx - Audit dashboard
client/src/pages/Dashboard.jsx - HTTP gateway
server.js
Agent workflow
- Agent runner
src/agent/run.js - LLM providers
src/agent/llm.js - Agent tools
src/agent/tools - Checkout flow
src/agent/checkout.js - Upsell logic
src/agent/upsell.js
Search and catalog
- Search dispatch
src/serp/dispatcher.js - Vertical router
src/serp/router.js - Search engines
src/serp - Search adapter base
src/serp/base.js - Result contract
src/serp/types.js - Entity resolver
src/serp/knowledgeGraph.js - Image enrichment
src/serp/imageEnricher.js - Product catalog
src/catalog/index.js
Orders and payments
- Razorpay orders
src/api/razorpay.js - Payment links
src/api/paymentLinks.js - Payment webhooks
src/webhooks/handler.js - Failure recovery
src/failures/handler.js
Audit and observability
- Audit log
src/audit/logger.js - Audit reader
src/audit/viewer.js - Tracing integrations
src/observe
Other components
- Buyer
- Razorpay
- SerpApi
- LLM service
- LangSmith / Langfuse
Connections 36
- Buyer → Chat interface: asks
- Chat interface → HTTP gateway: sends chat
- HTTP gateway → Agent runner: runs chat
server.js - Agent runner → LLM providers: uses model
- Agent runner → Agent tools: dispatches tools
- Agent tools → Search dispatch: searches
- Search dispatch → Vertical router: dispatches search
src/serp/index.js - Vertical router → Search engines: selects engine
src/serp/router.js - Search engines → Search adapter base: extends adapter
src/serp/apps.js - Search adapter base → Result contract: coerces results
src/serp/base.js - Vertical router → Image enrichment: enriches results
src/serp/router.js - Search dispatch → Entity resolver: resolves entities
- Search engines → SerpApi: queries
src/serp/base.js - HTTP gateway → Checkout flow: legacy checkout
server.js - Checkout flow → Razorpay orders: creates order
- HTTP gateway → Razorpay orders: creates direct order
server.js - Razorpay orders → Product catalog: loads product
src/api/razorpay.js - Product catalog → Upsell logic: resolves upsells
- Razorpay orders → Razorpay: calls API
src/api/razorpay.js - HTTP gateway → Payment links: creates link
- Payment links → Razorpay orders: uses order API
src/api/paymentLinks.js - HTTP gateway → Audit reader: serves audit
server.js - Audit reader → Audit log: reads entries
src/audit/viewer.js - Razorpay orders → Audit log: logs actions
src/api/razorpay.js - Payment links → Audit log: logs link
src/api/paymentLinks.js - Payment webhooks → Failure recovery: handles failure
src/webhooks/handler.js - Payment webhooks → Razorpay orders: captures payment
src/webhooks/handler.js - Failure recovery → Razorpay orders: checks order
src/failures/handler.js - Failure recovery → Payment links: creates fallback link
src/failures/handler.js - Failure recovery → Audit log: logs recovery
src/failures/handler.js - HTTP gateway → Payment webhooks: routes webhook
src/webhooks/handler.js - Agent runner → Tracing integrations: traces runs
- Tracing integrations → LangSmith / Langfuse: exports traces
- Home page → Chat interface: links to chat
- Catalog page → Product catalog: browses products
- Audit dashboard → HTTP gateway: requests audit