Evidence-driven systems performance platform
Measure real work → experiment with reversible settings → keep only what statistically improves.
Docs site · Releases · Hardware support · Changelog · Sponsors
Kraftverk is Swedish-inspired: kraftverk means power plant, powerhouse, or power station — a facility that converts energy into usable power through engineered process, not wishful thinking.
That metaphor is intentional. Kraftverk treats your machine like a plant under instrumentation: measure the work, change one controllable input at a time, validate the output, and keep only what the data supports.
| Language cue | Swedish kraft (power / force) + verk (works / plant) |
| Product reading | A performance powerhouse for AMD systems |
| Flag | 🇸🇪 — cultural etymology only |
Independent product. Kraftverk is not affiliated with, endorsed by, or sponsored by Advanced Micro Devices, Inc., the Kingdom of Sweden, or any Swedish government entity. “AMD� in this repository means CPU/GPU vendor identity detected on the host (CPUID / PCI), not a partnership claim. Kraftverk does not use AMD logos and makes no “official AMD� claim.
Kraftverk is a local-first performance engineering instrument for AMD x86/x86_64 systems. It:
- Discovers hardware facts and enforces an AMD-only eligibility gate (
amd-only-v1) - Runs KraftBench — real, deterministic workloads with checksums where practical
- Builds a Kraft Index (baseline-normalized composite score)
- Searches reversible tunables (process-scoped workers, priority, affinity; privileged power schemes via agent)
- Accepts a candidate only after statistical validation against the baseline
- Persists experiments, sessions, receipts, and HTML/JSON reports in a local SQLite store
- Offers a CLI, optional privileged agent, and a desktop instrument (default local web UI; optional Tauri)
It is designed for people who want evidence, not marketing FPS claims.
| Not this | Why it matters |
|---|---|
| A PC “cleaner� | No temp-folder theater, no registry spray-and-pray |
| A placebo FPS booster | No magic buttons; no invented scores |
| A cloud optimization service | Telemetry and history stay on your machine |
| An AMD-endorsed product | Independent tool; trademark disclaimer above |
| A firmware / BIOS flash utility | No irreversible firmware changes in scope |
| A cross-vendor tuner | Intel CPU / NVIDIA or Intel GPU hosts are blocked |
Every optimization must improve measured performance, efficiency, stability, latency, thermal behavior, or instrumentation quality. No fabricated telemetry. No silent irreversible tweaks.
flowchart LR
M[Measure] --> E[Experiment]
E --> V[Validate]
V --> K{Keep or Revert}
K -->|Keep| L[Learn]
K -->|Revert| L
L -->|Repeat| M
Expanded loop
- Measure — KraftBench samples + telemetry snapshot
- Experiment — propose a reversible candidate (search strategy)
- Apply — journaled apply + verify
- Benchmark — re-measure under the candidate
- Validate — stability gate + comparison class vs baseline
- Keep or Revert — commit only validated accepts; otherwise rollback
- Learn — history, insights, lineage, receipts
- Repeat — until budget / plateau / neighborhood exhausted
This is a hard gate across CLI, desktop, SDK, agent, and optimizer — not a cosmetic preference.
| Requirement | Rule |
|---|---|
| Architecture | x86 / x86_64 only (compile_error! on other targets) |
| CPU | AMD (AuthenticAMD) via CPUID |
| GPU | None → allowed; if present, all must be AMD (PCI vendor 0x1002) |
| Blocked | Intel CPU; NVIDIA (0x10DE); Intel GPU (0x8086); mixed AMD+NVIDIA; unknown vendors |
Exit codes 20–25
| Code | Meaning |
|---|---|
| 20 | Unsupported architecture |
| 21 | Intel CPU detected |
| 22 | NVIDIA GPU detected |
| 23 | Intel GPU detected |
| 24 | Unknown CPU vendor |
| 25 | Unsupported combination (mixed / unknown GPU / other) |
There is no production --force bypass. Tests may inject facts via the kraftverk-system/mock-platform feature.
Inspect-only (no gate — useful to explain why a machine is blocked):
kraftverk compatibility
kraftverk hardware
kraftverk amd cpu
kraftverk amd gpuHot-plug: if an NVIDIA GPU appears mid-session, Kraftverk stops experiments, restores managed config, and blocks further execution.
Full policy: docs/hardware-support.md · platforms: docs/platforms.md.
KraftBench runs real deterministic workloads. Scores come from wall-clock timing of completed work, with checksums where practical. Categories include:
| Category | Examples |
|---|---|
| CPU | Integer single/multi, float, hashing, compression; compile-proxy / scaling suites |
| Memory | Sequential R/W proxy, random chase, allocation |
| Storage | Seq/rand R/W only under Kraftverk scratch (never Documents/Desktop) |
| System | Thread create, barrier sync, wake latency |
| Realtime | Pipeline / parse / parallel stand-ins; responsiveness index |
| GPU | AMD Vulkan via ash (buffer-copy bandwidth, compute, reduction/hash-style) when an AMD Vulkan device is present; otherwise honest Unsupported skip — never fabricated |
GPU benches are behind the kraftverk-bench feature gpu (default on). Sustained windows: kraftverk benchmark --sustained 10m.
Methodology notes: docs/benchmarking.md (some older “M1 unsupported GPU� lines are superseded by the Vulkan backend shipped in current main).
A weighted composite of category scores:
- Each measurement contributes a higher-is-better score
- Within a category, scores combine with a geometric mean
- Categories blend with documented weights
- Missing categories cause renormalization over present weights
- Baseline mean raw composite maps to 10,000
- Later runs:
index = (raw / baseline_raw) * 10000
Default weights (no GPU measurements): CPU 0.40 · Memory 0.20 · Storage 0.15 · System 0.10 · Realtime 0.15 · GPU 0.00
With real GPU measurements (KraftIndexWeights::with_gpu): CPU 0.34 · Memory 0.17 · Storage 0.13 · System 0.09 · Realtime 0.12 · GPU 0.15
Details: docs/kraft-index.md.
Per-sample summaries include mean, median, CoV, percentiles, and approximate CIs. Candidate vs baseline comparison classes:
CONFIRMED_IMPROVEMENT · LIKELY_IMPROVEMENT · NO_SIGNIFICANT_CHANGE · LIKELY_REGRESSION · CONFIRMED_REGRESSION · UNSTABLE_RESULT
These are decision aids, not formal lab hypothesis tests. See docs/statistics.md.
kraftverk optimize --mode safe --goal balanced
kraftverk optimize --mode balanced --goal compile
kraftverk optimize --mode aggressive --goal throughput| Mode | Intent |
|---|---|
safe |
Reversible, low-risk, process/workload-scoped knobs |
balanced |
Broader reversible search within safe knobs |
aggressive |
Widest reversible search; still no irreversible firmware |
Goals: balanced · gaming · compile · workstation · throughput · latency · efficiency · sustained · quiet
kraftverk optimize --strategy hill-climb
kraftverk optimize --strategy epsilon-greedy
kraftverk optimize --strategy bayesian| Strategy | Behavior |
|---|---|
hill-climb |
Deterministic neighborhood climb (default family; seedable) |
epsilon-greedy |
ε-greedy multi-armed bandit with decay |
bayesian |
Gaussian-process style + expected improvement |
Also: --seed, --max-experiments, --time-budget-secs, --max-temp, --max-power, --max-workers, --resume <session-id>.
- Allow-listed parameters only for in-process safe tuning (
bench.worker_threads,bench.rayon_threads,process.priority,process.affinity) - Apply → verify → rollback with a recovery journal (
ApplyGuard) - Search iterations roll back; only validated accepts remain applied
kraftverk restore/kraftverk restore --baselineclears active accepted config- Crash recovery restores interrupted applies on launch
- Storage benches refuse user content roots
- Optimizer
--max-temp/--max-powerenforce only when real sensor readings exist
See docs/safety.md · docs/optimizer.md.
kraftverk report --format html
kraftverk report --format json -o report.json
kraftverk receipt <experiment-id>
kraftverk receipt --verify path/to.kraft-receipt.json
kraftverk explain <id>
kraftverk compare <a> <b>
kraftverk analyze recentcrates/
├── kraftverk-core/ # Domain models, stats, Kraft Index, goals/constraints
├── kraftverk-system/ # Platform + hardware eligibility + sensors/telemetry
├── kraftverk-bench/ # KraftBench workloads (CPU… + optional AMD Vulkan GPU)
├── kraftverk-optimizer/ # Search strategies, profiles, objectives
├── kraftverk-data/ # SQLite store, reports, receipts, sessions
├── kraftverk-agent/ # Privileged agent + authenticated local IPC
├── kraftverk-sdk/ # Stable facade re-exports for integrations
├── kraftverk-cli/ # `kraftverk` binary
└── kraftverk-desktop/ # Desktop instrument (web UI default; Tauri optional)
flowchart TB
CLI[kraftverk-cli] --> SDK[kraftverk-sdk]
DESK[kraftverk-desktop] --> SDK
SDK --> CORE[kraftverk-core]
SDK --> SYS[kraftverk-system]
SDK --> BENCH[kraftverk-bench]
SDK --> OPT[kraftverk-optimizer]
SDK --> DATA[kraftverk-data]
SDK --> AGENT[kraftverk-agent]
BENCH --> CORE
BENCH --> SYS
OPT --> CORE
OPT --> SYS
SYS --> CORE
DATA --> CORE
AGENT --> CORE
AGENT --> SYS
CLI -.->|IPC| AGENT
Control flow (simplified): CLI opens a session (fingerprint, DB, journal recovery) → baseline/benchmark → optimize proposes candidates → ApplyGuard → measure → compare → rollback or commit.
More: docs/architecture.md · diagram asset: assets/architecture-flow.svg.
Binary name: kraftverk. Global flags: --json, -q / --quiet, -v / --verbose, -h, -V.
| Command | Purpose |
|---|---|
inspect |
Hardware / OS facts and machine fingerprint |
compatibility |
Inspect-only AMD compatibility report (no gate) |
hardware |
Inspect-only CPU/GPU inventory (CPUID + PCI) |
amd cpu / amd gpu |
AMD capability surfaces (honest unset when unknown) |
baseline |
Create baseline Kraft Index (→ 10,000) |
benchmark |
Run KraftBench without creating a baseline (--sustained) |
optimize |
Search + validate (--mode, --goal, --strategy, …) |
status |
Current status, baseline, active candidate |
history |
Recent experiments |
explain <id> |
Explain an experiment (prefix ok) |
compare |
Compare two experiments |
profiles |
List optimization profiles + support status |
profile list|recommend|export|inspect|validate|apply |
Profile package workflow |
restore [--baseline] |
Roll back active accepted changes |
capabilities |
Platform capability matrix |
doctor |
Health / environment checks (incl. agent / sensors) |
insights |
Derived insights from history |
lineage |
Experiment lineage |
sessions |
List optimize sessions |
report |
HTML/JSON evidence report |
chase [COMMAND]... |
Time an external command |
analyze [TARGET] |
Analyze experiment id or recent |
receipt |
Export or --verify an evidence receipt |
agent serve|status |
Privileged agent (authenticated local IPC) |
dev |
Development helpers (feature-gated) |
kraftverk --help
kraftverk optimize --help
kraftverk agent --helpDefault build is a local axum web UI (CI-safe; no WebView SDK required):
cargo run -p kraftverk-desktop
# → http://127.0.0.1:47821/Optional Tauri native shell (feature tauri-app; requires WebView2 on Windows / webkit2gtk on Linux):
cargo run -p kraftverk-desktop --no-default-features --features tauri-appSame local SQLite / eligibility gate as the CLI. Hardware blockers and Safety Center live in the desktop instrument UI.
Typed control client for the same HTTP API: packages/sdk (@theworker02/kraftverk-sdk).
| Resource | Link |
|---|---|
| Product / docs site | https://theworker02.github.io/kraftverk/ |
| GitHub Releases | https://github.com/theworker02/kraftverk/releases |
| Changelog | CHANGELOG.md |
| Development | DEVELOPMENT.md · docs/DEVELOPMENT.md |
| Doc index | docs/ |
| API stability | docs/api-stability.md |
| Roadmap | docs/roadmap.md |
- Open Releases
- Download the x86_64 Windows or x86_64 Linux artifact for the latest tag
- Verify checksums if published with the release
- Place
kraftverk(and optionallykraftverk-desktop/kraftverk-agent) on yourPATH
Official release targets are AMD-capable x86_64 Windows and Linux only.
Prerequisites: Rust 1.75+, Windows or Linux x86_64 (macOS: inspect/bench only — no full parity claim).
git clone https://github.com/theworker02/kraftverk.git
cd kraftverk
cargo build --release -p kraftverk-cli
cargo build --release -p kraftverk-desktop
cargo build --release -p kraftverk-agentInstall the CLI binary onto your Cargo bin path:
cargo install --path crates/kraftverk-cliLibrary crates may also be consumed from a git dependency or (when published) crates.io — see License for proprietary terms.
# Build
cargo build --release -p kraftverk-cli
# Am I eligible?
cargo run -p kraftverk-cli -- compatibility
cargo run -p kraftverk-cli -- hardware
# Inspect + health
cargo run -p kraftverk-cli -- inspect
cargo run -p kraftverk-cli -- doctor
# Establish baseline Kraft Index (= 10,000)
cargo run -p kraftverk-cli -- baseline
# Optional: run benches without writing a new baseline
cargo run -p kraftverk-cli -- benchmark --sustained 10m
# Search reversible candidates (safe mode)
cargo run -p kraftverk-cli -- optimize --mode safe --goal balanced --strategy hill-climb
# Try alternate search plugins
cargo run -p kraftverk-cli -- optimize --strategy epsilon-greedy
cargo run -p kraftverk-cli -- optimize --strategy bayesian
# Review
cargo run -p kraftverk-cli -- status
cargo run -p kraftverk-cli -- history
cargo run -p kraftverk-cli -- report --format html
# Roll back accepted changes if needed
cargo run -p kraftverk-cli -- restore --baselinePrivileged agent (elevated terminal recommended for power.scheme):
cargo run -p kraftverk-cli -- agent serve
cargo run -p kraftverk-cli -- agent statusDesktop:
cargo run -p kraftverk-desktopLabeled illustrative output — values vary by machine, suite version, and seed. Not a guarantee of improvement.
$ kraftverk compatibility
policy: amd-only-v1
status: supported
cpu: AuthenticAMD
gpu: AMD (0x1002) × 1
$ kraftverk baseline --samples 5 --seed 42
baseline kraft_index: 10000.0
raw_composite: 1.000 (normalized)
categories: cpu=… memory=… storage=… system=… realtime=… gpu=skipped(Unsupported: no AMD Vulkan)
$ kraftverk optimize --mode safe --goal balanced --strategy hill-climb --max-experiments 8
session: 7f3a…
candidate: bench.worker_threads 8→12
decision: LIKELY_IMPROVEMENT → validating…
validation: CONFIRMED_IMPROVEMENT (stability PASS)
accepted: kept applied; receipt written
$ kraftverk status
baseline: 10000.0
active_candidate: worker_threads=12
last_decision: CONFIRMED_IMPROVEMENT
Telemetry is local, minimal, and never invents temperatures, watts, or scores.
Always collected (process-visible): timestamp, CPU %, memory used/total, process count, coarse load hint, environmental noise estimate.
OS-backed when present
| Reading | Linux | Windows |
|---|---|---|
| CPU package / die temp | hwmon (k10temp, zenpower, …) |
ACPI thermal zones (WMI); OEM-dependent |
| AMD GPU temp | amdgpu hwmon when present |
Not linked via ADL; unset unless OS exposes a zone |
| Package power | RAPL energy deltas / hwmon power | Limited — no portable free API; remains unset |
Unavailable readings stay null with a reason. See docs/telemetry.md and kraftverk doctor.
Not collected: fan RPM, GPU clocks/utilization via vendor SDK, network identities, undocumented MSR poking.
Profiles — named goal/mode packages and .kraft JSON documents:
kraftverk profiles
kraftverk profile list
kraftverk profile recommend
kraftverk profile export
kraftverk profile inspect <path>
kraftverk profile validate <path>
kraftverk profile apply <path>Chase — time an external command under Kraftverk’s harness:
kraftverk chase --samples 3 -- cargo build --releaseReports & analysis
kraftverk report --format html -o evidence.html
kraftverk report --format json
kraftverk insights
kraftverk lineage
kraftverk sessions --limit 20
kraftverk analyze recentThe privileged agent is operational on current main:
- CLI:
kraftverk agent serve·kraftverk agent status - Authenticated local IPC only (Windows named pipe
\\.\pipe\kraftverk-agent; Linux Unix socket under the Kraftverk data dir) - Auth token under app data
agent/auth.token - Allow-listed elevated ops include
process.priority,process.affinity,power.scheme - Hardware eligibility re-checked on start and before sensitive ops
kraftverk doctorreports agent OK/FAIL
Trust boundary: user-privilege CLI for safe knobs; elevated changes go through the authenticated agent — no network bind.
Reporting: private GitHub security advisory on theworker02/kraftverk — see SECURITY.md and docs/security.md.
Geometric turbine / optimization-loop mark — engineering aesthetic, not gamer lightning.
| Asset | Path |
|---|---|
| Mark / favicon | assets/mark.svg, assets/favicon.svg |
| Logo | assets/logo.svg, assets/logo-dark.svg |
| Wordmark | assets/wordmark.svg |
| Architecture flow | assets/architecture-flow.svg |
| Swedish flag accent | assets/swedish-flag.svg |
Guidelines: docs/branding.md.
If Kraftverk helps your AMD systems work, you can support development via:
- GitHub Sponsors: https://github.com/sponsors/theworker02
- thanks.dev: https://thanks.dev/u/gh/theworker02
Configured in .github/FUNDING.yml.
- CONTRIBUTING.md — evidence-only rules, AMD gate preservation, conventional commits
- CODE_OF_CONDUCT.md
- SECURITY.md
By submitting a contribution you grant the Copyright Holder rights to include it under the project’s proprietary terms (see LICENSE). Opening a PR does not re-license the project.
Typical checks:
cargo fmt --all
cargo clippy --workspace --all-targets
cargo test --workspace --features kraftverk-system/mock-platform| Phase | Status |
|---|---|
| Milestone 1 — measurable foundation | Complete |
| 0.2 expansive platform (crate consolidation, KraftBench v2, reports, desktop) | Complete |
| Milestone 2 — agent IPC, sensors, ε-greedy/Bayesian, Tauri optional, Vulkan GPU | Complete in 0.2.2 |
| Remaining honest limits | Windows package power / AMD GPU temp without ADL unset; GPU benches need AMD Vulkan; Tauri needs WebView deps; macOS no full parity |
| Milestone 3+ | Richer GPU suites, local regression dashboards, optional paper/CI exports |
Explicit non-roadmap: placebo cleaners, undocumented silent tweaks, cheating benchmarks.
See docs/roadmap.md · CHANGELOG.md.
| Area | Status |
|---|---|
| AMD eligibility gate (CLI / desktop / SDK / agent / optimizer) | Working |
compatibility / hardware / amd cpu|gpu |
Working (inspect-only) |
inspect / doctor / capabilities |
Working |
| KraftBench v2 (CPU scaling, compile proxy, responsiveness, sustained) | Working |
| AMD Vulkan GPU benches | Working when AMD Vulkan present; else honest Unsupported |
| Sensors (Linux hwmon/RAPL; Windows ACPI thermal) | OS-backed when present; power limited on Windows; never fabricated |
baseline / benchmark [--sustained] |
Working |
optimize goals, constraints, sessions/resume, hot-plug recheck |
Working |
| Search: hill-climb / ε-greedy / Bayesian | Working (--strategy) |
history / explain / compare / lineage / insights |
Working |
profile export/inspect/apply/validate/recommend |
Working |
report html/json · receipt · chase / analyze |
Working |
| Desktop web UI | Working (default) |
| Tauri native shell | Optional (--features tauri-app) |
Privileged agent (agent serve|status, IPC auth) |
Working |
Source-available proprietary — evaluation under LICENSE; commercial / production use via COMMERCIAL.md. See LICENSE_TRANSITION_NOTICE.md and NOTICE.
This project is proprietary. Production use, redistribution, and commercial deployment require a written commercial license or completed acquisition. See LICENSE and ACQUISITION.md. Contact @theworker02.
Buyer-facing diligence materials live in docs/acquisition/. Commercial licensing contact path: COMMERCIAL.md.
| Badge | Meaning |
|---|---|
| docs live | Public documentation / Pages surface for kraftverk |
| release v1.0.0 | Stable tagged release with narrative notes |
| license | See repository LICENSE for terms |
| status maintained | Actively kept in the @theworker02 portfolio |
| version 1.0.0 | Documentation and brand completeness milestone |
| pages enabled | Site intended at https://theworker02.github.io/kraftverk/ |
Detailed narrative for the stable line lives in CHANGELOG.md and the v1.0.0 GitHub Release.