Laya for Go, Java, Elixir, Ruby and Zig
Beyond Python and JavaScript, the community has ported Laya to several other languages. Most run an ONNX export with ONNX Runtime, a few reimplement the model natively, and some are thin clients for a Python process or HTTP server.
33 projects
typesafe-mcp
itsmostafa
Connects AI agents to typed-decision models through an MCP server
lev
jlt-commons
Implements a typed decision engine using Laya checkpoints and GGUF chat models
laya_ex
ChristianAlexander
Provides a native Nx and Bumblebee runtime for ConvAI Innovations' Laya model
ruby-laya
codenamev
Provides a Ruby port of Laya with typed decisions, checkpoint routing, and ONNX Runtime inference
zlaya
dip-proto
Runs Laya inference locally in Zig, including native and WebAssembly targets
Laya4j
githubMJ
A Java 17+ SDK runs Laya typed-decision models through ONNX Runtime
laya-onnx
MstyAI
Runs Laya decision models locally with ONNX Runtime through a Go library and CLI
laya-go
neko233-com
Provides a Go server and agent integrations for structured Laya decisions
laya-zig
li-ming1
Runs the Laya decision model on CPU with a dependency-free Zig runtime
elixir-jev
fbettag
Provides Elixir typed judgments backed by hosted Jev or a persistent local Laya model
laya-go
lengoman
Provides Go types, routing, batching, and transports for using local Laya checkpoints
system-one-router
mmornati
A Go gateway routes prompts to language models using Jev or a locally running Laya decision model
laya-decision-api
bmw8080
An HTTP service wraps local Laya with OpenAPI documentation and Java, TypeScript, and Python SDKs
SystemOneSharp
pinkroosterai
Provides a .NET client for Jev and Jev-compatible local Laya servers
meldecision
meldltd
Serves Laya decision models through a GoFiber API using ONNX Runtime
homebrew-laya-mac-serve
chrisns
Provides a Homebrew tap for installing Laya Serve, a macOS app exposing an OpenAI-compatible classifier endpoint
sample-laya-mlx-http
daisuzz
Serves Laya MLX decisions through a local System One API with a Kotlin client
laya-laravel
maeandrew
Adds a Laravel AI classification provider that sends typed questions to a self-hosted Laya server
laya-api-go
jstdlee
A Go REST API serves requests through a persistent Python Laya runtime worker
laya-mlx-jev-compat
matt-starburst
Serves a local MLX Laya model through a Jev-compatible HTTP endpoint
laya
EduardoGHdez
A Ruby library runs the Laya decision model locally with ONNX Runtime
homebrew-tap
madeye
Provides Homebrew formulae, including one for OpenZL-Laya local integer routing
laya-go
metalagman
Provides an embeddable Go runtime for local Laya inference and typed decision routing
laya-serve
c4bbage
Serves Laya inference with Go, dynamic batching, and TensorRT or CUDA execution
Go
laya-onnx (MstyAI) is a Go library and CLI on ONNX Runtime for macOS and glibc Linux:
go install github.com/MstyAI/laya-onnx/cmd/laya-onnx@latest
laya-onnx prepare
Preparation downloads about 819 MiB. laya-go (lengoman) (go get github.com/lengoman/laya-go) is a Go client that drives a Python laya sidecar or server. system-one-router is a Go LLM gateway that uses local Laya or Jev to pick a model.
Java
Laya4j runs the multilingual checkpoint through ONNX Runtime Java and needs Java 17+:
<dependency>
<groupId>com.laya4j</groupId>
<artifactId>laya4j-core</artifactId>
<version>0.2.0</version>
</dependency>
It mirrors the Python presets (triage, guard, moderation, model router). The README reports 148 ms p50 for a 5-question predict on a Mac M4 CPU.
Elixir
laya_ex is a native Nx/Bumblebee runtime that downloads the official checkpoint on first load. It does not choose an Nx backend, so configure one, for example EMLX.Backend on Apple Silicon or EXLA.Backend on CPU and NVIDIA.
Ruby
ruby-laya is a port with a Router and a declarative Laya::Decision class, running on ONNX Runtime (Ruby 3.3+):
bundle add ruby-laya
laya (EduardoGHdez) is a smaller gem (gem "laya") that runs the receptron ONNX export on CPU.
Zig
zlaya is a CPU-only engine that can also build to WebAssembly. It needs Zig nightly:
zig build -Doptimize=ReleaseFast
sh scripts/download-model.sh models/laya
zig-out/bin/zlaya models/laya examples/triage.json
The README gives about 1.7 GiB of RAM for loading and inference. laya-zig is a dependency-free Zig runtime for the multilingual model, and its author labels it a work in progress.
Caveats
These are independent community projects with different maturity levels. Check each one's parity tests against the Python reference before relying on its probabilities.
More ways to use Laya