Bialy: built on Laya to cut frontier-model work
The expensive part of an AI coding agent is the frontier model, and a surprising share of what it is asked to do on every call is sorting. Which of dozens of tools does this request need? Which pages of instructions apply? Which files in the repository matter?
Painted Wolf Code 1.0 hands that sorting to Bialy, our tuned local decision engine built on Convai Innovations’ Laya. By the time your provider sees a request, the tools are loaded, the instructions are trimmed, and the most relevant code is at the top.
Every call pays for the whole catalog
A capable agent carries a lot: dozens of tool definitions, pages of instructions for using them well, and a roster of skills for specific kinds of work. There are two usual ways to handle that, and both cost you.
Send everything with every call, and the model rereads the whole catalog each time, on your bill. Send a lean prompt and let the model ask for what it needs, and every ask is another round trip to the frontier model, seconds long and billed like any other call.
The right answer is to know, before the first call, what this particular request needs. That is a decision, not a piece of writing, and it doesn’t need a frontier model.
A model that decides instead of writing
Laya is an open decision model that Convai Innovations released in September 2026 under the Apache-2.0 license. It isn’t a chatbot. You give it a situation and a typed question, and it returns calibrated probabilities in a single forward pass. It writes no text at all, so it can only choose among the options it is given. Its authors put the idea plainly: “not every AI problem requires an autoregressive chatbot.”
That is exactly the shape of the sorting problem, and it makes Laya small and fast enough to run on a laptop.
Three jobs before the first call
At every turn, Painted Wolf Code asks Bialy about the request in your own words, alongside a few facts about the chat: which tools it may use, what it has been doing, whether workers are running.
It loads what the work needs. One question covers every tool the chat may use, and the ones the request will likely call join the first model call. The best-fitting skill can be read ahead of time, while the skill catalog stays out of the prompt. When the agent does need something more, it can describe the need in plain words, and Bialy matches the description to the right tool or skill.
It prunes the rest. Instructions that belong to a tool the turn didn’t load stay out of the prompt with it. Other guidance is left out when Bialy is confident the request doesn’t need it. Pruning only narrows over a session: once a piece of guidance has been sent, it keeps being sent. That keeps the start of the prompt stable, so providers that cache prompts keep reusing what they already cached.
It reranks your code. When the agent summarizes part of a repository or reads its map of the project, Painted Wolf Code first ranks files and definitions by the words they share with the task, then Bialy rescores the top candidates by what they mean. It helps most where it matters most: when the request doesn’t use the same words as the code.
The frontier model starts every turn with what it needs, less to read, and the best material at the top. Turns take fewer calls and finish sooner.
What it can’t touch
Bialy chooses only among options the chat already allows. It cannot add a tool the chat couldn’t use, change a permission, or answer an approval. Everything the model can do is still bounded by the same sandbox and approvals as before.
It cuts only what it is confident the request doesn’t need, and anything it cut is one request away. If the model is missing or unavailable, a readiness card says so and the app keeps working: the agent reads a little more and finds a little less on its own.
One run, side by side
We built the same browser chess game twice, once without Bialy and once with it.
One side-by-side run: the same browser chess game, built without and with Bialy.
System prompt, first turn −36%
Prompt tokens, first turn −6,550
230,000+ fewer prompt tokens across the session's 35 model calls, about two novels' worth of text
On the first turn, the instructions the model received shrank by more than a third: about five pages of text it no longer had to read. That saving repeats on every call. Across the session’s 35 model calls it added up to more than 230,000 prompt tokens, roughly two novels’ worth of text your provider never had to read and you never paid for.
That saving is consistent across thousands of open-source benchmark tasks: every token the frontier model doesn’t need is a token it doesn’t read, and you never pay for.
Built to run on your Mac
Bialy runs natively inside the app on our own engine, written in Rust. Its inference core started from laya-candle, a Rust port of Laya on Hugging Face’s candle, and on Apple silicon it uses Apple’s MLX to answer on your Mac’s GPU. There is no Python, no server, and no extra setup.
The model ships inside the app, so there is nothing to download, and every decision happens on your machine. Nothing Bialy reads to prepare a turn is sent anywhere.
The decision heads on top of Laya are ours, and they are open weights under Apache-2.0. They answer a coding agent’s own questions: which tool, which instructions, which file. We trained our heads on benchmark sessions across open-source repositories, scored across open models — never user code or telemetry. Every decision leaves a receipt on your machine: what Bialy read and what it answered.
For extension authors
Bialy reads the descriptions your pack ships, so the description is what gets your work loaded. A skill is ranked against every request by its description, and prompt units, the instruction text a pack ships for the turns that need it, are kept or pruned by theirs. Write each one for the request, not the file: say what someone is asking for when it matters. A pack can then ship many skills and units without each one costing prompt space on every turn.
Thanks
Laya is the work of Convai Innovations, and the Rust port that started our engine is the work of the laya-candle authors. Both are open source, as are candle and MLX underneath them. The full list of what Painted Wolf Code is built with is on the site.
Painted Wolf Code 1.0 is available for macOS.