ML inference backends, scoring engine, agent orchestrator
Find a file
Snider 5578671f90 feat: add Result type, break Backend interface to return Result
Backend.Generate and Backend.Chat now return (Result, error) instead of
(string, error). Result carries the response text and optional
inference.GenerateMetrics for backends that support them.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 17:36:16 +00:00
api feat(api): add REST route group for ML endpoints via go-api 2026-02-20 16:00:52 +00:00
cmd feat: migrate cmd/ml from CLI repo, resolve forge deps 2026-02-21 19:14:58 +00:00
docs docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:01:55 +00:00
scripts feat: add Ubuntu workstation setup script from CLI 2026-02-21 21:20:13 +00:00
adapter.go feat: Phase 2 backend consolidation — Message alias, GenOpts, deprecation 2026-02-20 02:05:59 +00:00
adapter_test.go feat: Phase 2 backend consolidation — Message alias, GenOpts, deprecation 2026-02-20 02:05:59 +00:00
agent_config.go refactor: extract hardcoded values into package constants 2026-02-20 03:18:19 +00:00
agent_eval.go refactor: extract hardcoded values into package constants 2026-02-20 03:18:19 +00:00
agent_execute.go refactor: extract hardcoded values into package constants 2026-02-20 03:18:19 +00:00
agent_influx.go refactor: extract hardcoded values into package constants 2026-02-20 03:18:19 +00:00
agent_ssh.go feat: add RemoteTransport interface for SSH abstraction 2026-02-20 03:09:42 +00:00
agent_test.go test: add agent subsystem tests (25 tests, 528 LOC) 2026-02-20 03:23:13 +00:00
approve.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
backend_http.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
backend_http_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
backend_http_textmodel.go feat: Phase 2 backend consolidation — Message alias, GenOpts, deprecation 2026-02-20 02:05:59 +00:00
backend_http_textmodel_test.go feat(backend): add HTTP/Llama TextModel wrappers + verify downstream 2026-02-20 01:23:34 +00:00
backend_llama.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
backend_llama_test.go test: add Phase 4 test coverage and benchmarks 2026-02-20 03:49:07 +00:00
backend_mlx.go feat(adapter): bridge go-inference TextModel to ml.Backend/StreamingBackend 2026-02-20 00:52:34 +00:00
backend_mlx_test.go test: add Phase 4 test coverage and benchmarks 2026-02-20 03:49:07 +00:00
benchmark_test.go test: add Phase 4 test coverage and benchmarks 2026-02-20 03:49:07 +00:00
CLAUDE.md docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:01:55 +00:00
compare.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
consolidate.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
convert.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
coverage.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
db.go refactor: extract hardcoded values into package constants 2026-02-20 03:18:19 +00:00
exact.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
exact_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
expand.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
export.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
gguf.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
go.mod feat: migrate cmd/ml from CLI repo, resolve forge deps 2026-02-21 19:14:58 +00:00
go.sum feat: migrate cmd/ml from CLI repo, resolve forge deps 2026-02-21 19:14:58 +00:00
heuristic.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
heuristic_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
import_all.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
inference.go feat: add Result type, break Backend interface to return Result 2026-02-22 17:36:16 +00:00
influx.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
ingest.go refactor: extract hardcoded values into package constants 2026-02-20 03:18:19 +00:00
inventory.go refactor: extract hardcoded values into package constants 2026-02-20 03:18:19 +00:00
io.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
judge.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
judge_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
metrics.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
normalize.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
ollama.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
parquet.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
probes.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
probes_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
prompts.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
publish.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
README.md docs: add README with quick start and docs links 2026-02-20 15:11:19 +00:00
score.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
score_race_test.go test: add Phase 4 test coverage and benchmarks 2026-02-20 03:49:07 +00:00
score_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
seed_influx.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
service.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
status.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
types.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
worker.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00

go-ml

ML inference backends, multi-suite scoring engine, and agent orchestrator for the Lethean AI stack. The package provides pluggable backends (Apple Metal via go-mlx, managed llama-server subprocesses, and OpenAI-compatible HTTP APIs), a concurrent scoring engine that evaluates model responses across heuristic, semantic, content, and standard benchmark suites, 23 capability probes, GGUF model management, and an SSH-based agent orchestrator that streams checkpoint evaluation results to InfluxDB and DuckDB.

Module: forge.lthn.ai/core/go-ml Licence: EUPL-1.2 Language: Go 1.25

Quick Start

import "forge.lthn.ai/core/go-ml"

// HTTP backend (Ollama, LM Studio, any OpenAI-compatible endpoint)
backend := ml.NewHTTPBackend("http://localhost:11434", "qwen3:8b")
resp, err := backend.Generate(ctx, "Hello", ml.GenOpts{MaxTokens: 256})

// Scoring engine
engine := ml.NewEngine(backend, ml.Options{Suites: "heuristic,semantic", Concurrency: 4})
scores := engine.ScoreAll(responses)

Documentation

Build & Test

go test ./...
go test -race ./...
go test -bench=. ./...
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.