Smart context management for LLMs - never forget what matters.
cargo add forgetlessOr add to your Cargo.toml:
[dependencies]
forgetless = "0.1"# With HTTP server
cargo add forgetless --features server
# With GPU acceleration (macOS)
cargo add forgetless --features metal
# With GPU acceleration (NVIDIA)
cargo add forgetless --features cudacargo install forgetless --features server
forgetless-server # Runs on http://localhost:8080use forgetless::{Forgetless, Config};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let result = Forgetless::new()
.config(Config::default().context_limit(128_000))
.add(&large_content)
.run()
.await?;
println!("{}", result.content);
Ok(())
}- Smart Compression: Intelligent content prioritization and compression to fit any token budget
- Multi-Format Support: PDF, images, text, code - all handled seamlessly with automatic extraction
- Priority System: Critical/High/Medium/Low/Minimal priority levels for fine-grained control
- Query-Based Filtering: LLM-powered relevance scoring to keep only what matters
- Vision Processing: Image analysis and description with GPU acceleration (Metal/CUDA)
- Semantic Chunking: Syntax-aware chunking for code and semantic boundaries for text
- Embedding Support: Vector-based similarity scoring for semantic retrieval
- Agent Memory: Cognitive-inspired memory architecture (Working/Episodic/Semantic)
- HTTP Server: REST API for language-agnostic integration
For detailed documentation and examples, visit:
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Project Link: https://github.com/pzzaworks/forgetless