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.

68 projects

laya-laravel

maeandrew

Adds a Laravel AI classification provider that sends typed questions to a self-hosted Laya server

0·GitHub repo

laya-api-go

jstdlee

A Go REST API serves requests through a persistent Python Laya runtime worker

0·GitHub repo

laya-mlx-jev-compat

matt-starburst

Serves a local MLX Laya model through a Jev-compatible HTTP endpoint

0·GitHub repo

laya

EduardoGHdez

A Ruby library runs the Laya decision model locally with ONNX Runtime

0·GitHub repo

homebrew-tap

madeye

Provides Homebrew formulae, including one for OpenZL-Laya local integer routing

0·GitHub repo

laya-go

metalagman

Provides an embeddable Go runtime for local Laya inference and typed decision routing

0·GitHub repo

laya-serve

c4bbage

Serves Laya inference with Go, dynamic batching, and TensorRT or CUDA execution

0·GitHub repo

laya-decision-web

LeeeeeeM

Runs a local browser demo for Laya decisions in Snake and side-scrolling game scenarios

0·GitHub repo

ruby_llm-providers-laya

codenamev

A RubyLLM provider uses local ONNX Laya checkpoints to answer judge questions

0·GitHub repo

ruby_decision_model-providers-laya

codenamev

Adds a local ONNX-backed Laya provider to the Ruby decision-model gem

0·GitHub repo

quarkus-langchain4j-jev-laya

kdubois

Integrates Jev and self-hosted Laya decision backends into a Quarkus LangChain4j agent

0·GitHub repo

Reflex

dimpu47

Routes infrastructure alerts using Jev or local Laya decision model APIs

0·GitHub repo

ohmylaya

QuBiit0

Installs laya.cpp and exposes local Laya decisions to coding agents through MCP and an agent skill

0·GitHub repo

layajev

metalagman

A Go server runs Laya locally behind a Jev-compatible decision API

0·GitHub repo

intents

ezeike

Documents and sketches decision-model patterns for routing user input to application actions

0·GitHub repo

laya-mc-bot

LixiaoLeo123

Minecraft bots use Laya decision models alongside external LLM harnesses

0·GitHub repo
P

glove-classifier

porkytheblack

Provides typed-decision adapters, cascades, and tools for Glove agents, including Laya and Jev backends

0·npm package

decision-making-model-testing-laya

APouzi

Provides a Svelte interface and Go backend for experimenting with Laya decision models

0·GitHub repo

laya-android

edwardmonteiro

An Android space dogfight uses Laya’s typed decisions to control an enemy fighter

0·GitHub repo

email-decider

Lucasborges198

Provides a Go HTTP gateway that forwards email intent decisions to a Laya-powered Python service

0·GitHub repo

gutcheck

sgaunet

A Go client for typed-decision APIs compatible with Jev and self-hosted Laya

0·GitHub repo

jev-spaceshooter-demo-laya

jstdlee

Steers a retro space shooter with Laya decision models through a local API

0·GitHub repo

laya-plays-mtg

FabioCeleste

A Magic: The Gathering Arena draft companion uses fine-tuned Laya models for picks and deckbuilding

0·GitHub repo

codepilot

GorbunovS

Indexes code and provides MCP search tools with Laya-powered reranking

0·GitHub repo

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