Decisions as a Service
Sign Up Now →Sign Up Now

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.

AvailableDecision Runtime 0.3.1

Pick the shape#

You wantUseRead
One decision endpoint that services in any language call over JSONThe decision service, serving a pack on your own hostServe decisions to other languages
A typed client, so callers get compile-time names for the pack's fields and actionsAn SDK generated from the pack's manifestSDK generation
A decision that reads free text and can abstainThe hosted reasoning service's POST /v1/decideAsk the reasoning service

Serve a pack#

  1. 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.

  2. 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.