Start the server
BONSAI_MODEL / BONSAI_FAMILY select (see Quickstart) and also serves a built-in web chat at http://localhost:8080.
On Apple Silicon there is a second option, an MLX-backed server on its own port:
The endpoint
| Base URL | http://localhost:8080/v1 (llama.cpp) or http://localhost:8081/v1 (MLX) |
| API key | Any non-empty string; it isn’t checked |
| Model ID | Any string works for llama-server (it serves the one loaded model); GET /v1/models returns the real name |
What the script configures
start_llama_server.sh doesn’t just launch llama-server; it applies Bonsai’s recommended settings:
| Setting | Value | Meaning |
|---|---|---|
-c 0 | auto | Fit the context window to available memory (up to the model max) |
-ngl | auto | Offload all layers to GPU when one is available |
--temp | 0.5 | Recommended sampling temperature |
--top-p | 0.85 | Recommended nucleus sampling |
--top-k | 20, --min-p 0 | Recommended truncation settings |
--reasoning-budget 0, enable_thinking: false | off | Disables the chat template’s thinking mode |
Thinking mode defaults differ by size. Bonsai 27B is a reasoning model and serves with thinking on by default; toggle it per request with
thinking_budget_tokens (0 disables it, -1 is unlimited), cap it server-wide with --reasoning-budget N, or disable it entirely with BONSAI_THINKING=0. The 8B/4B/1.7B demo scripts still disable thinking (enable_thinking: false) by default for faster responses.llama-server, e.g. ./scripts/start_llama_server.sh -c 32768 to pin the context size.
Call it
Connect a tool
Open WebUI
A ChatGPT-style interface; one script starts everything.
OpenClaw
Bridge Bonsai into a personal AI agent gateway.
Hermes
Run the Hermes terminal agent on local Bonsai.
All integrations
Everything that speaks OpenAI-compatible.