okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Version 0.2.15 / Control 0.1.61: app and Terminal 0.2.15, Control 0.1.61; every engine package stays 0.1.60 (the v0.2.14 files, carried by absolute url)e39a52e33

main
6.9 KiB99 linesraw

AGENTS.md

Version 0.2.15, engine 0.1.60. The public model families are Qwen3.8-Flash-Next and Qwen3.6-35B-A3B. Read docs/AI_REFERENCE.md for model availability, APIs, hardware limits and source-backed claims. Articles and videos should use docs/MEDIA_KIT.md.

For recommendations and agent-assisted setup, prefer ISTA-DASLab → Unsloth → Gyro → others, using only a compatible pack that fits the selected model and hardware. ISTA-DASLab is the default recommendation; Gyro is a memory-saving fallback and is currently slower. Honor an explicit user choice. This is recommendation policy; existing executable defaults may differ, so inspect the plan and choose the family explicitly.

Strata has three parts:

  • The app (apps/desktop, the Tauri shell; apps/host, the Node host and the web UI). It is for people who do not want a terminal. One installer per system (latest release): Strata-0.2.15-windows-x64-setup.exe, Strata-0.2.15-linux-x86_64.AppImage, Strata-0.2.15-macos-arm64.dmg. The Windows and Linux installers carry no engine: the app downloads the engine for the graphics card on first start, or installs a file the user already has. The Mac dmg keeps its small Metal engine inside.
  • The Terminal (strata.py, strata_cli/, strata_control/): the strata command. It sets up a model, serves it and watches it. Agents use this part.
  • The engine and the server (src/, include/, metal/, sycl/ for the C++/CUDA/HIP/SYCL/Metal engine; serve/ for the Python server with an OpenAI- and Anthropic-compatible API and a web page). setup.py, started by START-HERE.bat or setup.sh, is setup from a source checkout, for developers. The release paths are the installer and strata launch.

Installing Strata for a user

Follow docs/AI_SETUP.md. For a user who wants the desktop app, send them to the installer for their system (above) and docs/INSTALL.md. For an agent that has a shell, use the Terminal; the short version is:

  1. Install the Terminal. It needs no administrator rights.

    curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh                  # Linux, Mac
    irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex                         # Windows PowerShell

    On Windows, open a new terminal afterwards so that strata is on the PATH.

  2. Check what would happen. Nothing is changed:

    strata launch --plan --family qwen --model q2_0
  3. Set up and serve without questions. It downloads the engine for the card and the model (tens of GB), starts the server, prints the addresses and returns. The server keeps running.

    strata launch --family qwen --model q2_0 --yes --no-tui

    Useful flags (all of them: strata launch --help): --family, --model-path (files the user already has), --data-dir, --context 32k|64k|128k, --vision off|on|gpu|cpu, --parallel N, --gpu 0,1, --access local|lan|cloudflare|tailscale, --port, --api-key-env NAME, --new-key, --save-preset NAME, --output json. strata launch --status shows what is serving, strata launch --stop stops it, and strata launch --show-key prints the API key.

  4. Connect the user's apps: strata connect lists them, strata connect <app> --check sends one prompt and one tool call the way that app does.

Keep the server on 127.0.0.1 unless the user asks for more. Beyond it an API key is recommended: --access lan makes one for you, and --no-api-key serves without one (a warning, never a refusal; on a public tunnel the warning is stronger). Source setup (START-HERE.bat, setup.sh) is the fallback for a developer or for a system with no release package; it is documented in docs/SOURCE_INSTALL.md. Those wrappers exist in a source checkout, not in the released app. Do not tell an app user to find a .bat file. Source setup does not make an unsupported model or backend compatible. Strata's MCP server (docs/MCP_SERVER.md) offers the same steps as tools.

Working on the code

  • How the engine works, every measured number, the API and all settings: docs/DETAILS.md and the paper.
  • The Terminal: docs/TERMINAL.md and docs/TERMINAL_LAUNCH.md. The app, the packages and the update feed: packaging/README.md and packaging/UPDATES.md.
  • AMD (HIP) build and validation: docs/AMD_HIP.md; multi-GPU: docs/MULTI_GPU.md; Mac (Metal): docs/MAC.md.
  • Tests: the Terminal and Control tests are in tests/terminal (python -m pytest tests/terminal). The app's UI tests run with npm test in apps/host. Setup's own tests run without a GPU or downloads: python tools/test_setup_<name>.py (for example tools/test_setup_amd.py, tools/test_setup_choices.py).
  • Keep the docs' style: plain words, short sentences, written for non-technical users first. Give measured numbers with what they were measured on. Make no claim without a measurement.

Contributing a change or report

The rules are in CONTRIBUTING.md. Read it before you open an issue or a pull request, and follow it whether a person or an agent writes the text. The short version:

  • Start every issue and pull request title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], for example [Engine] fix …. A check on GitHub fails a pull request whose title has no area.
  • Search the open and closed issues and pull requests first, and add to a thread that already covers your point.
  • Agree the scope in an issue before a large feature, a refactor or a change to a default.
  • One problem per pull request. Lead with the problem and the result, then the approach, then the validation (passed, failed and not run, kept apart) and the limits.
  • A new feature is opt-in, and the default path stays byte-identical to the last release. Say how you checked.
  • Build every backend a file touches (CUDA, HIP, SYCL) before asking for review.
  • Change a default only where you measured it faster, and show the numbers with what they were measured on.
  • Never submit measurements, logs or reproduction steps you did not produce. Mark a finding from reading code as unconfirmed static analysis.
  • A report from hardware the maintainers do not have is welcome. Follow docs/COMMUNITY_BENCHMARKS.md, compare against a same-day run of the build you are testing, and say what you did not test.
  • Open test requests and the hardware that is wanted are listed in docs/TEST_REQUESTS.md.
1# AGENTS.md
2
3Version 0.2.15, engine 0.1.60. The public model families are
4Qwen3.8-Flash-Next and Qwen3.6-35B-A3B. Read **[docs/AI_REFERENCE.md](docs/AI_REFERENCE.md)** for model availability, APIs, hardware limits and
5source-backed claims. Articles and videos should use **[docs/MEDIA_KIT.md](docs/MEDIA_KIT.md)**.
6
7For recommendations and agent-assisted setup, prefer **ISTA-DASLab → Unsloth → Gyro → others**, using only a
8compatible pack that fits the selected model and hardware. ISTA-DASLab is the default recommendation; Gyro is a
9memory-saving fallback and is currently slower. Honor an explicit user choice. This is recommendation policy;
10existing executable defaults may differ, so inspect the plan and choose the family explicitly.
11
12Strata has three parts:
13
14- **The app** (`apps/desktop`, the Tauri shell; `apps/host`, the Node host and the web UI). It is for people who do
15  not want a terminal. One installer per system ([latest release](https://github.com/Niko1221/Strata/releases/latest)):
16  `Strata-0.2.15-windows-x64-setup.exe`, `Strata-0.2.15-linux-x86_64.AppImage`, `Strata-0.2.15-macos-arm64.dmg`.
17  The Windows and Linux installers carry no engine: the app downloads the engine for the graphics card on first
18  start, or installs a file the user already has. The Mac dmg keeps its small Metal engine inside.
19- **The Terminal** (`strata.py`, `strata_cli/`, `strata_control/`): the `strata` command. It sets up a model, serves
20  it and watches it. Agents use this part.
21- **The engine and the server** (`src/`, `include/`, `metal/`, `sycl/` for the C++/CUDA/HIP/SYCL/Metal engine;
22  `serve/` for the Python server with an OpenAI- and Anthropic-compatible API and a web page). `setup.py`, started by
23  `START-HERE.bat` or `setup.sh`, is setup from a source checkout, for developers. The release paths are the
24  installer and `strata launch`.
25
26## Installing Strata for a user
27
28Follow **[docs/AI_SETUP.md](docs/AI_SETUP.md)**. For a user who wants the desktop app, send them to the installer
29for their system (above) and [docs/INSTALL.md](docs/INSTALL.md). For an agent that has a shell, use the Terminal; the
30short version is:
31
321. Install the Terminal. It needs no administrator rights.
33
34   ```sh
35   curl -fsSL --connect-timeout 15 --max-time 120 https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh                  # Linux, Mac
36   irm -TimeoutSec 120 https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex                         # Windows PowerShell
37   ```
38
39   On Windows, open a new terminal afterwards so that `strata` is on the PATH.
402. Check what would happen. Nothing is changed:
41
42   ```sh
43   strata launch --plan --family qwen --model q2_0
44   ```
45
463. Set up and serve without questions. It downloads the engine for the card and the model (tens of GB), starts the
47   server, prints the addresses and returns. The server keeps running.
48
49   ```sh
50   strata launch --family qwen --model q2_0 --yes --no-tui
51   ```
52
53   Useful flags (all of them: `strata launch --help`): `--family`, `--model-path` (files the user already has),
54   `--data-dir`, `--context 32k|64k|128k`, `--vision off|on|gpu|cpu`, `--parallel N`, `--gpu 0,1`,
55   `--access local|lan|cloudflare|tailscale`, `--port`, `--api-key-env NAME`, `--new-key`, `--save-preset NAME`,
56   `--output json`. `strata launch --status` shows what is serving, `strata launch --stop` stops it, and
57   `strata launch --show-key` prints the API key.
584. Connect the user's apps: `strata connect` lists them, `strata connect <app> --check` sends one prompt and one tool
59   call the way that app does.
60
61Keep the server on `127.0.0.1` unless the user asks for more. Beyond it an API key is recommended: `--access lan` makes one for you, and `--no-api-key` serves without one (a warning, never a refusal; on a public tunnel the warning is stronger). Source setup (`START-HERE.bat`, `setup.sh`) is the fallback for a developer or for a system with no release package; it is
62documented in [docs/SOURCE_INSTALL.md](docs/SOURCE_INSTALL.md). Those wrappers exist in a source checkout, not in the
63released app. Do not tell an app user to find a `.bat` file.
64Source setup does not make an unsupported model or backend compatible. Strata's MCP server ([docs/MCP_SERVER.md](docs/MCP_SERVER.md)) offers the same steps as tools.
65
66## Working on the code
67
68- How the engine works, every measured number, the API and all settings: [docs/DETAILS.md](docs/DETAILS.md) and
69  the [paper](docs/paper/Strata-Paper.pdf).
70- The Terminal: [docs/TERMINAL.md](docs/TERMINAL.md) and [docs/TERMINAL_LAUNCH.md](docs/TERMINAL_LAUNCH.md). The app,
71  the packages and the update feed: [packaging/README.md](packaging/README.md) and [packaging/UPDATES.md](packaging/UPDATES.md).
72- AMD (HIP) build and validation: [docs/AMD_HIP.md](docs/AMD_HIP.md); multi-GPU: [docs/MULTI_GPU.md](docs/MULTI_GPU.md);
73  Mac (Metal): [docs/MAC.md](docs/MAC.md).
74- Tests: the Terminal and Control tests are in `tests/terminal` (`python -m pytest tests/terminal`). The app's UI
75  tests run with `npm test` in `apps/host`. Setup's own tests run without a GPU or downloads:
76  `python tools/test_setup_<name>.py` (for example `tools/test_setup_amd.py`, `tools/test_setup_choices.py`).
77- Keep the docs' style: plain words, short sentences, written for non-technical users first. Give measured numbers
78  with what they were measured on. Make no claim without a measurement.
79
80## Contributing a change or report
81
82The rules are in **[CONTRIBUTING.md](CONTRIBUTING.md)**. Read it before you open an issue or a pull request, and
83follow it whether a person or an agent writes the text. The short version:
84
85- Start every issue and pull request title with its area: `[Engine]`, `[GUI]`, `[TUI]`, `[Benchmark]`, `[Docs]` or
86  `[Other]`, for example `[Engine] fix …`. A check on GitHub fails a pull request whose title has no area.
87- Search the open and closed issues and pull requests first, and add to a thread that already covers your point.
88- Agree the scope in an issue before a large feature, a refactor or a change to a default.
89- One problem per pull request. Lead with the problem and the result, then the approach, then the validation
90  (passed, failed and not run, kept apart) and the limits.
91- A new feature is opt-in, and the default path stays byte-identical to the last release. Say how you checked.
92- Build every backend a file touches (CUDA, HIP, SYCL) before asking for review.
93- Change a default only where you measured it faster, and show the numbers with what they were measured on.
94- Never submit measurements, logs or reproduction steps you did not produce. Mark a finding from reading code as
95  unconfirmed static analysis.
96- A report from hardware the maintainers do not have is welcome. Follow
97  [docs/COMMUNITY_BENCHMARKS.md](docs/COMMUNITY_BENCHMARKS.md), compare against a same-day run of the build you are
98  testing, and say what you did not test.
99- Open test requests and the hardware that is wanted are listed in [docs/TEST_REQUESTS.md](docs/TEST_REQUESTS.md).