ReLLA — Reversible LLM Adapter
Project description
ReLLA — Reversible LLM Adapter
ReLLA is a lightweight, offline‑first, provider‑agnostic LLM adapter designed for developers who need reliability, reproducibility, and control over LLM execution.
It records every LLM call as a deterministic artifact in SQLite, enabling replay, caching, migration, and benchmarking across providers and frameworks — without rewriting application code.
ReLLA is intentionally minimal. It is infrastructure tooling, not a framework.
Core Capabilities
- Deterministic request hashing and artifact storage
- SQLite‑backed replay and cache layer
- Provider‑agnostic execution (local and cloud)
- Framework‑independent core engine
- Fully offline‑testable and reproducible
- Designed to run on low‑resource machines
Installation
Core Engine
pip install reversible-lla
This installs the ReLLA core only. No framework dependencies are included by default.
Optional Framework Bridges
Framework integrations are opt‑in and installed explicitly:
pip install reversible-lla[langchain]
pip install reversible-lla[llamaindex]
pip install reversible-lla[langchain,llamaindex]
The core engine remains unchanged regardless of framework usage.
Command Line Interface
The CLI provides a direct, human‑friendly interface to the ReLLA engine.
Execute and Record
rella run "hello world" --db rella.db
This executes the request and stores the result as an immutable artifact.
Replay from Cache
rella replay "hello world" --db rella.db
If a matching artifact exists, the stored output is returned without invoking any provider.
Artifact Storage
All executions are stored in a local SQLite database.
sqlite3 rella.db
.tables
SELECT * FROM artifacts;
Each artifact contains:
- Deterministic input hash
- Provider identifier
- Model identifier
- Output payload
LangChain Integration
ReLLA can be used as a drop‑in LLM within LangChain applications.
from rella.bridges.langchain import ReLLALLM
llm = ReLLALLM(provider="mock", db="rella.db")
print(llm.invoke("hello from langchain"))
Artifacts generated via LangChain are immediately available for replay via the CLI.
LlamaIndex Integration
ReLLA integrates with LlamaIndex by implementing the full LLM interface.
from rella.bridges.llamaindex import ReLLALLM
llm = ReLLALLM(provider="mock", db="rella.db")
response = llm.complete("hello from llamaindex")
print(response.text)
Execution and replay semantics remain identical across all entry points.
Design Principles
- Reproducibility over convenience
- Determinism over heuristics
- Minimal surface area
- Explicit dependency control
- Offline‑first execution
Non‑Goals
- Agent orchestration
- Prompt chaining frameworks
- Workflow automation
- Hosted services or dashboards
Release Status
v0.1.0 — Core engine and framework bridges are stable.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reversible_lla-0.1.0.tar.gz.
File metadata
- Download URL: reversible_lla-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a763d4006f07372c5a71ec9282549c73ab24b6a7f64d85d18fe2820bc232532c
|
|
| MD5 |
71f38464d8007ed028b9c85610d756b6
|
|
| BLAKE2b-256 |
e88cf2275f9bbf947aab0b2aba50b9f49d182de62e380118aa9c7afca34a2452
|
File details
Details for the file reversible_lla-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reversible_lla-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22bb9542b8c358a6c62ec6627272214020dbc2d5d8d13a57cc3604c1c7853b6d
|
|
| MD5 |
e7e5114c83a0d90b9b6881573ef78768
|
|
| BLAKE2b-256 |
c21b0ada4786117bc8f6055398a463770b3afc17e90a84ba0ba18f4ef6921ee2
|