New:Socket for Asana Is Now Available.Learn more
Get Started

clawpipe-ai

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clawpipe-ai

The intelligent AI pipeline. Booster, Context Packing, Caching, Smart Routing, Multi-Provider Gateway, Budget Caps, Rate Limiting, Circuit Breaker, Audit Logging — all in one SDK.

latest
Source
npmnpm
Version
3.7.0
Version published
Maintainers
1
Created
Source

clawpipe-ai

The only AI gateway SDK that skips LLM calls entirely.

npm version license: MIT bundle size

ClawPipe is an LLM pipeline that sits between your app and providers. The Booster stage answers deterministic prompts (math, regex, dates, hashes, JSON shaping, 246 rules across 29 packs) with zero LLM tokens — sub-millisecond, free. Everything else flows through context packing, prompt cache, smart routing, multi-provider gateway, and a self-learning router that gets cheaper over time.

Drop it in front of your existing OpenAI or Anthropic code with no logic changes.

Public measured benchmark in progress at github.com/finsavvyai/clawpipe-booster-benchmark. Per-bucket cost-reduction numbers (with 95% Wilson CIs) will replace the prior in-house synthetic benchmark on this page once the measured run lands.

Quick start

npm install clawpipe-ai
import { ClawPipe } from 'clawpipe-ai';

const pipe = new ClawPipe({
  apiKey: process.env.CLAWPIPE_API_KEY!,
  projectId: 'proj_xxx',
});

const result = await pipe.prompt('What is 2 + 2?');
console.log(result.text);  // "4"
console.log(result.meta);  // { boosted: true, cached: false, tokensIn: 0, ... }

The Booster answered locally — zero tokens, zero latency, zero cost. Try a non-deterministic prompt (pipe.prompt('Write a haiku about TypeScript')) and the pipeline routes it to the cheapest viable model that meets your quality target.

Pipeline stages

StageWhat it does
BoosterDeterministic transforms — skip LLM calls entirely.
PackerCompress context to reduce tokens before send.
CacheHash-based prompt dedup (local + remote KV).
RouterCost / quality / latency-aware model selection.
GatewayMulti-provider dispatch with failover and circuit breaking.
LearnerTracks outcomes, refines routing weights per task type.

Every stage is independently toggleable in the ClawPipe config.

Supported providers

ai21, anthropic, azure-openai, bedrock, cerebras, cohere, databricks, deepseek, fireworks, gemini, groq, huggingface, mistral, openai, openrouter, perplexity, replicate, together, vertex, writer, xai.

Drop-in compat layers for OpenAI (clawpipe-ai/openai-compat) and Anthropic (clawpipe-ai/anthropic-compat) so existing code keeps working.

Open source SDK + paid hosted service

This SDK is MIT-licensed and free to use. The hosted gateway at clawpipe.ai — which provides the multi-provider dispatch, distributed cache, learner weights, and analytics — is operated by ClawPipe and billed via LemonSqueezy. You can self-host the gateway from this SDK if you prefer; the hosted service exists so you don't have to.

Contributing

See CONTRIBUTING.md. All contributions are governed by our Code of Conduct.

License

MIT — see LICENSE.

Keywords

llm

FAQs

Package last updated on 22 May 2026

Related posts