A small online temporal adaptation layer for systems that need numeric reflexes, not another LLM, agent framework, or memory database.
adaptive-reservoir turns numeric event streams into predictions, metrics, and
adaptive state channels such as drift pressure, confidence, interruption risk,
or wait/notify hints.
It is designed to sit below a host system:
numeric feature stream
|
v
adaptive-reservoir
|
v
predictions / metrics / adaptive channels
|
v
host interpretation + policy + action layer
Many adaptive systems receive changing streams: interaction rhythm, system presence, practice-session signals, sensor-like events, and other numeric features.
Static rules and one-shot predictions are often too brittle for those streams. The useful question is not only "what is happening now?" but also:
is the stream changing?
is the system stable?
should the host wait, adapt, or ask for more context?
adaptive-reservoir provides a lightweight online substrate for those questions.
It helps a host system build a small numeric reflex layer while the host still
owns meaning, memory, consent, policy, and actions.
- A lightweight Python library for online temporal adaptation.
- A CPU-friendly reservoir-style state engine.
- A reusable substrate for software agents, presence engines, practice systems, and streaming applications.
- A foundation for adaptive state channels such as drift pressure, confidence, saturation, stability, interruption risk, and wait/notify hints.
- A deterministic benchmark and example suite for checking adaptation behavior.
- Not an LLM.
- Not an agent framework.
- Not a memory database.
- Not HDE Core.
- Not a consent, policy, identity, or audit layer.
- Not a semantic interpreter.
- Not a replacement for host-side privacy and safety checks.
adaptive-reservoir processes numeric feature streams only. Host systems own raw
data access, feature extraction, interpretation, memory, consent, policy,
actions, and audit.
Use adaptive-reservoir when you have a numeric stream and want online adaptive
signals that a host system can interpret.
Good fits include:
- concept-drift and temporal-drift experiments
- adaptive state channels for agent-like systems
- synthetic presence or interaction streams
- practice-session dynamics
- low-level numeric adaptation layers in larger systems
- HDE-like hosts that need adaptive numeric channels but own policy elsewhere
Poor fits include:
- natural-language reasoning by itself
- storing user memories
- making policy decisions
- enforcing consent
- directly reading desktop, email, chat, or private documents
- executing user-facing actions without a host decision layer
Install locally for development:
python -m pip install -e .
python -m pip install pytest ruffRun a benchmark:
adaptive-reservoir-bench temporal-drift --format markdownRun examples:
python examples/temporal_drift_demo.py
python examples/behavior_bias_demo.py
python examples/presence_state_demo.pyRun checks:
python -m pytest
python -m ruff check .Use the benchmark runner when you want a compact, reproducible check that the model can adapt when a temporal stream changes:
adaptive-reservoir-bench temporal-drift --format markdownOr run the executable demo:
python examples/temporal_drift_demo.pyThis demonstrates:
stream -> prediction -> metrics
adaptive-reservoir can also be used as a low-level numeric layer for adaptive
state channels. The host application decides how to interpret the channels and
what to do with them.
python examples/behavior_bias_demo.py
python examples/presence_state_demo.pyThese demos use deterministic synthetic numeric streams only:
events -> adaptive channels -> host decision hints
They do not read real desktop activity, process message content, infer real user state, or integrate with Character_OS/HDE.
The benchmark suite is intentionally deterministic and synthetic. It is evidence for online temporal adaptation behavior, not a production-readiness claim.
Current benchmarks:
| Benchmark | What it stresses |
|---|---|
concept-drift |
abrupt input-to-target mapping change |
temporal-drift |
changed temporal dependency / delay |
delayed-xor |
delayed memory plus nonlinear binary logic |
Benchmark reports include metrics such as final_score, adapt_steps,
us_per_sample, saturation_rate, and readout_sparsity.
See Benchmark Methodology for how to read the results and what they do not prove.
- Adaptive State Channels explains channel meaning, computation, ranges, interpretation, and limitations.
- Benchmark Methodology explains why the benchmark suite uses concept drift, temporal drift, and delayed XOR.
- HDE Integration Note defines the boundary between
adaptive-reservoirand HDE-like host systems. - Character OS Design Note sketches a companion-facing adapter boundary.
- Machine Presence Design Note sketches a system-presence adapter boundary.
- PracticeLens Design Note sketches a practice-session adapter boundary.
Run the local checks:
python -m pip install -e .
python -m pip install pytest ruff
python -m pytest
python -m ruff check .Apache-2.0.