### Run Kronk Examples via Makefile Source: https://github.com/ardanlabs/kronk/blob/main/README.md Execute predefined example tasks using the project's Makefile. These commands will download necessary libraries and models on the first run. ```shell make example-question # Ask a local language model a question. make example-agent # Run a small coding agent. make example-vision # Prompt a vision model with an image. make example-bucky # Transcribe an audio file with Bucky. make example-malina # Generate an image with experimental Malina. ``` -------------------------------- ### Install native libraries Source: https://github.com/ardanlabs/kronk/blob/main/CONTRIBUTING.md Install required llama.cpp and whisper.cpp bundles and local libraries. ```sh make install-kronk kronk libs --local kronk bucky libs --local ``` -------------------------------- ### Download project modules Source: https://github.com/ardanlabs/kronk/blob/main/CONTRIBUTING.md Download dependencies for the root and example modules. ```sh go mod download (cd examples && go mod download) ``` -------------------------------- ### Install Kronk via Go Source: https://github.com/ardanlabs/kronk/blob/main/README.md Install the Kronk CLI directly using the Go toolchain on supported platforms. ```shell go install github.com/ardanlabs/kronk/cmd/kronk@latest kronk server start ``` -------------------------------- ### Install Kronk via Homebrew Source: https://github.com/ardanlabs/kronk/blob/main/README.md Use Homebrew to install the Kronk CLI on macOS or Linux systems. ```shell brew install ardanlabs/kronk/kronk kronk server start ``` -------------------------------- ### Run Kronk Server Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Starts the Kronk container with CPU inference, mapping port 11435 and mounting a volume for data persistence. ```bash docker run --rm -p 11435:11435 -v kronk-data:/kronk ghcr.io/ardanlabs/kronk:latest ``` -------------------------------- ### Build BUI frontend Source: https://github.com/ardanlabs/kronk/blob/main/CONTRIBUTING.md Commands for installing dependencies and running the BUI development server. ```sh cd cmd/server/api/frontends/bui npm ci npm run build npm run dev # local development server ``` -------------------------------- ### Configure Embedded Authentication Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Example configuration for running the embedded authentication service. ```shell KRONK_AUTHORIZATION_MODE=full-protected KRONK_WEB_ADMIN_ENABLED=true ``` -------------------------------- ### Format Go source files Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/astroids.md Use this command to format the specified Go source file according to standard Go conventions. ```sh gofmt -s -w asteroids/main.go ``` -------------------------------- ### Configure environment variables for Kronk Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Set the base URL and authentication tokens required for API requests. ```shell export KRONK_URL=http://localhost:11435 export USER_TOKEN= export ADMIN_TOKEN= ``` -------------------------------- ### Initial Game Screen Layout Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/tic-tac-toe.md The expected output format for the game board and score display. ```text Score: X: 0 | O: 0 | Draws: 0 1 | 2 | 3 ----------- 4 | 5 | 6 ----------- 7 | 8 | 9 Player X's turn. Enter a number (1-9): ``` -------------------------------- ### Define player prompt strings Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/tic-tac-toe.md Exact prompts required for player input. ```text Player X's turn. Enter a number (1-9): Player O's turn. Enter a number (1-9): ``` -------------------------------- ### Run NVIDIA GPU Container Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Executes the container with NVIDIA GPU support. Requires the NVIDIA Container Toolkit. ```bash docker run --rm --runtime=nvidia --gpus all -p 11435:11435 -v kronk-data:/kronk ghcr.io/ardanlabs/kronk:latest-cuda ``` ```bash docker run --rm --runtime=nvidia --gpus '"device=0,1"' -p 11435:11435 -v kronk-data:/kronk ghcr.io/ardanlabs/kronk:latest-cuda ``` ```bash docker run --rm --runtime=nvidia --gpus '"device=GPU-3a1f...,GPU-9b2e..."' -p 11435:11435 -v kronk-data:/kronk ghcr.io/ardanlabs/kronk:latest-cuda ``` -------------------------------- ### Verify model discovery access Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Test model discovery with and without authentication tokens. ```shell curl -i "$KRONK_URL/v1/models" ``` ```shell curl -i \ -H "Authorization: Bearer $USER_TOKEN" \ "$KRONK_URL/v1/models" ``` -------------------------------- ### Run BenchmarkHybrid_IMC Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Executes the BenchmarkHybrid_IMC benchmark. This command tests the performance of the Hybrid model with in-memory caching. ```bash go test -run=none -bench=BenchmarkHybrid_IMC -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### Run BenchmarkDense_IMC Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Executes the BenchmarkDense_IMC benchmark. This command is used to test the performance of the Dense model with in-memory caching. ```bash go test -run=none -bench=BenchmarkDense_IMC -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### Configure External Authentication Host Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Settings for connecting to a standalone authentication service. ```shell KRONK_AUTHORIZATION_MODE=full-protected KRONK_AUTH_HOST=auth.example.internal:6000 ``` -------------------------------- ### Run BenchmarkDense_IMC Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Command to run the BenchmarkDense_IMC test. This benchmark tests the in-memory caching dense model. ```bash go test -run=none -bench=BenchmarkDense_IMC$ -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### Run NVIDIA Jetson Container Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Deploys the container for Jetson hardware. Requires JetPack 6+ and the NVIDIA container runtime. ```bash docker run --rm --runtime nvidia \ -e NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics \ -p 11435:11435 -v kronk-data:/kronk \ ghcr.io/ardanlabs/kronk:jetson ``` ```bash docker run --rm --runtime nvidia \ --entrypoint nvidia-smi \ ghcr.io/ardanlabs/kronk:jetson ``` -------------------------------- ### Run BenchmarkMoE_IMC Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Executes the BenchmarkMoE_IMC benchmark. This command tests the performance of the Mixture of Experts (MoE) model with in-memory caching. ```bash go test -run=none -bench=BenchmarkMoE_IMC -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### Run BenchmarkDense_NonCaching Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Command to run the BenchmarkDense_NonCaching test. This benchmark tests the non-caching dense model. ```bash go test -run=none -bench=BenchmarkDense_NonCaching -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### Set Production Authorization Mode Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Recommended mode for production environments using endpoint-specific grants. ```shell KRONK_AUTHORIZATION_MODE=full-protected ``` -------------------------------- ### Run AMD GPU (ROCm) Container Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Configures the container for AMD ROCm support. The host user must belong to the render and video groups. ```bash docker run --rm \ --device=/dev/kfd --device=/dev/dri \ --group-add video --group-add render \ --security-opt seccomp=unconfined \ -p 11435:11435 -v kronk-data:/kronk \ ghcr.io/ardanlabs/kronk:latest-rocm ``` -------------------------------- ### Handle VRAM AutoFit Return Values Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md The vram.AutoFit function now returns a boolean indicating if a verified placement was found. Update existing assignments to include this fourth return value. ```go gpuLayers, expertLayers, result, fits := vram.AutoFit(input, constraints) if !fits { // No placement was verified against the supplied capacity. } ``` -------------------------------- ### Configure RAM Session Store Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Use the RAM store as the default session storage mechanism. ```yaml session-store-kind: ram ``` -------------------------------- ### Run Vulkan Container Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Executes the Vulkan-enabled image across different hardware vendors. Requires Mesa Vulkan drivers on the host. ```bash docker run --rm --device=/dev/dri --group-add video --group-add render \ -p 11435:11435 -v kronk-data:/kronk \ ghcr.io/ardanlabs/kronk:latest-vulkan ``` ```bash docker run --rm --runtime=nvidia --gpus all \ -e NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics \ -p 11435:11435 -v kronk-data:/kronk \ ghcr.io/ardanlabs/kronk:latest-vulkan ``` ```bash docker run --rm --device=/dev/dri --group-add video --group-add render \ -p 11435:11435 -v kronk-data:/kronk \ ghcr.io/ardanlabs/kronk:latest-vulkan ``` ```bash # Select by PCI ID (format: :) # 1002 = AMD, 8086 = Intel, 10de = NVIDIA docker run --rm --device=/dev/dri --group-add video --group-add render \ -e MESA_VK_DEVICE_SELECT='1002:744c' \ -p 11435:11435 -v kronk-data:/kronk \ ghcr.io/ardanlabs/kronk:latest-vulkan ``` -------------------------------- ### Validate Go package changes Source: https://github.com/ardanlabs/kronk/blob/main/CONTRIBUTING.md Set required environment variables and run standard Go toolchain checks and tests. ```sh export RUN_IN_PARALLEL=yes export GITHUB_WORKSPACE="$(pwd -P)" go fix ./path/to/changed/package gofmt -s -w path/to/changed.go go vet ./path/to/changed/package staticcheck ./path/to/changed/package go build ./path/to/changed/package go test -count=1 ./path/to/changed/package ``` -------------------------------- ### Run BenchmarkMoE_IMC Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Command to run the BenchmarkMoE_IMC test. This benchmark tests the in-memory caching Mixture of Experts model. ```bash go test -run=none -bench=BenchmarkMoE_IMC$ -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### Verify Server Liveness Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Checks the server status using the liveness endpoint. ```bash curl http://localhost:11435/v1/liveness ``` -------------------------------- ### Run BenchmarkHybrid_NonCaching Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Command to run the BenchmarkHybrid_NonCaching test. This benchmark tests the non-caching hybrid model. ```bash go test -run=none -bench=BenchmarkHybrid_NonCaching -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### Run BenchmarkHybrid_IMC Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Command to run the BenchmarkHybrid_IMC test. This benchmark tests the in-memory caching hybrid model. ```bash go test -run=none -bench=BenchmarkHybrid_IMC$ -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### ParamTooltip for One-Off Explanations Source: https://github.com/ardanlabs/kronk/blob/main/cmd/server/api/frontends/bui/src/components/AGENTS.md Use ParamTooltip with the text prop for custom, one-off tooltip explanations that do not belong in the shared registry. ```tsx ``` -------------------------------- ### BenchmarkMoE_NonCaching Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Presents the performance metrics for BenchmarkMoE_NonCaching, showing the efficiency of the MoE architecture. ```text BenchmarkMoE_NonCaching-18 3 105772311917 ns/op 13935 avg-prompt-tok 9283 lastT-ttft-ms 88.89 tok/s 104448 total-ms 6243 ttft-ms 8609504 B/op 69016 allocs/op ``` -------------------------------- ### Verify project compilation Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/astroids.md Compile the project to ensure the code is valid without executing the resulting binary. ```sh go build -o /tmp/asteroids-game ./asteroids ``` -------------------------------- ### Configure Authorization Mode Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Set the global authorization mode for the Kronk API. ```shell KRONK_AUTHORIZATION_MODE= ``` -------------------------------- ### Run BenchmarkMoE_NonCaching Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Command to run the BenchmarkMoE_NonCaching test. This benchmark tests the non-caching Mixture of Experts model. ```bash go test -run=none -bench=BenchmarkMoE_NonCaching -benchtime=3x -timeout=30m ./sdk/kronk/tests/benchmarks/ ``` -------------------------------- ### Required Helper Function Signatures Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/tic-tac-toe.md These helper functions are required for managing the game state and rendering the board. ```go func renderBoard(b *Board, xWins, oWins, draws int) func hasWinner(b *Board) bool func boardFull(b *Board) bool ``` -------------------------------- ### Define Chat Completions tool_choice modes Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Valid string values for the tool_choice parameter in Chat Completions. ```json "tool_choice": "none" "tool_choice": "auto" "tool_choice": "required" ``` -------------------------------- ### BenchmarkHybrid_IMC Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Displays the performance metrics for BenchmarkHybrid_IMC, illustrating the benefits of in-memory caching for the Hybrid model. ```text BenchmarkHybrid_IMC-18 3 23209232764 ns/op 13597 avg-prompt-tok 579.0 lastT-ttft-ms 70.33 tok/s 23579 total-ms 661.9 ttft-ms 471620765 B/op 51219 allocs/op ``` -------------------------------- ### Initialize Last Move State Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/tic-tac-toe.md Variable to track the index of the most recent move. ```go lastMove := -1 ``` -------------------------------- ### Restore External Network Listeners Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Set these environment variables to bind the API and debug servers to all network interfaces instead of the default loopback address. ```shell KRONK_WEB_API_HOST=0.0.0.0:11435 KRONK_WEB_DEBUG_HOST=0.0.0.0:11445 ``` -------------------------------- ### BenchmarkDense_IMC Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Displays the performance metrics for BenchmarkDense_IMC, highlighting improvements due to in-memory caching. ```text BenchmarkDense_IMC-18 3 11834920611 ns/op 13189 avg-prompt-tok 563.0 lastT-ttft-ms 181.6 tok/s 12023 total-ms 449.1 ttft-ms 2608010026 B/op 49414 allocs/op ``` -------------------------------- ### Verify Vulkan Devices Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Checks available Vulkan devices inside a running container. ```bash docker exec -it vulkaninfo --summary ``` -------------------------------- ### Update Model Batch Configuration Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Replaces separate nbatch and nubatch settings with a single prefill-batch-size configuration. ```yaml # Before nbatch: 8192 nubatch: 2048 # After prefill-batch-size: 2048 ``` -------------------------------- ### BenchmarkHybrid_NonCaching Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Presents the performance metrics for BenchmarkHybrid_NonCaching, showcasing the efficiency of the Hybrid model. ```text BenchmarkHybrid_NonCaching-18 3 90281838681 ns/op 13592 avg-prompt-tok 7841 lastT-ttft-ms 72.04 tok/s 92457 total-ms 5275 ttft-ms 8942952 B/op 47393 allocs/op ``` -------------------------------- ### Retain Essential Auth Settings Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Configuration variables that remain relevant for authentication infrastructure. ```shell KRONK_WEB_ADMIN_ENABLED KRONK_AUTH_HOST KRONK_AUTH_LOCAL_ISSUER KRONK_AUTH_TLS_ENABLED KRONK_AUTH_TLS_CA_FILE KRONK_AUTH_TLS_SERVER_NAME ``` -------------------------------- ### BenchmarkMoE_IMC Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Performance metrics for BenchmarkMoE_IMC. Shows operations per second, token throughput, and latency. ```text BenchmarkMoE_IMC-18 3 27567692833 ns/op 13941 avg-prompt-tok 1041 lastT-ttft-ms 80.76 tok/s 27236 total-ms 1023 ttft-ms 46779733146 B/op 72177 allocs/op ``` -------------------------------- ### Parse MoE Mode Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md MoE mode now uses a registered enum. Use ParseMoEMode or predefined package constants instead of arbitrary strings. ```go mode, err := model.ParseMoEMode(value) // Or use model.MoEModeExpertsCPU and the other predefined values. ``` -------------------------------- ### BenchmarkDense_NonCaching Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Displays the performance metrics for BenchmarkDense_NonCaching, including operations per second, average prompt tokens, and memory allocations. ```text BenchmarkDense_NonCaching-18 3 46945175292 ns/op 13185 avg-prompt-tok 4628 lastT-ttft-ms 188.8 tok/s 47655 total-ms 2838 ttft-ms 14678621 B/op 45920 allocs/op ``` -------------------------------- ### Define player move functions Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/tic-tac-toe.md Required function signatures for player input handling in the game loop. ```go func playerX(b *Board) int func playerO(b *Board) int ``` -------------------------------- ### Verify Docker Hub Image Signature Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Use this command to verify images hosted on Docker Hub by pointing to the sibling signature repository. ```bash COSIGN_REPOSITORY=ardanlabs/kronk-signatures \ cosign verify ardanlabs/kronk:latest \ --certificate-identity-regexp \ 'https://github.com/ardanlabs/kronk/.github/workflows/docker.yml@.*' \ --certificate-oidc-issuer https://token.actions.githubusercontent.com ``` -------------------------------- ### Configure MCP Service Settings Source: https://github.com/ardanlabs/kronk/blob/main/AGENTS.md JSON configuration for the Kronk MCP service, including remote URL and available APIs. ```json "mcp": { "Kronk": { "type": "remote", "url": "http://localhost:9000/mcp", "type": "streamableHttp", "apis": [ { "api": "web_search", "desc": "Performs a web search for the given query. Returns a list of relevant web pages with titles, URLs, and descriptions. Use this for general information gathering, research, and finding specific web resources." } ], } } ``` -------------------------------- ### BenchmarkDense_IMC Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Performance metrics for BenchmarkDense_IMC. Shows operations per second, token throughput, and latency. ```text BenchmarkDense_IMC-18 3 12729809986 ns/op 13179 avg-prompt-tok 606.0 lastT-ttft-ms 180.0 tok/s 12576 total-ms 488.4 ttft-ms 22532774578 B/op 50833 allocs/op ``` -------------------------------- ### Transcribe an audio file Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Send an audio file to the API for transcription using the specified model. ```bash curl -X POST http://localhost:11435/v1/audio/transcriptions \ -F file=@samples/jfk.wav \ -F model=ggml-tiny.bin \ -F response_format=json ``` -------------------------------- ### BenchmarkHybrid_IMC Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Performance metrics for BenchmarkHybrid_IMC. Shows operations per second, token throughput, and latency. ```text BenchmarkHybrid_IMC-18 3 26467337750 ns/op 13597 avg-prompt-tok 641.0 lastT-ttft-ms 61.59 tok/s 26474 total-ms 725.8 ttft-ms 5150030317 B/op 51617 allocs/op ``` -------------------------------- ### BenchmarkMoE_IMC Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-05-20.txt Displays the performance metrics for BenchmarkMoE_IMC, indicating the impact of in-memory caching on the MoE model. ```text BenchmarkMoE_IMC-18 3 23896815000 ns/op 13941 avg-prompt-tok 863.0 lastT-ttft-ms 90.54 tok/s 23476 total-ms 858.2 ttft-ms 5429249586 B/op 71679 allocs/op ``` -------------------------------- ### Pull a Whisper model Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Use this command to download a specific Whisper model into the container. ```bash docker exec -it kronk bucky model pull ggml-tiny.bin ``` -------------------------------- ### Define Project Structure Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/astroids.md The required directory layout for the Asteroids game project. ```text asteroids/ ├── main.go └── static/ ├── index.html ├── styles.css └── game.js ``` -------------------------------- ### Enable Streaming Usage in JSON Request Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Include the stream_options object with include_usage set to true to receive token accounting in streaming responses. ```json { "stream": true, "stream_options": { "include_usage": true } } ``` -------------------------------- ### Configure Authenticated Mode Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Use this mode for clients that require JWTs but do not need endpoint-specific grants. ```shell KRONK_AUTHORIZATION_MODE=authenticated ``` -------------------------------- ### Verify management endpoint permissions Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Test integrity management endpoints with different privilege levels. ```shell curl -i \ -H "Authorization: Bearer $USER_TOKEN" \ "$KRONK_URL/v1/kronk/models/integrity" ``` ```shell curl -i \ -H "Authorization: Bearer $ADMIN_TOKEN" \ "$KRONK_URL/v1/kronk/models/integrity" ``` -------------------------------- ### ParamTooltip for Dynamic Labels Source: https://github.com/ardanlabs/kronk/blob/main/cmd/server/api/frontends/bui/src/components/AGENTS.md Use ParamTooltip with the tooltipKey prop for dynamic labels within loops where the key is a variable. Ensure the key is cast to TooltipKey. ```tsx ``` -------------------------------- ### BenchmarkMoE_NonCaching Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Performance metrics for BenchmarkMoE_NonCaching. Shows operations per second, token throughput, and latency. ```text BenchmarkMoE_NonCaching-18 3 118138395194 ns/op 13935 avg-prompt-tok 11218 lastT-ttft-ms 82.74 tok/s 121863 total-ms 7351 ttft-ms 8681885 B/op 69421 allocs/op ``` -------------------------------- ### BenchmarkDense_NonCaching Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Performance metrics for BenchmarkDense_NonCaching. Shows operations per second, token throughput, and latency. ```text BenchmarkDense_NonCaching-18 3 46505497625 ns/op 13175 avg-prompt-tok 5280 lastT-ttft-ms 181.4 tok/s 49455 total-ms 2944 ttft-ms 15410741 B/op 47344 allocs/op ``` -------------------------------- ### BenchmarkHybrid_NonCaching Results Source: https://github.com/ardanlabs/kronk/blob/main/sdk/kronk/tests/benchmarks/runs/2026-04-26.txt Performance metrics for BenchmarkHybrid_NonCaching. Shows operations per second, token throughput, and latency. ```text BenchmarkHybrid_NonCaching-18 3 103946375639 ns/op 13592 avg-prompt-tok 8876 lastT-ttft-ms 62.26 tok/s 106804 total-ms 6092 ttft-ms 8984472 B/op 47756 allocs/op ``` -------------------------------- ### Remove Legacy Auth Settings Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Deprecated configuration variables that should be removed after upgrading. ```shell KRONK_AUTH_LOCAL_ENABLED KRONK_AUTH_ADMIN_ENABLED ``` -------------------------------- ### Remove Disk Session Store Configuration Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md The disk-backed session store is no longer supported. Remove these fields from your configuration. ```yaml session-store-kind: disk session-store-dir: /var/lib/kronk ``` -------------------------------- ### Enable External Auth Enforcement Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Required setting on the external auth service to enforce authentication. ```shell AUTH_AUTH_ENABLED=true ``` -------------------------------- ### Verify GHCR Image Signature Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Use this command to verify images hosted on GitHub Container Registry where signatures are co-located. ```bash cosign verify ghcr.io/ardanlabs/kronk:latest \ --certificate-identity-regexp \ 'https://github.com/ardanlabs/kronk/.github/workflows/docker.yml@.*' \ --certificate-oidc-issuer https://token.actions.githubusercontent.com ``` -------------------------------- ### Update ChatStreaming Method Signature Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md The ChatStreaming method now returns an error alongside the response channel, requiring updates to existing call sites to handle startup validation errors. ```go // Before ch := mdl.ChatStreaming(ctx, request) // After ch, err := mdl.ChatStreaming(ctx, request) if err != nil { // The request failed validation before streaming started. } ``` -------------------------------- ### Define Undo Prompt Text Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/tic-tac-toe.md Required prompt strings for player input. ```text Player X's turn. Enter a number (1-9), or 0 to undo the last move: Player O's turn. Enter a number (1-9), or 0 to undo the last move: ``` -------------------------------- ### labelWithTip for Table Rows Source: https://github.com/ardanlabs/kronk/blob/main/cmd/server/api/frontends/bui/src/components/AGENTS.md Use the labelWithTip function for creating labels in table rows (e.g., KeyValueTable, KVRow) that require a tooltip. ```tsx labelWithTip('Label Text', 'tooltipKey') ``` -------------------------------- ### Verify public liveness endpoint Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Check that the liveness endpoint remains accessible without authentication. ```shell curl -i "$KRONK_URL/v1/liveness" ``` -------------------------------- ### Update forced function tool_choice Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Replace bare function name strings with the structured OpenAI function object. ```json "tool_choice": "get_weather" ``` ```json "tool_choice": { "type": "function", "function": { "name": "get_weather" } } ``` -------------------------------- ### POST /v1/audio/transcriptions Source: https://github.com/ardanlabs/kronk/blob/main/DockerHub.md Transcribes an audio file using a specified Whisper model. ```APIDOC ## POST /v1/audio/transcriptions ### Description Transcribes an audio file into text using the specified Whisper model. ### Method POST ### Endpoint http://localhost:11435/v1/audio/transcriptions ### Parameters #### Request Body - **file** (file) - Required - The audio file to transcribe (e.g., .wav, .webm, .mp4, .ogg, .m4a) - **model** (string) - Required - The name of the Whisper model to use (e.g., ggml-tiny.bin) - **response_format** (string) - Optional - The format of the response (e.g., json) ### Request Example curl -X POST http://localhost:11435/v1/audio/transcriptions \ -F file=@samples/jfk.wav \ -F model=ggml-tiny.bin \ -F response_format=json ``` -------------------------------- ### Set BUI Password Digest Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Define the SHA-256 password digest for protected BUI login. ```shell KRONK_WEB_ADMIN_PASSWORD_SHA_256= ``` -------------------------------- ### Identify Management API Routes Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md List of routes requiring Admin JWT access in management-restricted modes. ```text GET /v1/kronk/models GET /v1/kronk/models/integrity GET /v1/kronk/models/integrity/{model} ``` -------------------------------- ### Banned Verbose Tooltip Pattern Source: https://github.com/ardanlabs/kronk/blob/main/cmd/server/api/frontends/bui/src/components/AGENTS.md This pattern is banned and should not be used. Always prefer the dedicated FieldLabel or labelWithTip APIs. ```tsx // ❌ DO NOT DO THIS {PARAM_TOOLTIPS.xxx && } ``` -------------------------------- ### Owner Contact Information Source: https://github.com/ardanlabs/kronk/blob/main/README.md Contact details for the project owner, Bill Kennedy. ```text Name: Bill Kennedy Company: Ardan Labs Title: Managing Partner Email: bill@ardanlabs.com BlueSky: https://bsky.app/profile/goinggo.net LinkedIn: www.linkedin.com/in/william-kennedy-5b318778/ Twitter: https://x.com/goinggodotnet ``` -------------------------------- ### Disable BUI for External Auth Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Disable the BUI when using external auth providers to avoid security conflicts. ```shell KRONK_WEB_ADMIN_ENABLED=false ``` -------------------------------- ### Update HTTP Error Response Format Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Transition from a flat error structure to the new nested envelope format for all application-level errors. ```json { "code": "invalid_argument", "message": "..." } ``` ```json { "error": { "message": "...", "type": "invalid_request_error", "code": "invalid_argument" } } ``` -------------------------------- ### Set External Auth Issuer Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Maintain the issuer string to ensure existing JWTs remain valid. ```shell AUTH_AUTH_ISSUER="kronk project" ``` -------------------------------- ### Define invalid move error message Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/tic-tac-toe.md Required error message for invalid user input. ```text Invalid move. Enter an empty position from 1 to 9. ``` -------------------------------- ### Classify Request Validation Errors Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md Use errors.Is to identify model.ErrInvalidRequest, allowing callers to correct invalid parameters instead of retrying. ```go if errors.Is(err, model.ErrInvalidRequest) { // Correct the request rather than retrying it unchanged. } ``` -------------------------------- ### Define winning index triples Source: https://github.com/ardanlabs/kronk/blob/main/examples/talks/tic-tac-toe.md The eight winning combinations to check against the board state. ```text {0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {0, 3, 6}, {1, 4, 7}, {2, 5, 8}, {0, 4, 8}, {2, 4, 6} ``` -------------------------------- ### FieldLabel with Trailing Badge Source: https://github.com/ardanlabs/kronk/blob/main/cmd/server/api/frontends/bui/src/components/AGENTS.md Use FieldLabel with the 'after' prop to display a label alongside a trailing badge or indicator, such as a status dot. ```tsx ●}>Label ``` -------------------------------- ### FieldLabel for Form Labels Source: https://github.com/ardanlabs/kronk/blob/main/cmd/server/api/frontends/bui/src/components/AGENTS.md Use FieldLabel for standard form elements like inputs, selects, and checkboxes to associate a label with a tooltip. ```tsx Label Text ``` -------------------------------- ### Define Responses API forced function Source: https://github.com/ardanlabs/kronk/blob/main/BREAKING_CHANGES.md The flat forced-function structure required for the Responses API. ```json "tool_choice": { "type": "function", "name": "get_weather" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.