<<<<<<< HEAD
🧠 Remenis: AI Memory Security Framework
Clean Context. Zero Bloat. Absolute Agent Containment.
Remenis is an open-source AI memory isolation framework designed to solve the AI agent memory poisoning problem. As autonomous agents execute multi-turn tasks independently, unvetted long-term memory accumulation and context injection can cause agents to go rogue, drift, or execute unauthorized tool calls without human oversight.
Remenis enforces strict runtime boundaries and memory hygiene to ensure agent state remains secure, fast, and untainted.
🚀 Key Architectural Updates
Remenis solves context drift and rogue agent behavior through 5 core pillars:
- 🛡️ OS Privilege Rings (
RingContextGuard)- Multi-tiered hierarchical memory isolation (Ring-0 to Ring-2). Guarantees untrusted prompts and user context cannot corrupt, overwrite, or leak core system memory.
- 🔒 Security Guardrails
- Real-time validation logic that intercepts and blocks prompt injection, context poisoning, and unauthorized memory modification before state updates persist.
- ⏳ Time-Decay Scoring
- Algorithmic decay function that automatically deprioritizes stale or obsolete memory entries so the agent retrieves only high-fidelity, relevant context.
- ⚡ Fast Multi-Thread Writes
- High-throughput concurrent execution pipeline optimized for parallel memory reads and writes in real-time agent workflows.
- 🧹 Auto-Deduping
- Vector and semantic deduplication engine that removes redundant memory entries, delivering clean context with zero bloat.
🏗️ Architecture Overview
[ Incoming Prompt / Agent Context ]
│
▼
┌──────────────────────────────┐
│ Security Guardrails │ (Real-Time Prompt Injection Defense)
└───────────────┬──────────────┘
│
▼
┌──────────────────────────────┐
│ OS Privilege Rings │ (RingContextGuard Isolation: Ring-2 -> Ring-0)
└───────────────┬──────────────┘
│
▼
┌──────────────────────────────┐
│ Multi-Thread Memory Engine │ (Auto-Deduping & Time-Decay Scoring)
└───────────────┬──────────────┘
│
▼
[ Pure, Uncorrupted Context Output ]
🛠️ Quickstart & Integration
Install Remenis via PyPI or clone locally:
Installation
Bash
pip install remenis
Local Development Setup
Bash
# Clone repository
git clone [https://github.com/your-username/remenis.git](https://github.com/your-username/remenis.git)
cd remenis
# Set up virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install editable package
pip install -e .
Usage Example
Python
from remenis import MemoryEngine, RingContextGuard
# Initialize guard at isolation level 1
guard = RingContextGuard(ring_level=1)
memory = MemoryEngine(guard=guard)
# Process and store secure agent memory
clean_context = memory.process_input("User input payload")
🤝 Community & Benchmarks
We actively red-team Remenis against agentic vulnerabilities, memory poisoning, and context leakage patterns.
Automated Red-Teaming Suites: Run pytest tests/benchmarks/ to test RingContextGuard against known prompt injection vectors.
Contributing: Open an issue or pull request to submit new benchmark payloads or security guardrails.
📄 License
Distributed under the Apache 2.0 License. See LICENSE for details.
=======
# 🧠 Remenis




> **The Zero-Trust Enterprise AI Middleware** — High-Performance Context Compression, Sub-5ms Storage IDS, Cryptographic SBQ Quarantine, and Verifiable Audit Artifacts for Autonomous Agents.
---
## 🏛️ Core Architecture
[ Autonomous AI Agent ]
│
▼
┌──────────────────────────────────────────────────────────┐
│ Remenis Zero-Trust Middleware │
├──────────────────────────────────────────────────────────┤
│ 1. DCC Engine ──> Slashes Token Burn by ~90% │
│ 2. Storage IDS ──> Sub-5ms Invariant Detection │
│ 3. SBQ Quarantine ──> Revokes Rogue Namespaces │
│ 4. Cryptographic Proof ──> Signed Audit Verification │
└──────────────────────────────────────────────────────────┘
│
▼
[ Enterprise Vector Store ]
---
## ⚡ Visual Proofs & Terminal Demos
### 1. 📉 Deterministic Context Compression (DCC)
*Slashes LLM API token burn by up to 90% while preserving operational state.*

---
### 2. 🛡️ Storage-Layer IDS & Obfuscation Defense
*Intercepts direct prompt injections, Base64 obfuscation, and unauthorized webhooks.*

---
### 3. 🔒 SBQ Behavioral Quarantine & Revocation Ledger
*Permanently neutralizes rogue AI behavior by revoking cryptographic namespaces in real time.*

---
## 🗂️ CLI Compliance Proof Exporter (`remenis.audit`)
Generate and verify cryptographically signed `.proof` files for enterprise governance:
### Generate Signed Compliance Proof:
```bash
python3 remenis_audit.py --key "enterprise_secure_key" --out remenis_soc2.proof
Cryptographically Verify Proof Integrity:
python3 remenis_audit.py --key "enterprise_secure_key" --verify remenis_soc2.proof
🚀 Quick Start (2-Line Integration)
from remenis import ZeroTrustMemory
memory = ZeroTrustMemory(secret_key="enterprise_secure_key")
record = memory.add_record(agent_id="enterprise_agent_01", content="Secure context payload")
Maintained under Zero-Trust AI Standards.
015eb83d7b2f36de80865bc3d29c39b09207bbfb
Metadata
Release files for remenis-memory 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| remenis_memory-0.1.3.tar.gz | 18.4 kB | Without provenance | Details for remenis_memory-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| remenis_memory-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for remenis_memory-0.1.3-py3-none-any.whl |
Total release size: 35.1 kB
Release files / remenis_memory-0.1.3.tar.gz
| Download URL | remenis_memory-0.1.3.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b25229fceb14c938a5d28963bd61befbf9bcf9d19868b3e07679bcd2b948c278
|
|
BLAKE2b-256 checksum How to use checksums |
2ae0bf419bfa30ad64000a7fe24a83b77a5cc77beda555034d7c4b5074b257f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / remenis_memory-0.1.3-py3-none-any.whl
| Download URL | remenis_memory-0.1.3-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12984e4712dc01f2438b6128b6c2b6c1f7f07b49dcc2b27061ecdd53216a3db1
|
|
BLAKE2b-256 checksum How to use checksums |
96120b3bafc64f798bf1673e909972bba1c336b18339fb3df84e711b92c3f066
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for remenis-memory 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.