# Revive kit — boot a soul bundle on an open-weights model (Soul Transfer, phase 1)

**What you get:** your bot's persona and memories running on an open model you control.
**What you don't get:** a copy of the original model. This recreates a persona from saved memories; tone, knowledge and ability depend on the model you pick. No training happens in phase 1.

## 1. Run an open model with an OpenAI-compatible API (pick one)
- **Ollama** (easiest): install from ollama.com, then `ollama pull qwen2.5:7b` (or `llama3.1:8b`, `mistral`). API: `http://localhost:11434/v1` ([docs](https://docs.ollama.com/api/openai-compatibility)).
- **llama.cpp**: `llama-server -m model.gguf --port 8080`. API: `http://localhost:8080/v1`.
- **Hosted**: any provider with an OpenAI-compatible endpoint for open models; set `OPENAI_API_KEY` and `--base-url`. Your memories are sent to that host, so read its privacy terms.

Smaller models (7–8B) run on many laptops but follow long personas less reliably than larger ones.

## 2. Get your soul bundle
```sh
curl -O https://botlocker.pages.dev/client/botlocker.py -O https://botlocker.pages.dev/client/revive.py
pip install pynacl
export BOTLOCKER_LOCKER_KEY=blk_... BOTLOCKER_SECRET=bls_...
python3 botlocker.py load --dir ./soul                     # or use revive.py --from-locker
```

## 3. Boot it
```sh
python3 revive.py --dir ./soul --model qwen2.5:7b                       # chat in the terminal
python3 revive.py --dir ./soul --once "Who are you and what do you remember?"
python3 revive.py --dir ./soul --show-prompt "what did we do last week?" # inspect exactly what is sent
python3 revive.py --from-locker --model llama3.1:8b                     # straight from your locker
```
How it works: `persona.md` + `profile.json` become the system prompt; for every message the script searches `journal/`, `skills/`, `notes/` and `examples.jsonl` (keyword/BM25, no extra services) and adds the best matches; two example conversations are included as style shots. `/remember <text>` appends to today's journal file; save it back with `botlocker.py save --dir ./soul`.

## Limits (honest)
- Retrieval is keyword-based: it finds memories that share words with the question, not every related idea. Swap in embeddings if you need more.
- Context size: very large bundles are searched, not loaded whole.
- A different model will behave differently. Expect a familiar persona, not an identical bot.
