Metadata-Version: 2.4
Name: galahad-kv
Version: 1.35.1
Summary: Galahad-KV: long-term memory for AI models -- a KV-cache layer for vLLM and SGLang
Author-email: Sietse Schelpe - Corbenic AI <sietse@corbenic.ai>
Maintainer-email: Corbenic AI <sietse@corbenic.ai>
License: Proprietary
Project-URL: Homepage, https://www.corbenic.ai
Project-URL: Documentation, https://github.com/corbenicai/galahad/wiki
Project-URL: Repository, https://github.com/corbenicai/galahad
Project-URL: Issues, https://github.com/corbenicai/galahad/issues
Keywords: vllm,sglang,kv-cache,llm,inference,llm-serving,kv-cache-offloading,prefix-caching,llm-memory,gpu
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Classifier: Environment :: GPU :: NVIDIA CUDA
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: vllm
Requires-Dist: vllm>=0.8; extra == "vllm"

# Galahad-KV

**Long-term memory for AI models — a KV-cache layer for vLLM and SGLang.**

Galahad keeps the KV cache your model already computed, encrypted on disk, and
gives it back on the next run — so a long prompt, a document, or a conversation
is remembered across requests and across restarts instead of being recomputed
every time. It installs with one command and the serving engine finds it
automatically.

```bash
pip install galahad-kv
```

Linux x86-64, Python 3.10–3.14. `libgalahad.so` ships inside the wheel — no
compiler, no build step. *(macOS / Apple Silicon is planned for a later
release; not supported yet.)*

> **Free homelab edition.** This build runs free on a homelab — up to **4
> consumer NVIDIA GeForce RTX GPUs** — with **no licence, no account, and no
> call home**. Nothing is ever sent anywhere. Datacenter GPUs
> (A100 / H100 / L40S / B200 …), more than four GPUs, and multi-node /
> Kubernetes are a separate licensed edition.

---

## Quick start

No licence and no sign-up. The only thing you choose is a **store key** — a
passphrase and an org name — because your memory on disk is encrypted
(AES-256-GCM). The same passphrase + org always derive the same key, on any
machine, so nothing is stored by us and nothing is sent anywhere.

```bash
# 1. pick your store key (a passphrase + an org label). Keep them — they ARE the key.
export GALAHAD_STORE_PASSPHRASE='a long passphrase you choose'   # >= 12 chars
export GALAHAD_ORG='your-org'

#    optional: save the derived 32-byte key to a file for backup
galahad keygen --out ~/galahad.key --org "$GALAHAD_ORG"

# 2. check everything is ready (library loads? store key? store writable? GPU?)
galahad doctor
```

Then activate it in whichever way you serve:

### vLLM

```bash
export GALAHAD_CACHE_DIR=/var/galahad      # the store, on fast local disk
vllm serve <model> \
  --kv-transfer-config '{"kv_connector":"GalahadConnector","kv_role":"kv_both"}'
```

vLLM discovers the connector by itself — no module path, no `PYTHONPATH`.

### SGLang

```bash
export GALAHAD_CACHE_DIR=/var/galahad
python -m sglang.launch_server --model-path <model> \
  --enable-hierarchical-cache --hicache-ratio 1.5 --hicache-storage-backend dynamic \
  --hicache-storage-backend-extra-config \
  '{"backend_name":"galahad","module_path":"galahad_vllm.sglang_backend","class_name":"GalahadHiCacheStorage"}'
```

### Your own code (bare)

Link `libgalahad.so` and call its C ABI directly; the store key comes from
`GALAHAD_STORE_PASSPHRASE` + `GALAHAD_ORG` (or `GALAHAD_STORE_KEY_FILE`). See the
wiki for the five-minute check.

---

## The `galahad` command

`pip install galahad-kv` gives you one command for everything:

| command | what it does |
|---|---|
| `galahad help` | activation for vLLM / SGLang / bare, in one place |
| `galahad keygen` | derive and back up the store key from your passphrase + org |
| `galahad doctor` | health check — library loads? store key? store writable? GPU? |
| `galahad version` | library, ABI, engine and transport |

No licence commands: the free edition needs none.

---

## What you get

- **Memory that survives restarts.** What was remembered on one run is available
  on the next, without recomputing it.
- **Encrypted at rest (AES-256-GCM).** The key is derived from your passphrase +
  org; nothing is stored by us.
- **Your memory is portable.** Because the key comes from your passphrase + org,
  not from the machine, you can copy the store to another of your own servers,
  set the same passphrase + org there, and it opens — byte-for-byte. A wrong
  passphrase opens nothing.
- **No licence, no account, no call home.** The free edition has no licence or
  registration tools and no network path — there is nothing in it to phone home
  with.
- **One install, both engines.** The same wheel works with vLLM and SGLang, on
  any model your engine can run.

## Scope (free homelab edition)

- **Hardware:** up to **4 consumer NVIDIA GeForce RTX GPUs**, each ≤ 36 GiB VRAM
  (a 4×RTX 5090 rig runs free). Datacenter / professional cards, more than four
  GPUs, and multi-node / Kubernetes are a separate licensed edition.
- **One serving process = one trust domain.** Do not put mutually-untrusted
  users behind one server; per-customer isolation is a licensed feature.
- **Platform:** Linux x86-64 (manylinux_2_28, glibc ≥ 2.28), Python 3.10–3.14.
  macOS / Apple Silicon is planned for a later release.

## Links

- Documentation & guides: the project wiki
- Issues & contact: see the project page

---

© 2026 Corbenic AI — Sietse Schelpe. All rights reserved. Galahad-KV is
proprietary software. Author: Sietse Schelpe — Corbenic AI.
