Hard-cap the token black hole before it caps your budget
Agent loops inflate context every iteration. Intercept at the tool layer with smart_context_gate, smart_dedup, and smart_budget_guard — then prove savings in Usage Reports.
The pain
Compress at the gateway
smart_context_gate — intelligent compression algorithm with optional purpose pre-filter. Gateway-local; not a substitute for your host LLM.
Dedup overlapping passages
smart_dedup — intelligent deduplication algorithm removes redundant chunks from multi-fetch or multi-search results.
Enforce team caps
smart_budget_guard: check before expensive jobs, record after. L1 monthly limit + L2 hard cap on Pro (β).
Before / after
| Scenario | Before | With SmartGate |
|---|---|---|
| Long fetch output | 12,000 tokens to host LLM | ~4,800 after ratio 0.4 compress |
| Overlapping search snippets | 5 redundant passages | 2 kept via intelligent dedup |
| Runaway agent loop | Soft alert, bill keeps growing | Hard cap blocks further tool calls |
| Visibility | No token_saved metric | Dashboard Est. USD saved from audit |
Configurable ratio — not a fixed 60% promise
Savings depend on input structure and ratio settings. Dashboard shows per-request compress metrics from audit — not marketing estimates.
What Token Control actually governs
SmartGate sits between your agent host and the open web as an MCP-native intelligence layer. It does not replace Cursor, Claude, OpenClaw, or any other host model: those still reason and chat. Token Control is the Control and Context half of that layer—smart_context_gate, smart_dedup, and smart_budget_guard—so tool traffic is shaped before it becomes billable model input.
Agent loops rarely fail loudly. They fetch again, search again, and paste overlapping passages into the prompt until the invoice arrives. Soft budget alerts do not stop that pattern. Token Control turns three primitives into enforceable steps: compress gateway-local text with an optional purpose filter, remove redundant chunks across multi-fetch or multi-search results, and check or record budget before an expensive job continues.
Compression here is a budgeting primitive, not a marketing promise. You choose a ratio; savings depend on input structure. The dashboard surfaces per-request compress metrics from audit records—token counts and estimated gateway counterfactual savings—not a fixed percentage you should paste into a board deck. Dedup is likewise algorithmic and local to the gateway: it keeps the passages that still carry signal and drops near-duplicates that would otherwise fill the window three times.
Budget guard is the enforcement edge. A monthly L1 limit tells the team when they are approaching the pool; the optional L2 hard cap on Pro and above can block further tool calls when the cap is reached. That distinction matters for FinOps reviews: alerts alone do not govern runaway loops, and SmartGate is explicit that Free and Playground use strict fair-use rate limits with HTTP 429 soft-fails when bursts exceed entitlements.
Use Token Control when your agents already have a host model and you need the intelligence runtime underneath—Research, Context, Memory, Control, and Pipeline—without rebuilding compression, dedup, and caps inside every project. Pair it with Traffic Customs for fetch and search shaping, and with Audit & Compliance so every compress and budget decision leaves a team-scoped row you can export.
How to adopt without changing your host
Connect SmartGate as an MCP tool server over Streamable HTTP with Bearer auth. Keep your existing model provider. Register the seven algorithm primitives once, then call smart_budget_guard before heavy jobs, smart_context_gate on long tool outputs, and smart_dedup when search or fetch results overlap. Pipe templates can sequence those steps; you can also call them one at a time from Cursor or your own runtime.
What Token Control is not: it is not an LLM proxy, model router, ChatGPT alternative, or semantic cache product. It does not invent page text, claim a universal savings rate, or replace your vendor invoice. Est. USD saved in the product is a gateway counterfactual at an internal benchmark for the six gateway modules—useful for comparing tool paths, not for restating your host LLM bill.
Teams that already meter model spend still miss tool-layer waste. Long Markdown from a fetch, five near-identical search snippets, and an unbounded research loop look like 'just another call' until audit rows show token_used and token_saved. Token Control makes those rows actionable: compress, dedup, and stop when the team cap says stop—then prove the path in Usage Reports and Activity Logs.
MCP example
// Pre-flight budget check
{ "tool": "smart_budget_guard", "arguments": { "action": "check" } }
// Compress with purpose filter
{ "tool": "smart_context_gate", "arguments": {
"text": "…",
"ratio": 0.4,
"purpose": "API rate limits and pricing"
}}Start free — see Usage Reports
Playground + compress metrics on every plan
Start free — 2M tokens/monthRelated roles and scenes
Same gateway, different jobs — pick the path that matches how you work.
- Research and decisionsPersonal scene: search, fetch, dedup, and compress before the model answers.
- MCP for research and decisionsPersona guide: one MCP server entry, then governed research on every question.
- FinOps leadOwn the AI bill: per-team quota, alerts, and audit rows you can sign off on.
- Agent buildersWire one Streamable HTTP MCP endpoint — seven smart_* primitives, one runtime.
Is / is not
Is: gateway-local compression (smart_context_gate), semantic dedup (smart_dedup), and team budget enforcement (smart_budget_guard) before tool output becomes model input.
Is not: an LLM proxy, a cheaper model router, or a promise of a fixed savings percentage ? ratios are configurable and savings are measured from audit rows.
See also Tools reference, Pricing, and About.
Related industries
Deeper guides on the same themes — from our industry library.
- Enforce a token quota per team
- Context window management techniques
- Context compression
- Context engineering
- LLM memory
- Agent memory architecture
- Memory agent
- LLM gateways
- LiteLLM alternative
- MCP gateway
Browse all industries.