# Tailspin AI

Token optimization and compression for Claude API requests. Reduces token usage while maintaining context quality through intelligent compression, caching, and context management.

## Installation

```bash
pip install tailspin-ai
```

## Usage

See [main Tailspin repository](https://github.com/z3knayr0/Tailspin-ai) for documentation and examples.

## Features

- **Smart Compression**: Automatic token optimization for text, code, and logs
- **Semantic Caching**: Cache-aware compression that preserves prefix stability
- **LiteLLM Integration**: Route requests to any LLM provider via LiteLLM
- **Context Management**: Intelligent context windowing and summarization
- **Compression Pipeline**: Extensible transform pipeline for custom compression logic

## Configuration

Configure via environment variables or `config.py`:

```python
litellm_enabled: bool = False
litellm_endpoint: str = ""
litellm_api_key: str = ""
litellm_provider: str = "hosted_vllm"
```

## Contributing

Contributions welcome. See [main repository](https://github.com/z3knayr0/Tailspin-ai).

## License

MIT
