git, curl, and enough disk for the model you pick (see sizes). Everything else, including Python tooling and the inference engine, is installed by the setup script.
Examples use
BONSAI_MODEL=27B. Set 8B, 4B, or 1.7B for a smaller model; everything else is identical. If you skip step 2 entirely, setup uses its defaults: BONSAI_MODEL=27B, BONSAI_FAMILY=ternary.Install and run
Choose your model (optional)
Run setup
./scripts/download_models.sh (or re-run setup).Start a server instead
Prefer a browser UI or an API endpoint? The repo ships an OpenAI-compatible server:./scripts/start_openwebui.sh starts the server and Open WebUI together. See Run the server for flags, sampling defaults, and API examples.
What setup actually does
Even on a fresh machine,setup.sh / setup.ps1:
- Installs system build tools (Xcode Command Line Tools on macOS,
build-essentialon Linux) - Installs uv and creates a Python virtualenv in
.venv/ - Downloads the selected model from Hugging Face into
models/ - Downloads pre-built llama.cpp binaries for your platform into
bin/, or builds from source if none match - On Apple Silicon, builds MLX from source for GPU acceleration
Bonsai-demo directory removes everything else.
Next steps
Run the server
The OpenAI-compatible endpoint, its defaults, and API examples.
Connect your tools
OpenClaw, Hermes, Ollama, and anything OpenAI-compatible.
Pick the right model
Size, family, and format trade-offs with real numbers.
Troubleshooting
Port conflicts, slow generation, models that won’t load.