TokenisttTokenistt
PricingResourcesBlogDocsLegalAbout UsCareers
private beta · limited accessSign inStart free →
PricingResourcesBlogDocumentationLegalAbout UsCareers
Start free →Sign in
DocsFeature — Optimization Engine
← Back
Getting Started
MCP Server
Integrations
Features
Reference

Feature — Optimization Engine

The optimization engine analyzes prompt structure and suggests (or automatically applies) rewrites that reduce token count without degrading output quality.

What it detects

  • –Redundant preamble ("You are a helpful assistant that…")
  • –Repeated context across turns already in the window
  • –Over-specified tool definitions with unused fields
  • –Chain-of-thought instructions on simple classification tasks
  • –Verbose few-shot examples where one would suffice
  • –Duplicate content between system and user messages

Example rewrite

# BEFORE (680 tokens)
You are an expert software engineer with 20 years of experience
in distributed systems. You are helpful, accurate, and concise.
Please carefully read the following code snippet and provide
a thorough, detailed explanation of what it does, step by step.

# AFTER (120 tokens) — applied by optimizer
Explain this code concisely:

−82% tokens · same task completion · $0.0017 saved per call

Applying optimizations

# Suggest only (default)
optimization.auto_apply = false

# Auto-apply silently
optimization.auto_apply = true

# Apply via VS Code quick-fix
# Position cursor on prompt string → ⌘. → "Apply Tokenistt optimization"