Who it is forA developer or curious user who wants to see typed decisions running in real time before building with them.
The problemIt is hard to judge what a typed decision runtime does until you watch it act in a loop.
The outcomeA terminal Snake game in which each move comes from a local Laya decision, with speed controls.
What you need first
- An Apple Silicon Mac running macOS 14 or later
- Python 3.11 or later
- Internet access for the first checkpoint download, after which inference is fully local
Steps
- Install the demo extra:
pip install 'laya-mlx[demo]' - Download the multilingual checkpoint before the offline demo:
hf download aac6fef/laya-multilingual-mlx - Open a terminal of at least 104 × 35 cells and start the game:
laya-snake - Use Space to pause, the up and down arrows to change speed, R to reset and Q to quit.
- Optionally run
laya-snake --optimize --max-speedto try the compiled and prefix-reuse path.
Prompt for your agent
In the laya-mlx repo (github.com/mizorewww/laya-mlx), install the demo extra and start the laya-snake terminal game in a terminal of at least 104 by 35 cells. Report the moves per second shown and whether any safety intervention occurred. Verify that the game runs without an external API key or network call during play.
Caveat. The Snake frame time is not the one-question latency benchmark, and the README reports its own speed results from one paired M3 Max test.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mizorewww/laya-mlx and "Watch a local Snake agent make live decisions"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer