Skip to content

laya-cli

Command-line tool for Laya typed decisions with presets, batch streaming, shortlisting, evaluation and a resident daemon.

CLIbetaApache-2.0

Overview

laya-cli is a standalone command-line interface for Laya, built for humans (pretty tables) and AI agents (JSON or JSONL). It loads the model once and asks many choice, score and noul questions in a single forward pass, about 33 ms for one question or 7 ms per question batched on a T4 per the README. A router auto-detects script and language and dispatches to the English or multilingual checkpoint.

Presets for triage, email, guard, moderation and routing pass through Laya's built-in question sets and can be merged with custom questions. For high-cardinality choices such as Banking77's 77 intents, an embedding shortlist narrows options to restore accuracy. Batch mode streams JSONL after a single model load. Filter and evaluate commands sort results and report accuracy, precision at a threshold and escalation rate. An optional resident daemon keeps the model in memory so repeated calls skip a 10 to 35 second load. It installs with uv, pip or pipx.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich label fits this input (e.g. Banking77 intent)?—
ScoreOrdinal score question from a preset or custom file—
Yes / noIs the input on topic? (e.g. filter on_topic>=0.4)—

How it works

  1. Install laya-cli and choose a preset or question file
  2. Run predict or classify on inputs, optionally streaming JSONL
  3. Router picks the checkpoint; shortlist narrows large label sets
  4. Filter or evaluate results against thresholds
  5. Optionally keep the model resident with laya-cli serve

Strengths

  • Agent-friendly JSON output
  • Shortlisting for many-option tasks
  • Evaluation metrics including escalation rate
  • Daemon avoids repeated model loads

Caveats

  • Model load takes 10-35 s without the daemon
  • Accuracy limited by Laya's base checkpoints
  • Third-party CLI

Getting started

uv tool install laya-cli, then laya-cli --help.

At a glance

Type
CLI
Status
beta
Language
Python
Runtime
CLI and local daemon
Has code
yes
License
Apache-2.0

Use cases and integrations

How curated lists describe it

Frequently asked questions

Do I need a cloud key?

No, it runs Laya locally.

How do I handle 77 labels?

Use --shortlist-k to narrow options with embeddings before asking.

Why use the daemon?

It keeps the model loaded, avoiding a 10-35 second load on each call.

Related projects

  • Python batching proxy that asks the same Jev questions about many states and streams answers back as Apache Arrow tables.

    ProxyprototypePython
  • Go harness for System One models: hosted Jev, open Kev in-process via llama.cpp, and Cloudflare Clef, with typed helpers and a CLI.

    ServicebetaGo
  • TypeScript library for one-line local decisions with open models (kev-0.6b, kev-4b, open-jev), no API keys or cloud.

    ProjectbetaTypeScript
  • Swift 6 bridge that runs System One decision models behind Apple's Foundation Models API, on device with Laya or via hosted endpoints.

    ProjectbetaSwift
  • PHP library, extracted from LLPhant, for typed Jev Noul, Choice and Score calls, also usable with a Laya endpoint.

    LibrarybetaPHP
  • Unofficial Rust gateway routing /v1/systemone requests to TypeSafe, Vercel, OpenRouter or local Laya via an editable DAG.

    ProxybetaRust