# ClawPipe > The intelligent AI pipeline. Cut LLM costs 30-50% with one line of code. ## What is ClawPipe? ClawPipe is an SDK-local LLM optimization pipeline that sits between your application and LLM providers. It reduces costs 30-50% through intelligent routing, caching, context packing, and deterministic transforms -- all without changing your application logic. ClawPipe runs locally in your process. No proxy servers, no extra hops, no added latency. Install the SDK, replace your LLM calls with `pipe.prompt()`, and start saving immediately. ## Key Features - **Agent Booster**: Deterministic transforms that resolve prompts without calling an LLM. Math, JSON, dates, unit conversions, and UUIDs handled instantly at zero cost. - **Context Packing**: Compress context windows by removing redundancy, deduplicating content, and stripping boilerplate. Saves 20-60% on token counts. - **Semantic Cache**: Hash-based and embedding-based prompt deduplication. Similar prompts return cached results in milliseconds. TTL + LRU eviction. - **Self-Learning Router**: Cost/quality/latency-aware model selection that improves with every call. Routes simple tasks to cheap models, complex ones to powerful ones. - **Multi-Provider Gateway**: One API for OpenAI, Anthropic, DeepSeek, Mistral, Groq, and local models. Automatic failover with circuit breaker protection. - **Swarm Orchestration**: Fan out prompts to N models in parallel. Strategies: fastest, majority vote, highest quality, or longest response. - **RAG Pipeline**: Retrieval-augmented generation with pluggable vector stores. Automatically prepends relevant documents as context before the LLM call. - **Offline Fallback**: Auto-detects local LLM servers (llamafile, Ollama, LM Studio). Zero-cost routing when running locally. - **Voice Pipeline**: Speech-to-text input and text-to-speech output. Integrates with Voicebox and Whisper.cpp for free local voice processing. - **Pipeline Tracing**: Instrument every stage with timing data. Export traces in Perfetto format for visual analysis. ## How It Works 1. Install the SDK in your language of choice. 2. Replace your LLM provider calls with `pipe.prompt()`. 3. The pipeline automatically optimizes every request: boosting, packing, caching, routing, and learning. ## Installation ### JavaScript / TypeScript ``` npm install clawpipe-ai ``` ### Python ``` pip install clawpipe-ai ``` ### Go ``` go get github.com/finsavvyai/clawpipe-go ``` ### Rust ``` cargo add clawpipe-ai ``` ### Java ``` ai.clawpipe clawpipe-sdk ``` ## Quick Start (JavaScript) ```javascript import { ClawPipe } from 'clawpipe-ai'; const pipe = new ClawPipe({ apiKey: 'your-key' }); const result = await pipe.prompt('Explain quantum computing in one sentence'); console.log(result.text); console.log(result.savings); // { tokens_saved: 1200, cost_saved: '$0.003', cached: false, boosted: false } ``` ## Quick Start (Python) ```python from clawpipe import ClawPipe pipe = ClawPipe(api_key="your-key") result = pipe.prompt("Explain quantum computing in one sentence") print(result.text) print(result.savings) ``` ## Pipeline Stages ``` Request -> Booster -> RAG -> Pack -> Cache -> Route -> Swarm -> Call -> Learn ``` Each stage is optional and configurable. Disable any stage you do not need. ## Pricing - **Free**: $0/month, 1,000 calls/day, all pipeline stages, 1 project - **Pro**: $49/month, 100,000 calls/day, unlimited projects, analytics dashboard - **Team**: $149/month, 1,000,000 calls/day, team management, SLA guarantee - **Enterprise**: Custom pricing, unlimited calls, SSO, audit logs, dedicated infrastructure ## Supported Providers OpenAI, Anthropic, DeepSeek, Mistral, Groq, Together AI, Fireworks AI, Ollama, llamafile, LM Studio, and any OpenAI-compatible endpoint. ## Links - Website: https://clawpipe.ai - Install: npm install clawpipe-ai / pip install clawpipe-ai - Docs: https://docs.clawpipe.ai - Dashboard: https://app.clawpipe.ai - API: https://api.clawpipe.ai - GitHub: https://github.com/finsavvyai/clawpipe - npm: https://www.npmjs.com/package/clawpipe-ai - PyPI: https://pypi.org/project/clawpipe-ai - Status: https://status.clawpipe.ai - Support: support@clawpipe.ai