Docs
Models & routing
Bots run on the CLIs you already use, on API keys or on your own server. The Laya router picks who answers in a channel, and which model and effort a bot set to auto uses.
Engines
- Host CLIs:
claude,codexandgrok, supervised by kwant, with their own file and shell tools. - Provider APIs: Anthropic, OpenAI and xAI keys.
- Custom API: any server that speaks the OpenAI chat API (OpenRouter, LM Studio and others) or the Anthropic Messages API.
Each bot has a preferred model. Set it to auto and kwant picks the model and effort for every message.
Accounts
Each engine can have several accounts, with a default, a priority order and automatic failover when one runs out of usage. See Accounts & profiles.
The Laya router
Laya picks which bot answers in a channel, and which model and effort a bot set to auto uses. It's a small Python service, and kwnt serve manages it for you:
- On first run it installs
laya[serve]into~/.kwnt/laya/venv, withuvwhen present orpython3 -m venvotherwise. - It starts
laya-serveand downloads the English checkpoint (about 420 MB) on first start. - It restarts Laya if it exits, and stops it when kwant shuts down.
The header shows the router's status: green online, amber installing or loading, red offline. While Laya is unavailable, kwant routes by keyword and says so on the routing card.
| Setting | config.toml | Environment | Default |
|---|---|---|---|
| Laya URL | laya_url | LAYA_URL | http://127.0.0.1:8000 |
| Manage a local Laya | laya_managed | KWNT_LAYA_MANAGED=0 or --no-laya to disable | on |
| Checkpoints to preload | laya_models | KWNT_LAYA_MODELS | english |
Existing laya-serve | KWNT_LAYA_SERVE_BIN |
kwant only starts Laya for loopback URLs. If Laya already answers, for example from Docker, kwant uses it as is.
~/.kwnt/laya/hf from another machine. After that, Laya starts offline.