# ARES Context Compression Layer - Quick Start

## Plug-and-Play Usage

### Option 1: Standalone Script (No Installation)

Copy `plug_and_play.py` to your project:

```bash
cp inventions/ares-context-compression-layer/plug_and_play.py your_project/
```

Use it:

```python
from plug_and_play import compress_context

result = compress_context(context_tensor, mode="balanced")
print(f"Saved {result.memory_saved_mb:.2f} MB")
```

### Option 2: Full Package Installation

```bash
cd inventions/ares-context-compression-layer
pip install -e .
```

```python
from ares_compression import ContextCompressor, CompressionMode

compressor = ContextCompressor.from_preset(CompressionMode.BALANCED)
result = compressor.compress(context_tensor)
```

## Performance Results

Demo output (CUDA enabled):

```
CONSERVATIVE: 40% compression, 4.80 MB saved, 6.19 ms
BALANCED:     51% compression, 6.15 MB saved, 1.93 ms
AGGRESSIVE:   70% compression, 8.40 MB saved, 7.42 ms
```

## Integration Example

```python
from plug_and_play import compress_context

class YourOrchestrator:
    def process(self, context_tensor):
        result = compress_context(context_tensor, mode="balanced")
        # Use result.compressed_context
        return result.compressed_context
```

## Files

- `plug_and_play.py` - Standalone script (copy this)
- `ares_compression/` - Full package
- `README.md` - Full documentation
