Expose a decision as an API
Most teams want a decision behind an endpoint: the decision logic in one place, and every service, in any language, calling it the same way. With Helixor you serve a decision pack over HTTP, or generate a typed client from the pack itself. Either way the caller gets the same action, rules and receipt as an in-process call.
Pick the shape#
| You want | Use | Read |
|---|---|---|
| One decision endpoint that services in any language call over JSON | The decision service, serving a pack on your own host | Serve decisions to other languages |
| A typed client, so callers get compile-time names for the pack's fields and actions | An SDK generated from the pack's manifest | SDK generation |
| A decision that reads free text and can abstain | The hosted reasoning service's POST /v1/decide | Ask the reasoning service |
Serve a pack#
- Start the service on your host.
helixor-pack serve --pack internal_ids.hxpack \ --license ~/.helixor/helixor.hxlic \ --host 127.0.0.1 --port 18734
It listens on loopback, and refuses to start on any other address without a token. For anything beyond loopback, terminate TLS in front of it. Serving decisions covers tokens and TLS.
- Call it from anything that speaks HTTP.
curl -s -X POST http://127.0.0.1:18734/v1/evaluate \ -H 'Content-Type: application/json' \ -d '{"text": "Wire the refund to jane@example.com, SSN 123-45-6789."}'The response carries the action from the pack's closed set, the rules that fired and the receipt hash. Every endpoint, including streaming over Server-Sent Events and WebSocket, is in the HTTP API reference.
Generate a typed client#
A compiled pack carries a manifest of its fields and actions. The generator turns it into an in-process decision SDK for each language you name:
helix-sdk-gen generate-embedded embedded-pack-manifest.json \ --lang python --lang java --lang csharp --lang rust --lang c \ --out generated-embedded
For HTTP APIs described by OpenAPI, the same generator emits typed clients in Python, JavaScript and TypeScript, Java, C# and Rust. SDK generation lists what each target supports, and what the 0.3.1 runtime needs alongside it.
What stays the same on every path#
- The answer. The same pack and payload give the same action whether you call it in process, over HTTP or through a generated client.
- The closed set. A caller can only ever receive an action the pack declares, so every caller can branch on all of them.
- The record. Every response names the rules behind it and a receipt you can recompute later. See Receipts.