Altai Node — Linux
==================

    ./altai-node

That profiles the machine, writes a suggested allocation to
$XDG_CONFIG_HOME/altai/altai.toml (or ~/.config/altai/altai.toml), serves a control page
on http://127.0.0.1:18090 and joins. Every value it proposed is adjustable on the page or
with `altai-node set`.

On a headless machine:

    ./altai-node --no-browser          # page, but nothing tries to open it
    ./altai-node --no-ui               # no page at all
    ./altai-node status                # ceilings, without a running node

Forward the port to see the page from your laptop:

    ssh -N -L 18090:127.0.0.1:18090 you@that-machine


The serving engine
------------------

If this archive contains an `engine/` directory beside `altai-node`, the engine is
already here and there is nothing to do. The node looks there first.

If it does not, the node will say it cannot serve, and the page will say so plainly. No
published build of llama.cpp includes the RPC backend that splitting a model across
machines needs, so it has to be built from source. Two ways to give the node one:

    ./engine/                          put the built binaries here, beside altai-node
    ALTAI_ENGINE_BIN=/path/to/bin      or point at them where they already are

What you set in ALTAI_ENGINE_BIN wins over whatever shipped — unless that directory
holds no engine, in which case the node falls back to a bundled one if there is one, and
says so. The node needs `llama-server` and `ggml-rpc-server`, and the libraries they
load, in one directory.


Stopping it
-----------

SIGINT or SIGTERM. Both drain — in-flight work finishes, the node deregisters, and the
engine it supervises is stopped rather than left running.


What this never does
--------------------

- Exceed a limit you set
- Expose the inference engine to the network. It binds 127.0.0.1 and is reached only
  through an authenticated tunnel
- Transmit your signing key. It is generated on this machine and never leaves it
- Accept an inbound connection from the coordinator. This node dials out, which is also
  why it works behind a NAT with nothing forwarded


Options
-------

    ./altai-node --help
