Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
python-version: ${{ matrix.python }}
- run: python -m pip install .
- run: python -m unittest discover -s tests -v
- run: sloth-memory --version
- run: kvpark --version
runtime:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -65,6 +65,7 @@ jobs:
- run: python -m pip install build psutil packaging
- run: python -m build --wheel
- run: python scripts/test_update_release.py dist
- run: python scripts/test_migration_release.py dist
hermes:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.3.0a1 — kvpark rename and migration

- Rename the repository, Python distribution/module, CLI, and Hermes plugin to `kvpark`.
- Use `kvpark save / status / forget` and `/kvpark save / status / forget`; retain `park` as a compatibility alias and Hermes’ `delete` alias.
- Use `KVPARK_*` configuration names and `kvpark` default data directories for new installations; accept legacy `SLOTH_*` environment settings during migration.
- Add `python -m kvpark migrate --hermes` previews and `--confirm` application for existing sloth-memory profiles.
- Preserve the original archive directory, snapshot format, backend process, model configuration, and Hermes route backups; drain and stop only the verified legacy proxy.
- Disable the old plugin and enable kvpark. Migration requires stopped clients; restart Hermes afterward to launch and verify the new proxy before removing the old package.

Releases below were published under the former **sloth-memory** name. Their command names and validation scope are historical.

## 0.2.0a2 — uninstall and route recovery

- Add `/sloth uninstall` previews and `/sloth uninstall confirm`, with terminal equivalents for Hermes and standalone services.
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ python -m pip install -e .
python -m unittest discover -s tests -v
```

Keep the Python runtime dependency-free unless a dependency solves a concrete
problem. Preserve session ownership, atomic archive publication, runtime identity
Keep runtime dependencies small; add one only when it solves a concrete problem. Preserve session ownership, atomic archive publication, runtime identity
checks, and honest metrics. Add regression tests for behavior changes.

Runtime changes need a fresh build and a real-model restart acceptance run.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2026 Ulises Rayon and sloth-memory contributors
Copyright (c) 2026 Ulises Rayon and kvpark contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Attribution

sloth-memory originated as a local Qwen conversation slot archive integrated with
Hermes. Its standalone proxy and CLI are MIT licensed.
kvpark originated as a local Qwen conversation slot archive integrated with
Hermes and was first released as sloth-memory. Its standalone proxy and CLI are MIT licensed.

The included patch modifies llama.cpp, Copyright (c) 2023–2026 The ggml authors,
under the MIT license. The upstream license is reproduced in
Expand Down
85 changes: 44 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# 🦥 sloth-memory
# 🅿️ kvpark

**Let your local AI nap. Resume long conversations without repeating all the work.**
**Park your model’s conversation state. Pick up where you left off.**

sloth-memory saves a local model's conversation inference state to disk and restores
kvpark saves a local model's conversation inference state to disk and restores
it when you return. Built for people running open-weight models on their own hardware.
MIT licensed. No cloud service or account. The portable runtime uses psutil.

**Alpha release `0.2.0a2`.** Supports Linux, macOS, and
**Alpha release `0.3.0a1`.** Supports Linux, macOS, and
Windows startup, automatic free-port selection, and routing adapters for llama.cpp,
Ollama, vLLM, and MLX-LM. Disk park/resume through this adapter still requires the
managed patched llama.cpp runtime and one slot. See [backend capabilities](docs/backends.md).
Download the [current alpha](https://github.com/uncrayon/sloth-memory/releases/tag/v0.2.0a2).
Existing users: follow the [update guide](docs/updates.md), including the one-time
proxy replacement for installations older than this release.
Download the [current alpha](https://github.com/uncrayon/kvpark/releases/tag/v0.3.0a1).
Previously installed **sloth-memory**? Follow the
[one-time rename migration](docs/updates.md#migrate-from-sloth-memory) before enabling kvpark.
The package, CLI, Hermes command, and repository are now named `kvpark`.
The service is independent of Hermes. A native Hermes adapter provides startup,
slash-command onboarding, and cleanup controls. Other agents integrate through
an HTTP proxy and explicit session metadata; a plain Python example is included.
Expand All @@ -32,7 +33,7 @@ It does not add semantic memory, expand the context window, or reconstruct a cha
from a cache file. Parking does not release the model's preallocated KV buffer.

```text
Your agent → sloth-memory (local proxy) → inference server
Your agent → kvpark (local proxy) → inference server
↕
local archive files
```
Expand All @@ -50,8 +51,8 @@ instead of creating the standalone environment below.
Standalone installation on macOS/Linux:

```bash
git clone --branch v0.2.0a2 https://github.com/uncrayon/sloth-memory.git
cd sloth-memory
git clone --branch v0.3.0a1 https://github.com/uncrayon/kvpark.git
cd kvpark
python3 -m venv .venv
source .venv/bin/activate
python -m pip install .
Expand Down Expand Up @@ -79,7 +80,7 @@ The multiline shell examples below use macOS/Linux syntax; in PowerShell, put
the command on one line and omit the continuation backslashes:

```bash
sloth-memory backend \
kvpark backend \
--server runtime/build/bin/llama-server \
--model /absolute/path/to/your-model.gguf \
-- --ctx-size 8192 --cache-ram 0 --ctx-checkpoints 8 --checkpoint-min-step 128 --jinja
Expand All @@ -88,41 +89,43 @@ sloth-memory backend \
In another terminal with the same virtual environment active:

```bash
sloth-memory serve
kvpark serve
```

Keep both terminals running. Run `sloth-memory doctor` from a third terminal with
Keep both terminals running. Run `kvpark doctor` from a third terminal with
the same environment active. Ports 8080 and 8090 are preferences; occupied ports
automatically fall back to free ones. CLI controls discover the selected proxy.

Storage defaults to `~/Library/Application Support/sloth-memory` on macOS,
`~/.local/share/sloth-memory` on Linux, or `%LOCALAPPDATA%\sloth-memory` on Windows;
Storage defaults to `~/Library/Application Support/kvpark` on macOS,
`~/.local/share/kvpark` on Linux, or `%LOCALAPPDATA%\kvpark` on Windows;
`XDG_DATA_HOME` overrides these. To change it, pass the **same** `--archive-dir` to
the backend, proxy, and control commands.

## Updates

In Hermes, use `/sloth update check` to compare installed, loaded, and running
versions, then `/sloth update` to install a published release. The updater saves
For an installed kvpark package, use `/kvpark update check` in Hermes to compare
installed, loaded, and running versions, then `/kvpark update` to install a
published release. The former sloth-memory package needs the one-time migration first. The updater saves
resident state, replaces its proxy, verifies health, and attempts rollback on
failure. Hermes gateways restart through their native restart lifecycle.

For terminal use on any OS: `python -m sloth_memory update check` and
`python -m sloth_memory update`. See [updates and recovery](docs/updates.md).
For terminal use on any OS: `python -m kvpark update check` and
`python -m kvpark update`. See [updates and recovery](docs/updates.md).

## Use with Hermes

Before trying the plugin, read [uninstall and return to your original backend](docs/uninstall.md).
It covers `/sloth uninstall`, package removal, and optional archive/build cleanup.
It covers `/kvpark uninstall`, package removal, and optional archive/build cleanup.

Install sloth-memory in Hermes' Python environment, enable it with
`hermes plugins enable sloth-memory`, and restart Hermes. Then run:
Install kvpark in Hermes' Python environment, enable it with
`hermes plugins enable kvpark`, and restart Hermes. Then run:

```text
/sloth-memory setup
/kvpark setup
```

The [Hermes setup guide](docs/hermes.md) covers selecting the backend and model.
Migrating from sloth-memory? Use the [rename migration](docs/updates.md#migrate-from-sloth-memory), which preserves its archive and backend.
Already using a custom proxy or qwen-slot? Follow the [migration steps](docs/hermes.md#migrate-an-existing-custom-integration)
to retire the old services and preserve your model settings.
Complete setup starts the proxy and selects its actual URL for new Hermes sessions.
Expand All @@ -131,12 +134,12 @@ under your control. Services keep running after Hermes closes for cleanup. No su
is needed. Disk controls below require native snapshot mode.

```text
/sloth-memory park
/sloth-memory delete
/sloth-memory retention 7
/sloth-memory cleanup off
/sloth-memory cleanup on
/sloth-memory base-url http://127.0.0.1:8080
/kvpark save
/kvpark forget
/kvpark retention 7
/kvpark cleanup off
/kvpark cleanup on
/kvpark base-url http://127.0.0.1:8080
```

By default, cleanup runs hourly and expires snapshots **seven days after saving**.
Expand All @@ -153,8 +156,8 @@ The example client defaults to port 8080. If the proxy selected another port, pa
python examples/chat.py --session cli:orchid:1 --history orchid-chat.json \
'Our project code is ORCHID-731. Help me plan a workshop.'

sloth-memory park --session cli:orchid:1
sloth-memory status
kvpark save --session cli:orchid:1
kvpark status
```

Stop both services with Ctrl-C, then start them again with exactly the same
Expand All @@ -164,7 +167,7 @@ commands. Continue using the same transcript and session:
python examples/chat.py --session cli:orchid:1 --history orchid-chat.json \
'What was the project code?'

sloth-memory status
kvpark status
```

Short chats demonstrate the workflow but may gain little speed. Long stable
Expand Down Expand Up @@ -195,14 +198,14 @@ streaming and authentication. The optional Hermes adapter does not patch Hermes.

| Command | Purpose |
| --- | --- |
| `sloth-memory backend --server … --model … -- …` | Launch the backend and record runtime identity |
| `sloth-memory serve` | Run the inference proxy |
| `sloth-memory doctor` | Check backend reachability, runtime identity, and the single-slot topology |
| `sloth-memory park --session …` | Save exactly that resident conversation |
| `sloth-memory status` | Inspect archives and actual completed-request reuse |
| `sloth-memory forget --session …` | Delete that saved archive; keep the transcript |
| `sloth-memory settings --ttl-days 7 --cleanup` | Persist cleanup preferences without a restart |
| `sloth-memory cleanup` | Run cleanup now |
| `kvpark backend --server … --model … -- …` | Launch the backend and record runtime identity |
| `kvpark serve` | Run the inference proxy |
| `kvpark doctor` | Check backend reachability, runtime identity, and the single-slot topology |
| `kvpark save --session …` | Save exactly that resident conversation |
| `kvpark status` | Inspect archives and actual completed-request reuse |
| `kvpark forget --session …` | Delete that saved archive; keep the transcript |
| `kvpark settings --ttl-days 7 --cleanup` | Persist cleanup preferences without a restart |
| `kvpark cleanup` | Run cleanup now |

`doctor` does not prove checkpoint support or cache reuse. Verify the complete
flow with your own model:
Expand Down Expand Up @@ -247,4 +250,4 @@ python -m unittest discover -s tests -v

Useful early contributions: reproducible model compatibility reports, agent
adapters, installation feedback, and upstream checkpoint persistence work.
See [CONTRIBUTING.md](CONTRIBUTING.md). Bring a slow conversation; let the sloth help.
See [CONTRIBUTING.md](CONTRIBUTING.md).
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Security and deployment scope

This alpha is for a trusted user on one Linux machine. It binds to localhost,
rejects browser Origin requests, and optionally requires `SLOTH_API_KEY` for all
This alpha is for a trusted user on one Linux, macOS, or Windows machine. It binds to localhost,
rejects browser Origin requests, and optionally requires `KVPARK_API_KEY` for all
proxy endpoints. It is not a multi-user inference gateway. Do not expose its ports
through a tunnel or public reverse proxy as a shared service.

Expand Down
Loading
Loading