kronk

module
v1.29.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: Apache-2.0

README

kronk logo

Copyright 2025-2026 Ardan Labs

hello@ardanlabs.com

https://kronkai.com

Kronk

This project lets you use Go for hardware accelerated local inference with llama.cpp and whisper.cpp directly integrated into your Go applications via the yzma and bucky modules. Kronk provides a high-level API that feels similar to using an OpenAI compatible API.

This project also provides a model server for chat completions, responses, messages, embeddings, reranking, and audio transcription. The server is compatible with OpenWebUI, OpenCode, and the Claude Code project.

To see all the documentation, clone the project and run the Kronk Model Server:

$ make kronk-server

$ make website

You can also install Kronk, run the Kronk Model Server, and open the browser to localhost:11435

On macOS or Linux with Homebrew:

$ brew tap ardanlabs/kronk
$ brew trust ardanlabs/kronk
$ brew install kronk

$ kronk server start

Or with Go:

$ go install github.com/ardanlabs/kronk/cmd/kronk@latest

$ kronk server start

Read the Manual to learn more about running the Kronk Model Server.

Project Status

Go Reference go.mod Go version llama.cpp Release

Linux

Sometimes there are breaking changes to llama.cpp that require an update to yzma and Kronk. Here are some of the known compatible versions:

As of May 15th, 2026 please use version b9163 until we can fix the problems with b9165+

You can use this environment variable: export KRONK_LIB_VERSION=b9163

llama.cpp yzma kronk
b8864 v1.12.0 1.23.1
b8865+ v1.13.0 1.23.2
b9180+ v1.14.0 1.25.8
b9460+ v1.15.0 1.26.7
b9549+ v1.16.1 1.27.4
b9562+ v1.17.0 1.27.6
b9616+ v1.17.1 1.27.9
b9750+ v1.18.0 1.28.3
b9750+ v1.18.0 1.28.3
b9979+ v1.19.0 1.28.7
b10105+ v1.20.0 1.29.1

Owner Information

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

Install Kronk

The recommended way to install Kronk on macOS or Linux is with Homebrew:

$ brew tap ardanlabs/kronk
$ brew trust ardanlabs/kronk
$ brew install kronk

$ kronk --help

To upgrade later:

$ brew upgrade kronk

You can also install via Go on any supported platform:

$ go install github.com/ardanlabs/kronk/cmd/kronk@latest

$ kronk --help

To run Kronk headless with Docker on a remote machine (first run, user security, auto-restart on reboot, preinstalling models, updating, and uninstalling), see Chapter 2.4: Docker / OCI Container in the manual.

Issues/Features

Here is the existing Issues/Features for the project and the things being worked on or things that would be nice to have.

If you are interested in helping in any way, please send an email to Bill Kennedy.

Architecture

The architecture of Kronk is designed to be simple and scalable.

Watch this video to learn more about the project and the architecture.

SDK

The Kronk SDK allows you to write applications that can directly interact with local open source GGUF models (supported by llama.cpp) that provide inference for text and media (vision and audio). The Bucky SDK provides the same surface for speech-to-text via whisper.cpp — see the Bucky chapter.

Kronk SDK Architecture

Check out the examples section below.

Models

Kronk uses models in the GGUF format supported by llama.cpp. You can find many models in GGUF format on Hugging Face (over 147k at last count):

models?library=gguf&sort=trending

Support

Kronk currently has support for over 94% of llama.cpp functionality thanks to yzma. See the yzma ROADMAP.md for the complete list.

You can use multimodal models (image/audio) and text language models with full hardware acceleration on Linux, on macOS, and on Windows.

OS CPU GPU
Linux amd64, arm64 CUDA, Vulkan, HIP, ROCm, SYCL
macOS arm64 Metal
Windows amd64 CUDA, Vulkan, HIP, SYCL, OpenCL

Whenever there is a new release of llama.cpp, the tests for yzma are run automatically. Kronk runs tests once a day and will check for updates to llama.cpp. This helps us stay up to date with the latest code and models.

API Examples

There are examples in the examples direction:

The first time you run these programs the system will download and install the model and libraries.

AGENT - This example shows you how to write a small coding agent.

make example-agent

AUDIO - This example shows you how to execute a simple prompt against an audio model.

make example-audio

BUCKY - This example shows you how to transcribe an audio file with the bucky SDK (whisper.cpp under the hood). See the manual chapter Bucky (Audio Transcription) for the full subsystem reference.

make example-bucky

BUCKY-STREAM - This example shows you how to do live microphone transcription with the bucky streaming SDK: partials are revised in place and finals commit as you speak. Say "STOP" to end. See Streaming Transcription in the manual.

make example-bucky-stream

BUCKY-DIAR - This example shows you how to do channel-separated speaker diarization with the bucky SDK: each speaker is recorded on a dedicated channel, and TranscribeChannelsFile transcribes every channel on its own and merges the results into one time-sorted transcript tagged by speaker. See Channel-Separated Diarization in the manual.

make example-bucky-diar

CHAT - This example shows you how to chat with the chat-completion api.

make example-chat

CONCURRENCY - This example shows you how to leverage concurrency using vision models.

make example-concurrency

EMBEDDING - This example shows you a basic program using Kronk to perform an embedding operation.

make example-embedding

GRAMMAR - This example shows how to use GBNF grammars to constrain model output.

make example-grammar

POOL - This example shows you how to use the pool package to manage multipl models in memory at the same time.

make example-pool

QUESTION - This example shows you how to ask a simple question with the chat-completion api.

make example-question

RAG - This example shows you a complete RAG application.

make example-rag

RERANK - This example shows you how to use a rerank model.

make example-rerank

RESPONSE - This example shows you how to chat with the response api.

make example-question

VISION - This example shows you how to execute a simple prompt against a vision model.

make example-vision

YZMA - This example shows you how to use the yzma api at it's basic level.

make example-yzma

You can find more examples in the ArdanLabs AI training repo at Example13.

Sample API Program - Question Example

// This example shows how to use GBNF grammars to constrain model output.
// Grammars force the model to only produce tokens that match the specified
// pattern, guaranteeing structured output.
//
// Run the example like this from the root of the project:
// $ make example-grammar

package main

import (
	"context"
	"fmt"
	"os"
	"time"

	"github.com/ardanlabs/kronk/sdk/kronk"
	"github.com/ardanlabs/kronk/sdk/kronk/model"
	"github.com/ardanlabs/kronk/sdk/tools/defaults"
	"github.com/ardanlabs/kronk/sdk/tools/libs"
	"github.com/ardanlabs/kronk/sdk/tools/models"
)

var grammarJSONObject = `root ::= object
value ::= object | array | string | number | "true" | "false" | "null"
object ::= "{" ws ( string ":" ws value ("," ws string ":" ws value)* )? ws "}"
array ::= "[" ws ( value ("," ws value)* )? ws "]"
string ::= "\"" ([^"\\] | "\\" ["\\bfnrt/] | "\\u" [0-9a-fA-F]{4})* "\""
number ::= "-"? ("0" | [1-9][0-9]*) ("." [0-9]+)? ([eE] [+-]? [0-9]+)?
ws ::= [ \t\n\r]*`

// modelSource is the model to download. It may be a HuggingFace URL,
// a canonical "provider/modelID", or a bare model id.
var modelSource = "unsloth/Qwen3-0.6B-Q8_0"

func main() {
	if err := run(); err != nil {
		fmt.Printf("\nERROR: %s\n", err)
		os.Exit(1)
	}
}

func run() error {
	mp, err := installSystem()
	if err != nil {
		return fmt.Errorf("unable to install system: %w", err)
	}

	krn, err := newKronk(mp)
	if err != nil {
		return fmt.Errorf("unable to init kronk: %w", err)
	}

	defer func() {
		fmt.Println("\nUnloading Kronk")
		if err := krn.Unload(context.Background()); err != nil {
			fmt.Printf("failed to unload model: %v", err)
		}
	}()

	// -------------------------------------------------------------------------
	// Example 1: Using a grammar preset (GrammarJSONObject)

	fmt.Println("=== Example 1: Grammar Preset (JSON Object) ===")
	if err := grammarPreset(krn); err != nil {
		fmt.Println(err)
	}

	// -------------------------------------------------------------------------
	// Example 2: Using a JSON Schema to auto-generate grammar

	fmt.Println("\n=== Example 2: JSON Schema ===")
	if err := jsonSchema(krn); err != nil {
		fmt.Println(err)
	}

	// -------------------------------------------------------------------------
	// Example 3: Custom grammar for constrained choices

	fmt.Println("\n=== Example 3: Custom Grammar (Sentiment Analysis) ===")
	if err := customGrammar(krn); err != nil {
		fmt.Println(err)
	}

	return nil
}

func installSystem() (models.Path, error) {
	ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
	defer cancel()

	libs, err := libs.New(
		libs.WithVersion(defaults.LibVersion("")),
	)
	if err != nil {
		return models.Path{}, err
	}

	if _, err := libs.Download(ctx, kronk.FmtLogger); err != nil {
		return models.Path{}, fmt.Errorf("unable to install llama.cpp: %w", err)
	}

	mdls, err := models.New()
	if err != nil {
		return models.Path{}, fmt.Errorf("unable to init models: %w", err)
	}

	fmt.Println("Downloading model:", modelSource)

	mp, err := mdls.Download(ctx, kronk.FmtLogger, modelSource)
	if err != nil {
		return models.Path{}, fmt.Errorf("unable to install model: %w", err)
	}

	return mp, nil
}

func newKronk(mp models.Path) (*kronk.Kronk, error) {
	fmt.Println("loading model...")

	if err := kronk.Init(); err != nil {
		return nil, fmt.Errorf("unable to init kronk: %w", err)
	}

	krn, err := kronk.New(
		model.WithModelFiles(mp.ModelFiles),
		model.WithAutoTune(true),
	)
	if err != nil {
		return nil, fmt.Errorf("unable to create inference model: %w", err)
	}

	fmt.Print("- system info:\n\t")
	for k, v := range krn.SystemInfo() {
		fmt.Printf("%s:%v, ", k, v)
	}
	fmt.Println()

	fmt.Println("- contextWindow  :", krn.ModelConfig().ContextWindow())
	fmt.Printf("- k/v            : %s/%s\n", krn.ModelConfig().CacheTypeK, krn.ModelConfig().CacheTypeV)
	fmt.Println("- flashAttention :", krn.ModelConfig().FlashAttention())
	fmt.Println("- nBatch         :", krn.ModelConfig().NBatch())
	fmt.Println("- nuBatch        :", krn.ModelConfig().NUBatch())
	fmt.Println("- modelType      :", krn.ModelInfo().Type)
	fmt.Println("- isGPT          :", krn.ModelInfo().IsGPTModel)
	fmt.Println("- template       :", krn.ModelInfo().Template.FileName)
	fmt.Println("- grammar        :", krn.ModelConfig().DefaultParams.Grammar != "")
	fmt.Println("- nSeqMax        :", krn.ModelConfig().NSeqMax())
	fmt.Println("- vramTotal      :", krn.ModelInfo().VRAMTotal/(1024*1024), "MiB")
	fmt.Println("- slotMemory     :", krn.ModelInfo().SlotMemory/(1024*1024), "MiB")
	fmt.Println("- modelSize      :", krn.ModelInfo().Size/(1000*1000), "MB")
	fmt.Println("- imc            :", krn.ModelConfig().IncrementalCache())
	if n := krn.ModelConfig().PtrNGpuLayers; n != nil {
		fmt.Println("- nGPULayers     :", *n)
	} else {
		fmt.Println("- nGPULayers     : all")
	}
	if sm := krn.ModelConfig().PtrSplitMode; sm != nil {
		fmt.Println("- splitMode      :", sm)
	} else {
		fmt.Println("- splitMode      : auto")
	}

	return krn, nil
}

// grammarPreset demonstrates using a built-in grammar preset to force JSON output.
func grammarPreset(krn *kronk.Kronk) error {
	ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
	defer cancel()

	prompt := "List 3 programming languages with their year of creation. Respond in JSON format."

	fmt.Println("PROMPT:", prompt)
	fmt.Println()

	d := model.D{
		"messages": model.DocumentArray(
			model.TextMessage(model.RoleUser, prompt),
		),
		"grammar":         grammarJSONObject,
		"enable_thinking": false, // Grammar requires output to match from first token
		"temperature":     0.7,
		"max_tokens":      512,
	}

	ch, err := krn.ChatStreaming(ctx, d)
	if err != nil {
		return fmt.Errorf("chat streaming: %w", err)
	}

	fmt.Print("RESPONSE: ")

	for resp := range ch {
		switch resp.Choices[0].FinishReason() {
		case model.FinishReasonError:
			return fmt.Errorf("error from model: %s", resp.Choices[0].Delta.Content)

		case model.FinishReasonStop:
			fmt.Println()
			return nil

		default:
			fmt.Print(resp.Choices[0].Delta.Content)
		}
	}

	return nil
}

// jsonSchema demonstrates using a JSON Schema to auto-generate a grammar.
// This gives you more control over the exact structure of the output.
func jsonSchema(krn *kronk.Kronk) error {
	ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
	defer cancel()

	prompt := "Describe the Go programming language."

	fmt.Println("PROMPT:", prompt)
	fmt.Println()

	// Define the expected output structure using JSON Schema.
	schema := model.D{
		"type": "object",
		"properties": model.D{
			"name": model.D{
				"type": "string",
			},
			"year": model.D{
				"type": "integer",
			},
			"paradigm": model.D{
				"type": "string",
				"enum": []string{"procedural", "object-oriented", "functional", "concurrent"},
			},
			"compiled": model.D{
				"type": "boolean",
			},
		},
		"required": []string{"name", "year", "paradigm", "compiled"},
	}

	d := model.D{
		"messages": model.DocumentArray(
			model.TextMessage(model.RoleUser, prompt),
		),
		"json_schema":     schema,
		"enable_thinking": false, // Grammar requires output to match from first token
		"temperature":     0.7,
		"max_tokens":      256,
	}

	ch, err := krn.ChatStreaming(ctx, d)
	if err != nil {
		return fmt.Errorf("chat streaming: %w", err)
	}

	fmt.Print("RESPONSE: ")

	for resp := range ch {
		switch resp.Choices[0].FinishReason() {
		case model.FinishReasonError:
			return fmt.Errorf("error from model: %s", resp.Choices[0].Delta.Content)

		case model.FinishReasonStop:
			fmt.Println()
			return nil

		default:
			fmt.Print(resp.Choices[0].Delta.Content)
		}
	}

	return nil
}

// customGrammar demonstrates writing a custom GBNF grammar to constrain
// output to specific choices. This is useful for classification tasks.
func customGrammar(krn *kronk.Kronk) error {
	ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
	defer cancel()

	// Custom grammar that only allows specific sentiment values.
	// The model MUST output one of these exact strings.
	sentimentGrammar := `root ::= sentiment
sentiment ::= "positive" | "negative" | "neutral"`

	prompt := `Analyze the sentiment of this text and respond with exactly one word.

Text: "I absolutely love this product! It exceeded all my expectations and I would recommend it to everyone."

Sentiment:`

	fmt.Println("PROMPT:", prompt)
	fmt.Println()

	d := model.D{
		"messages": model.DocumentArray(
			model.TextMessage(model.RoleUser, prompt),
		),
		"grammar":         sentimentGrammar,
		"enable_thinking": false, // Grammar requires output to match from first token
		"temperature":     0.0,
		"max_tokens":      16,
	}

	ch, err := krn.ChatStreaming(ctx, d)
	if err != nil {
		return fmt.Errorf("chat streaming: %w", err)
	}

	fmt.Print("RESPONSE: ")

	for resp := range ch {
		switch resp.Choices[0].FinishReason() {
		case model.FinishReasonError:
			return fmt.Errorf("error from model: %s", resp.Choices[0].Delta.Content)

		case model.FinishReasonStop:
			fmt.Println()
			return nil

		default:
			fmt.Print(resp.Choices[0].Delta.Content)
		}
	}

	return nil
}

This example can produce the following output:

$ make example-question
cd examples && go run ./question/main.go
loading model...
- system info:
	REPACK:on, MTL:EMBED_LIBRARY, CPU:NEON, ARM_FMA:on, DOTPROD:on, LLAMAFILE:on, ACCELERATE:on,
- contextWindow  : 32768
- k/v            : f16/f16
- flashAttention : auto
- nBatch         : 2048
- nuBatch        : 512
- modelType      : dense
- isGPT          : false
- template       : tokenizer.chat_template
- grammar        : false
- nSeqMax        : 1
- vramTotal      : 4493 MiB
- slotMemory     : 3584 MiB
- modelSize      : 633 MB
- imc            : true
- nGPULayers     : all
- splitMode      : layer

QUESTION: Hello model

Okay, the user just said "Hello model". I need to respond appropriately. Since they didn't ask a question, I should acknowledge their message and offer help. Let me make sure the response is friendly and open-ended. I should check if there's anything specific they need, but keep it general. Maybe mention availability and willingness to assist further. Alright, that should work.

! How can I assist you today? 😊
Unloading Kronk

Travel Schedule

Come find me in any of these cities or events this year. I will be giving workshops and talks about Kronk

Dates Event Location Comments
Jan 29th - 2nd AI Plumbers Fringe, FOSDEM Brussels, Belgium Talk
Mar 4th - 5th Ardan Connect São Paulo, Brazil Workshop
Apr 20th - 25th Gophercamp 2026 Brno, Czech Republic Workshop, Talk
Apr 27th - 29th AI Dev 26 San Francisco, USA Attendee
May 17th - 23rd Gophercon Signapore Singapore Workshop, Talk
Jun 8th - 12th Genetec Corporate Training Montreal, Canada Workshop
Jun 14th - 19th GopherCon EU Berlin, Germany Workshop, Talk
JULY Summer Vacation Huntsville, AL Rest
Aug 3rd - 6th GopherCon USA Seattle, Washington Workshop, Talk
Aug 11th - 13th GopherCon UK London, England Workshop, Talk
Sep 1st - 4th GopherCon LATAM Florianópolis, Brazil Workshop, Talk
Sep 23rd Meetup NYC NYC, NY Talk
Oct 6th - 9th Crusoe Corporate Training San Francisco, USA Workshop
Oct 12th - 18th GopherCon Africa Kenya, East Africa Workshop, Talk
Oct 29th - 4th GoLab (GopherCon Italy) Bologna, Italy Workshop, Talk

Directories

Path Synopsis
cmd
kronk command
kronk/bucky
Package bucky provides the parent "bucky" sub-command tree, which hosts the whisper.cpp backend verbs (libs and model management).
Package bucky provides the parent "bucky" sub-command tree, which hosts the whisper.cpp backend verbs (libs and model management).
kronk/bucky/libs
Package libs provides the "bucky libs" sub-command code.
Package libs provides the "bucky libs" sub-command code.
kronk/bucky/model
Package model provides the "bucky model" sub-command tree for managing local whisper (GGML) model files.
Package model provides the "bucky model" sub-command tree for managing local whisper (GGML) model files.
kronk/bucky/model/catalog
Package catalog prints the bundled whisper model catalog.
Package catalog prints the bundled whisper model catalog.
kronk/bucky/model/list
Package list lists installed whisper models.
Package list lists installed whisper models.
kronk/bucky/model/pull
Package pull downloads a whisper model by short name or URL.
Package pull downloads a whisper model by short name or URL.
kronk/bucky/model/remove
Package remove deletes an installed whisper model from disk.
Package remove deletes an installed whisper model from disk.
kronk/client
Package client provides support to access an OpenAI-compatible API service.
Package client provides support to access an OpenAI-compatible API service.
kronk/devices
Package devices provides the devices command for listing available compute devices.
Package devices provides the devices command for listing available compute devices.
kronk/diagnose
Package diagnose provides the diagnose command for inspecting the host environment (versions, system/hardware, llama.cpp devices, and a benchmark) to help debug problems on a user's machine.
Package diagnose provides the diagnose command for inspecting the host environment (versions, system/hardware, llama.cpp devices, and a benchmark) to help debug problems on a user's machine.
kronk/kronk/catalog
Package catalog provides support for the catalog sub-command.
Package catalog provides support for the catalog sub-command.
kronk/kronk/catalog/list
Package list provides the catalog list command code.
Package list provides the catalog list command code.
kronk/kronk/catalog/remove
Package remove provides the catalog remove command code.
Package remove provides the catalog remove command code.
kronk/kronk/catalog/show
Package show provides the catalog show command code.
Package show provides the catalog show command code.
kronk/kronk/libs
Package libs provides the libs command code.
Package libs provides the libs command code.
kronk/kronk/model
Package model provide support for the model sub-command.
Package model provide support for the model sub-command.
kronk/kronk/model/index
Package index provides the index command code.
Package index provides the index command code.
kronk/kronk/model/list
Package list provides the pull command code.
Package list provides the pull command code.
kronk/kronk/model/ps
Package ps provides the ps command code.
Package ps provides the ps command code.
kronk/kronk/model/pull
Package pull provides the pull command code.
Package pull provides the pull command code.
kronk/kronk/model/remove
Package remove provides the remove command code.
Package remove provides the remove command code.
kronk/kronk/model/resolve
Package resolve provides the model resolve sub-command.
Package resolve provides the model resolve sub-command.
kronk/kronk/model/show
Package show provides the show command code.
Package show provides the show command code.
kronk/kronk/run
Package run provides the run command for interactive chat with models.
Package run provides the run command for interactive chat with models.
kronk/launch
Package launch provides the "kronk launch" command, which starts a supported coding agent (OpenCode, Claude Code, Codex, Copilot, Pi, OpenClaw, or Hermes) pre-wired to the local Kronk server and the chat models installed on it.
Package launch provides the "kronk launch" command, which starts a supported coding agent (OpenCode, Claude Code, Codex, Copilot, Pi, OpenClaw, or Hermes) pre-wired to the local Kronk server and the chat models installed on it.
kronk/security
Package security provides tooling support for security.
Package security provides tooling support for security.
kronk/security/key
Package key provides tooling support for security keys.
Package key provides tooling support for security keys.
kronk/security/key/create
Package create provides the key create command code.
Package create provides the key create command code.
kronk/security/key/delete
Package delete provides the key delete command code.
Package delete provides the key delete command code.
kronk/security/key/list
Package list provides the key list command code.
Package list provides the key list command code.
kronk/security/sec
Package sec provide a security api for use with the security commands.
Package sec provide a security api for use with the security commands.
kronk/security/token
Package token provides tooling support for security tokens.
Package token provides tooling support for security tokens.
kronk/security/token/create
Package create provides the token create command code.
Package create provides the token create command code.
kronk/server
Package server provide support for the server sub-command.
Package server provide support for the server sub-command.
kronk/server/logs
Package logs manages the server logs sub-command.
Package logs manages the server logs sub-command.
kronk/server/start
Package start manages the server start sub-command.
Package start manages the server start sub-command.
kronk/server/stop
Package stop manages the server stop sub-command.
Package stop manages the server stop sub-command.
server/api/services/kronk
Package kronk is the model server.
Package kronk is the model server.
server/api/services/kronk/build
Package build binds all the routes into the specified app.
Package build binds all the routes into the specified app.
server/api/tooling/benchfmt command
benchfmt parses raw Go benchmark output from the runs/ directory and rewrites BENCH_RESULTS.txt with formatted comparison grids.
benchfmt parses raw Go benchmark output from the runs/ directory and rewrites BENCH_RESULTS.txt with formatted comparison grids.
server/api/tooling/docs/manual
Package manual provides a documentation generator that converts MANUAL.md to React.
Package manual provides a documentation generator that converts MANUAL.md to React.
server/api/tooling/docs/sdk/examples
Package examples provides a documentation generator for sdk/docs/examples.
Package examples provides a documentation generator for sdk/docs/examples.
server/api/tooling/docs/sdk/gofmt
Package gofmt provides a documentation generator for sdk/docs/kronk and models.
Package gofmt provides a documentation generator for sdk/docs/kronk and models.
server/api/tooling/logfmt command
This program takes the structured log output and makes it readable.
This program takes the structured log output and makes it readable.
server/app/domain/audioapp
Package audioapp provides the audio (speech-to-text) api endpoints.
Package audioapp provides the audio (speech-to-text) api endpoints.
server/app/domain/authapp
Package authapp maintains the auth service handlers.
Package authapp maintains the auth service handlers.
server/app/domain/chatapp
Package chatapp provides the chat api endpoints.
Package chatapp provides the chat api endpoints.
server/app/domain/checkapp
Package checkapp maintains the app layer api for the check domain.
Package checkapp maintains the app layer api for the check domain.
server/app/domain/downapp
Package downapp serves model files over HTTP using a Hugging Face compatible URL scheme so clients on a local network can download models without internet access.
Package downapp serves model files over HTTP using a Hugging Face compatible URL scheme so clients on a local network can download models without internet access.
server/app/domain/embedapp
Package embedapp provides the embedding api endpoints.
Package embedapp provides the embedding api endpoints.
server/app/domain/mcpapp
Package mcpapp maintains the MCP service handlers.
Package mcpapp maintains the MCP service handlers.
server/app/domain/msgsapp
Package msgsapp provides the Anthropic Messages API endpoints.
Package msgsapp provides the Anthropic Messages API endpoints.
server/app/domain/playgroundapp
Package playgroundapp provides endpoints for the model playground.
Package playgroundapp provides endpoints for the model playground.
server/app/domain/rerankapp
Package rerankapp provides the reranking api endpoints.
Package rerankapp provides the reranking api endpoints.
server/app/domain/respapp
Package respapp provides the responses api endpoints.
Package respapp provides the responses api endpoints.
server/app/domain/tokenapp
Package tokenapp provides the tokenize api endpoint.
Package tokenapp provides the tokenize api endpoint.
server/app/domain/toolapp
Package toolapp provides endpoints to handle tool management.
Package toolapp provides endpoints to handle tool management.
server/app/sdk/apitest
Package apitest provides support for excuting api test logic.
Package apitest provides support for excuting api test logic.
server/app/sdk/authclient
Package authclient provides support to access the auth service.
Package authclient provides support to access the auth service.
server/app/sdk/debug
Package debug provides handler support for the debugging endpoints.
Package debug provides handler support for the debugging endpoints.
server/app/sdk/errs
Package errs provides types and support related to web error functionality.
Package errs provides types and support related to web error functionality.
server/app/sdk/mid
Package mid provides app level middleware support.
Package mid provides app level middleware support.
server/app/sdk/mux
Package mux provides support to bind domain level routes to the application mux.
Package mux provides support to bind domain level routes to the application mux.
server/app/sdk/security
Package security provides security support.
Package security provides security support.
server/app/sdk/security/auth
Package auth provides authentication and authorization support.
Package auth provides authentication and authorization support.
server/app/sdk/security/keystore
Package keystore implements the auth.KeyLookup interface.
Package keystore implements the auth.KeyLookup interface.
server/app/sdk/security/rate
Package rate provides rate limiting support using an embedded database.
Package rate provides rate limiting support using an embedded database.
server/foundation/logger
Package logger provides support for initializing the log system.
Package logger provides support for initializing the log system.
server/foundation/web
Package web contains a small web framework extension.
Package web contains a small web framework extension.
examples module
sdk
applog
Package applog defines the canonical Logger function type, log level constants, and trace-id context plumbing shared across the Kronk SDK packages.
Package applog defines the canonical Logger function type, log level constants, and trace-id context plumbing shared across the Kronk SDK packages.
bucky
Package bucky is the high-level whisper SDK entry point.
Package bucky is the high-level whisper SDK entry point.
bucky/ffmpeg
Package ffmpeg provides a thin wrapper around the ffmpeg command-line tool.
Package ffmpeg provides a thin wrapper around the ffmpeg command-line tool.
bucky/model
Package model provides the low-level API for working with whisper.cpp models via the github.com/ardanlabs/bucky FFI bindings.
Package model provides the low-level API for working with whisper.cpp models via the github.com/ardanlabs/bucky FFI bindings.
bucky/pool
Package pool manages a pool of bucky APIs for specific whisper models.
Package pool manages a pool of bucky APIs for specific whisper models.
bucky/tests/testlib
Package testlib provides shared test infrastructure for the bucky runtime test packages under sdk/bucky/tests.
Package testlib provides shared test infrastructure for the bucky runtime test packages under sdk/bucky/tests.
kronk
Package kronk provides support for working with models using llama.cpp via yzma.
Package kronk provides support for working with models using llama.cpp via yzma.
kronk/applog
Package applog re-exports github.com/ardanlabs/kronk/sdk/applog so existing imports under sdk/kronk/applog continue to compile.
Package applog re-exports github.com/ardanlabs/kronk/sdk/applog so existing imports under sdk/kronk/applog continue to compile.
kronk/gguf
Package gguf provides shared, leaf-level helpers for parsing GGUF metadata and computing the KV-cache portion of VRAM.
Package gguf provides shared, leaf-level helpers for parsing GGUF metadata and computing the KV-cache portion of VRAM.
kronk/hf
Package hf provides HuggingFace API helpers and URL utilities used by the rest of Kronk.
Package hf provides HuggingFace API helpers and URL utilities used by the rest of Kronk.
kronk/jsonrepair
Package jsonrepair verifies and repairs malformed JSON produced by LLM tool calls.
Package jsonrepair verifies and repairs malformed JSON produced by LLM tool calls.
kronk/kvstorage/disk
Package disk provides a disk-backed implementation of the model.SessionStore contract used by IMC (Incremental Message Cache) to externalize per-session KV cache bytes between requests.
Package disk provides a disk-backed implementation of the model.SessionStore contract used by IMC (Incremental Message Cache) to externalize per-session KV cache bytes between requests.
kronk/kvstorage/ram
Package ram provides the in-process RAM implementation of the model.SessionStore contract used by IMC (Incremental Message Cache) to externalize per-session KV cache bytes between requests.
Package ram provides the in-process RAM implementation of the model.SessionStore contract used by IMC (Incremental Message Cache) to externalize per-session KV cache bytes between requests.
kronk/model
Package model provides the low-level api for working with models.
Package model provides the low-level api for working with models.
kronk/observ/metrics
Package metrics constructs the metrics the application will track.
Package metrics constructs the metrics the application will track.
kronk/observ/otel
Package otel provides otel support.
Package otel provides otel support.
kronk/parsers/deepseek
Package deepseek implements the Parser for DeepSeek models that use the DSML tool-calling protocol.
Package deepseek implements the Parser for DeepSeek models that use the DSML tool-calling protocol.
kronk/parsers/gemma
Package gemma implements the Parser for Google's Gemma model lineage.
Package gemma implements the Parser for Google's Gemma model lineage.
kronk/parsers/glm
Package glm implements the Parser for GLM models.
Package glm implements the Parser for GLM models.
kronk/parsers/gpt
Package gpt implements the Parser for GPT-OSS models, which use the OpenAI Harmony chat-template markers (<|channel|>, <|message|>, <|return|>, <|call|>, <|end|>, <|start|>, <|constrain|>).
Package gpt implements the Parser for GPT-OSS models, which use the OpenAI Harmony chat-template markers (<|channel|>, <|message|>, <|return|>, <|call|>, <|end|>, <|start|>, <|constrain|>).
kronk/parsers/mistral
Package mistral implements the Parser for Mistral and Devstral models, which emit reasoning between <think>...</think> or [THINK]...[/THINK] tags and tool calls in the streaming [TOOL_CALLS]name[ARGS]{...} format.
Package mistral implements the Parser for Mistral and Devstral models, which emit reasoning between <think>...</think> or [THINK]...[/THINK] tags and tool calls in the streaming [TOOL_CALLS]name[ARGS]{...} format.
kronk/parsers/qwen
Package qwen implements the Parser for Qwen and Qwen-Coder models.
Package qwen implements the Parser for Qwen and Qwen-Coder models.
kronk/parsers/standard
Package standard implements the catch-all Parser for models that emit the most common conventions: <think>...</think> reasoning wraps and the OpenAI-style JSON tool-call envelope inside <tool_call>...</tool_call>.
Package standard implements the catch-all Parser for models that emit the most common conventions: <think>...</think> reasoning wraps and the OpenAI-style JSON tool-call envelope inside <tool_call>...</tool_call>.
kronk/pool
Package pool manages a pool of kronk APIs for specific llama models.
Package pool manages a pool of kronk APIs for specific llama models.
kronk/tests/testlib
Package testlib provides shared test infrastructure for Kronk model test packages.
Package testlib provides shared test infrastructure for Kronk model test packages.
kronk/vram
Package vram provides VRAM requirement calculation for GGUF models.
Package vram provides VRAM requirement calculation for GGUF models.
pool
Package pool is the application-facing entry point for Kronk's model pools.
Package pool is the application-facing entry point for Kronk's model pools.
pool/engine
Package engine is the generic, backend-agnostic engine that powers every Kronk model pool.
Package engine is the generic, backend-agnostic engine that powers every Kronk model pool.
pool/engine/loader
Package loader defines the contracts each Kronk inference backend must satisfy to plug into the generic pool core.
Package loader defines the contracts each Kronk inference backend must satisfy to plug into the generic pool core.
pool/engine/resman
Package resman provides a resource manager that admits or rejects model loads based on a memory budget rather than a fixed model count.
Package resman provides a resource manager that admits or rejects model loads based on a memory budget rather than a fixed model count.
tools/backend
Package backend defines the contracts every Kronk inference backend (llama, whisper, …) must satisfy.
Package backend defines the contracts every Kronk inference backend (llama, whisper, …) must satisfy.
tools/bucky/libs
Package libs provides whisper.cpp library support backed by the github.com/ardanlabs/bucky download primitives.
Package libs provides whisper.cpp library support backed by the github.com/ardanlabs/bucky download primitives.
tools/bucky/models
Package models provides whisper model management backed by the github.com/ardanlabs/bucky download primitives.
Package models provides whisper model management backed by the github.com/ardanlabs/bucky download primitives.
tools/defaults
Package defaults provides default values for the cli tooling.
Package defaults provides default values for the cli tooling.
tools/devices
Package devices provides compute device enumeration and system memory detection.
Package devices provides compute device enumeration and system memory detection.
tools/diagnose
Package diagnose gathers host, accelerator, library, and benchmark information that helps diagnose problems on a user's machine.
Package diagnose gathers host, accelerator, library, and benchmark information that helps diagnose problems on a user's machine.
tools/downloader
Package downloader provide support for downloading files.
Package downloader provide support for downloading files.
tools/github
Package github provides HTTP client support for GitHub API calls with authentication and rate limit tracking.
Package github provides HTTP client support for GitHub API calls with authentication and rate limit tracking.
tools/libs
Package libs provides llama.cpp library support.
Package libs provides llama.cpp library support.
tools/models
Package models provides support for tooling around model management.
Package models provides support for tooling around model management.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL