Metadata-Version: 2.4
Name: galahad-kv
Version: 1.31.0
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>
License: Proprietary
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
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.

> **Beta.** Galahad-KV is launching as a beta with paid pilots. It is in active
> use and tested on vLLM and SGLang; limits are stated plainly and are being
> improved through pilots.

---

## Quick start

Every install needs a licence — it is also the encryption key for your stored
memory, and it never leaves your machine.

```bash
# 1. a free licence (one GPU, non-commercial, 12 months) — or `galahad buy` for more
galahad free --org your-org-key --email you@company.com --accept-non-commercial

# 2. check everything is ready
galahad doctor
```

Then activate it in whichever way you serve:

### vLLM

```bash
export GALAHAD_CACHE_DIR=/var/galahad
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 licence supplies the key.
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 doctor` | health check — library loads? licence valid? store writable? |
| `galahad free` | a free licence (one GPU, non-commercial) |
| `galahad buy` | a paid licence (more GPUs / commercial) — opens checkout |
| `galahad quote` | volume or custom terms |
| `galahad status` | is a licence installed and enforcing? |
| `galahad points` | how many GPU-points this machine is (pricing) |
| `galahad version` | library, ABI, engine and transport |

---

## What you get

- **Memory that survives restarts.** What was remembered on one run is available
  on the next, without recomputing it.
- **Encrypted at rest.** Your stored memory is encrypted. By default your licence
  unlocks it; nothing extra to manage.
- **Your key stays yours.** Optionally hold your own key via
  `GALAHAD_STORE_PASSPHRASE` — it stays on your machine and is never sent to us.
  Lose it, lose the memory; that is the point.
- **One install, both engines.** The same wheel works with vLLM and SGLang.
- **No surprises without a licence.** Without one, it will not quietly do nothing
  — it tells you.

## Known limits (beta, stated plainly)

- **One serving process = one trust domain.** Do not put mutually-untrusted
  users behind one server; run separate processes, stores and keys per customer.
- **Version pins.** vLLM 0.30, SGLang 0.5.20, matching transformers. Newer
  engine versions change internal APIs the connector binds to.
- **Linux only** (manylinux_2_28, glibc ≥ 2.27), Python 3.10–3.14.

## 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; see the licence terms delivered with your key.
Author: Sietse Schelpe — Corbenic AI.
