Integrations
HTTP Adapter
Communitynpm: @loop-engine/adapter-http
What it does
Implements LoopStorageAdapter over HTTP. Any REST service that speaks the adapter protocol can back loop state storage. This is useful for integrating with existing services or remote storage planes.
Adapter protocol
Expected backend endpoints:
POST /loops/:id/startGET /loops/:idPOST /loops/:id/transitionGET /loops/:id/events
Quick setup
-
Install
1npm install @loop-engine/adapter-http -
Create adapter
1import { HttpAdapter } from "@loop-engine/adapter-http";23const storage = new HttpAdapter({4 baseUrl: "https:">//storage-gateway.internal"5}); -
Pass into runtime
1const loopSystem = await createLoopSystem({2 loops: [procurementLoop],3 storage4});
Note
If your backend is in the same process, implementing LoopStorageAdapter directly is usually simpler than standing up the HTTP protocol.
Configuration reference
| Option | Type | Default | Description |
|---|---|---|---|
| baseUrl | string | required | Base URL for storage API |
| timeoutMs | number | 5000 | Request timeout |
| headers | Record<string, string> | — | Additional auth or routing headers |