Integrations
Commerce Gateway
✓ Certifiednpm: @loop-engine/adapter-commerce-gateway
What it does
Commerce Gateway provides LLM-accessible commerce data, including product catalog, pricing, inventory, and supplier context through a unified API. AI actors in Loop Engine procurement and demand loops use this data as evidence before submitting governed recommendations.
- Without Commerce Gateway: AI actors lack structured commerce context.
- With Commerce Gateway: actors query commerce data, attach evidence, and submit decisions into runtime guards.
Use case
SCM Procurement loop at ANALYZING:
- AI actor queries Commerce Gateway for suppliers on
SKU-4892 - Gateway returns structured supplier + inventory data
- Actor submits recommendation with attached evidence
- Confidence guard and human approval gates evaluate transition
Quick setup
-
Install
1npm install @loop-engine/adapter-commerce-gateway -
Create adapter
1import { CommerceGatewayAdapter } from "@loop-engine/adapter-commerce-gateway";23const gateway = new CommerceGatewayAdapter({4 gatewayUrl: process.env.COMMERCE_GATEWAY_URL!,5 apiKey: process.env.COMMERCE_GATEWAY_API_KEY!,6 timeout: 50007}); -
Use inside actor submission
1const commerceEvidence = await gateway.query({2 query: "top suppliers for SKU-4892 and current lead times"3});45const { actor, decision } = await adapter.createSubmission({6 loopId: "scm-procurement",7 loopName: "SCM Procurement",8 currentState: "analyzing",9 availableSignals: [{ signalId: "submit_recommendation", name: "Submit Recommendation", allowedActors: ["ai-agent"] }],10 instruction: "Recommend supplier and order quantity.",11 evidence: commerceEvidence12});
Configuration reference
| Option | Type | Default | Description |
|---|---|---|---|
| gatewayUrl | string | required | Commerce Gateway endpoint |
| apiKey | string | required | Commerce Gateway API key |
| timeout | number | 5000 | Request timeout in milliseconds |