Appearance
Set up the analyst Since v0.2
The analyst needs a model server. The managed setup uses llama-server from llama.cpp, which the product starts and watches. An external setup calls a model server you run yourself.
Before you begin
- Role: administrator. The
analystsection (likemanagementandha) is changed by administrators only, on every route: the settings form, a whole-document apply or import, a preview, a rollback and a pull all refuse a change to it from an operator. So nobody below admin can pointmanaged.binaryat another program. - Hardware and a model chosen: see Models and providers.
Install the runtime and the model
- The runtime. Install
llama-serverfrom llama.cpp (MIT). It is a separate program and not part of the Spalto package. On macOS:brew install llama.cpp. On Linux, use your distribution's package or a release from github.com/ggml-org/llama.cpp. Note the path (which llama-server). - The model. It is not shipped with the product. Fetch it, or bring it.
- If you run a model server somewhere else (a GPU host), skip step 1 and use an external runtime (below).
sh
waap analyst model list
waap analyst model fetch -dir /var/lib/waap/models qwen3-8bfetch downloads into /var/lib/waap/models by default (-dir DIR for another place), shows progress, and checks the size and SHA-256 pinned in the product. On a mismatch the file is discarded, and nothing half-downloaded is left behind.
Offline sites. Download the same file elsewhere (the Hugging Face repository Qwen/Qwen3-8B-GGUF), carry it on a disk, then import it. The file is checked against the same pinned SHA-256 and copied into place.
sh
waap analyst model import -dir /var/lib/waap/models Qwen3-8B-Q4_K_M.ggufBoth commands print the exact waap settings set analyst ... line to use next.
Turn it on and configure it
text
1. Open Monitor > Analyst > Settings and status (global administrators).
2. Choose the provider, or fill in the runtime fields. Help is under every field,
and values are checked before saving.
3. Select Preview changes, add a comment and select Apply.
4. Select Send test prompt.sh
waap settings get analyst
waap settings set analyst -m "enable analyst" enabled=true managed.binary=/opt/homebrew/bin/llama-server managed.model_file=/var/lib/waap/models/Qwen3-8B-Q4_K_M.gguf
waap analyst testyaml
# analyst in the configuration
analyst:
enabled: true
runtime: managed
managed:
binary: /opt/homebrew/bin/llama-server
model_file: /var/lib/waap/models/Qwen3-8B-Q4_K_M.ggufSettings reference
Runtime
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
enabled | Master switch. | false | true, false | all |
runtime | managed: the product starts and restarts llama-server. external: you run a model server and the product only calls it. | managed | managed, external | all |
endpoint | Managed: the loopback port the product starts the server on. External: where it listens. | 127.0.0.1:8091 | host:port or http://host:port (loopback only), unix:/abs/path, https://host:port (needs ca_file) | all |
provider | A catalog id (waap analyst providers). Empty: use runtime and the keys below. A local provider fills in the runtime and its usual address. A cloud provider needs cloud.opt_in and api_key_file. | empty | catalog id | all |
cloud.opt_in | Your consent that questions and event data (secrets masked) go to the chosen cloud provider. Refused without it. | false | true, false | cloud provider |
model | Model name sent to the server. | qwen3-8b | text | all |
ca_file | PEM file of the CA that signed an external https endpoint. Plain http off the loopback is refused. | empty | absolute path | external https |
api_key_file | A file holding the key your model server or vendor expects as a bearer token (the first line that is not empty or a # comment). Never shown, logged or stored in the configuration; only the path is. A replaced file is picked up at the next question. | empty | absolute path | external runtime or cloud provider; refused for a managed runtime, which gets its own key |
Managed runtime
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
managed.binary | Absolute path of llama-server. | empty | absolute path | managed |
managed.model_file | Absolute path of the .gguf file. | empty | absolute path | managed |
managed.threads | CPU threads. | 0 (automatic) | 0 to 1024 | managed |
managed.context | Context size in tokens. Bigger uses more memory. | 16384 | at least 2048, at most 1048576 | managed |
Limits
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
limits.tool_calls | Look-ups the model may make for one answer. | 8 | up to 32 | all |
limits.rows | Rows in one look-up result. | 25 | up to 500 | all |
limits.tool_bytes | Size of one look-up result. A bigger result costs seconds of prompt processing on small hardware (16 KiB was about 18 s on an M1 Pro with the 8B model). Raise it on faster hardware. | 8 KiB | up to 256 KiB | all |
limits.answer_tokens | Longest answer: a safety cap against a model that keeps writing, not a target. It must fit in managed.context with the question and look-ups. | 4096 | up to 16384 | all |
limits.timeout | Time allowed for one answer. A local 8B model on a laptop writes about 20 tokens per second, so a 4096-token answer needs about 3.5 minutes. | 5m | 5s to 15m | all |
limits.tool_timeout | Time allowed for one data look-up. A look-up that takes longer fails with timeout, and the model may retry. Narrowing the question to one application and a time window is the first remedy. | 10s | 1s up to limits.timeout | all |
limits.queue | Questions allowed to wait. More are refused with "busy". | 4 | up to 1024 | all |
limits.parallel | Answers generated at once. Each gets the whole context, so more means more memory. | 1 | up to 64 | all |
Daily digest
| Setting | What it does | Default | Allowed values | Applies in |
|---|---|---|---|---|
digest.enabled | Writes a daily digest. | false | true, false | active node |
digest.at | Time of day, in the control plane's local time. | 07:00 | HH:MM | digest.enabled |
digest.apps | Applications to write for. Each must exist, so an application listed here cannot be deleted until you remove it from the list. | empty (all) | up to 64 application names | digest.enabled |
An explicit stored limits.* value is kept when defaults change.
How the managed runtime behaves
A managed runtime must use a loopback TCP port. The product starts llama-server bound to 127.0.0.1 only, with the tool-call template, one slot per parallel answer, an 8-bit key/value cache, flash attention, a 1 GiB prompt cache, and the server's own web page and slot listing switched off.
- Restarts. If the process exits, it restarts with a growing delay (1 s up to 1 min). Health is checked every few seconds.
- A hung process. Three failed health checks in a row after it was healthy, or not healthy within 120 s of starting (which allows for loading the model), stop it and restart it with the same growing delay.
- A private key. Every start gets a new random API key (256 bits), handed over in a file only the product's user can read, in a private temporary directory removed when the process stops. It is never on the command line, in a log or in the status, so another local program cannot use the model server.
- Port check. Before each start the product checks the port. If another process holds it (often a
llama-serverleft over after the product was killed), nothing is started, the status says "port in use by another process", and it checks again every minute instead of restarting in a loop. Stop that process (lsof -i :8091) or choose another port.
External runtime
To use a model server you run yourself, set runtime: external, the endpoint, the model, and ca_file and api_key_file if the server needs them.
sh
waap settings set analyst -m "external model server" enabled=true runtime=external endpoint=https://gpu1.example:8443 ca_file=/etc/waap/gpu-ca.pem model=qwen3-14bThe server must support tool calls (llama-server needs --jinja).
Check the status
The Settings and status tab shows whether the analyst is on, whether the model answers, the model name, the process state (running, healthy, restarts, last problem, port in use), the queue, and the speed of the last answers (tokens per second). These details are for administrators.
For everyone else, GET /v1/analyst/status and waap analyst status show only whether the analyst is on and answers, the model name and the queue. The endpoint, error messages (which hold paths and addresses), the process details and the last answer's timing are left out.
Send test prompt (or waap analyst test) asks the model a tiny question. Do it after every change. The model is also checked before every question, so a stopped model gives a clear message at once.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Status says "port in use by another process" | Another process holds the managed port. | Stop it (lsof -i :8091) or choose another port. |
| Questions are refused with "busy" | More questions waiting than limits.queue. | Wait, or raise limits.queue. |
A look-up fails with timeout | A slow event store or a wide question. | Narrow the question to one application and a time window, or raise limits.tool_timeout. |
| The configuration is refused for a cloud provider | cloud.opt_in is off, or no api_key_file. | Set both. |