TensLab Logo
Contex Compiler v0.2.0 • Closed Beta Waitlist

The AI layer that
thinks before it sends.

TensLab is under active internal research & closed beta testing. Intercept raw JSON vector payloads before LLM APIs, stripping syntax bloat into high-density Contex Compact format with zero reasoning loss.

Request Beta Access → Read Beta Manual
80% TOKEN CUT
RAW RAG SEARCH JSON (312 TOKENS)
[
  { "id": 1, "title": "Login page unresponsive", "priority": "critical", "assignee": "alice" },
  { "id": 2, "title": "API rate limiting bug", "priority": "high", "assignee": "bob" }
]
COMPILED CONTEX COMPACT (62 TOKENS)
@dict 0:critical 1:alice 2:bob
@schema id title priority assignee
1 Login page unresponsive @0 @1
2 API rate limiting bug high @2
10×
Context Compression

Encode the same context in a fraction of the tokens — without losing semantic meaning.

~80%
Token Cost Reduction

Spend less on every API call. The savings compound across millions of user requests.

<1ms
Encoding Latency

WASM-powered Rust encoding runs in microseconds — completely invisible to your end users.

ROI Calculator

Calculate your token savings.

See how much TensLab cuts from your monthly OpenAI, Anthropic, and Gemini API bills.

Monthly API Spend $5,000 / mo
$500 $25,000 $50,000+
Primary Model
ESTIMATED ANNUAL SAVINGS
$48,000
You pay $1,000/mo instead of $5,000/mo
~80%
Cost Cut
10×
Density
<1ms
Latency
Product

Less noise.
More signal.

TensLab's TENS format strips AI context down to its semantic core — giving models exactly what they need, nothing more.

01

TENS Encoding

Binary token-level compression that preserves semantic fidelity while slashing byte overhead by up to 10×.

02

Contex Engine

Intelligent context management that selects, prioritizes, and deduplicates information before it reaches the model.

03

Drop-In Middleware

Works transparently with OpenAI, Anthropic, and Gemini APIs. One line of code change. Immediate savings.

04

Semantic Caching

Deduplicates repeated context across multi-turn sessions, cutting redundant tokens on every turn.

05

Cost Analytics

Real-time dashboards showing exactly how much you're saving per model, per endpoint, per day.

06

Privacy-First

All compression runs locally inside your process via WASM. Your prompts never leave your environment.

Technology

Engineered to
the token.

CONTEXT IN LLM API WASM CORE SAVINGS
TENS Format

Token-efficient serialization for AI context.

TensLab converts verbose JSON payloads into TENS Compact Text Format before sending to LLM APIs — stripping structural syntax noise to slash token spend by 80% while retaining 100% semantic fidelity.

TENS Compact Text for LLMs
Text-based models receive a hyper-dense, token-optimized text prompt with 80% fewer BPE tokens.
Local Binary IR & WASM Caching
High-speed WebAssembly codec (`@tens-lab/wasm`) handles binary caching and prompt IPC in under 1ms.
Binary Encoding WASM-powered Lossless Model-agnostic Open Protocol
Developers

Integrate in minutes.

One import. Same API surface. Immediate token savings — no refactoring required.

1
Install the package
Add @tens-lab/middleware to any Node.js or Python project.
2
Swap your client
Replace your existing OpenAI/Anthropic client with TensLab's drop-in wrapper.
3
Watch the savings
Same AI responses. Fraction of the tokens. Open the dashboard and watch API bills drop.
index.ts
// Before ─────────────────────────────
import OpenAI from 'openai'
const client = new OpenAI()

// After ──────────────────────────────
import createClient from '@tens-lab/middleware'

const client = createClient({
  provider: 'openai',
  apiKey: process.env.OPENAI_API_KEY,
  compress: true
})

// Identical API. 80% fewer tokens. ──
const res = await client.chat.completions.create({
  model: 'gpt-4o',
  messages
})

Works with every major AI provider & framework

OpenAI
Anthropic
Gemini
LangChain
LlamaIndex
Vercel AI
FAQ

Frequently asked questions.

How does TENS compress prompt context?

TENS is a high-density text format built with WebAssembly (`@tens-lab/core`). It strips redundant JSON keys, structural quotes, and syntax whitespace into compact schemas, encoding prompts with up to 80% fewer tokens in under 1ms.

Is my prompt data sent to third-party servers?

No. TensLab compression runs 100% locally inside your Node.js or browser process via WASM (`@tens-lab/wasm`). Your raw prompts never touch any external TensLab servers.

Which LLM providers are supported?

TensLab middleware (`@tens-lab/middleware`) supports OpenAI, Anthropic Claude, Google Gemini, LangChain, LlamaIndex, and Vercel AI SDK out of the box with zero model retraining.

Will compression affect accuracy or reasoning?

No. TENS protocol is 100% semantic lossless. Our needle-in-a-haystack passkey benchmarks confirm identical reasoning performance across 8K, 32K, and 128K token contexts.

Build smarter.
Spend less.

Join the waitlist. Be first to experience token intelligence at scale.

No spam. Unsubscribe anytime.