Skip to main content

Frequently Asked Questions (FAQ)

What is Loopers?​

Loopers is an open-source, baremetal, zero-delay firewall for AI agents and LLMs. It operates as a high-performance reverse proxy that sits between your applications/agents and model providers (OpenAI, Anthropic, Gemini, Groq, Bedrock, etc.) or MCP servers. It enforces real-time token budgets, detects and breaks infinite agent loops, and prevents bill shocks like LLMjacking.


What are the two operational regimes of Loopers AI Firewall?​

Loopers operates across two distinct regimes to maximize infrastructure safety and minimize costs:

  1. Regime 1: Rogue Agent Defense ("Bad Days" Protection): When agents malfunction, enter infinite recursive loops, suffer multi-turn objective drift, or leak credentials, Loopers trips active circuit breakers, clamps budget leases atomically, sanitizes prompt injections, and quarantines malicious agent keys.
  2. Regime 2: Inline Context Acceleration & Wire Optimization ("Normal Days" Optimization): When agents operate completely healthily, accumulating multi-turn tool outputs inevitably inflates prompt tokens and costs. Loopers transparently optimizes the wire:
    • Ghost Tokens: Offloads bulky tool responses (>512 bytes) to ephemeral Redis with AES-256-GCM encryption, replacing them with ~80-token ghost stubs to slash input tokens by 65% to 75%.
    • Deterministic Prefix Canonicalization: Alphabetizes tool schemas and strips volatile whitespace to guarantee upstream KV-cache hits (up to 90% cache read discounts).
    • Fast-Tier Routing: Directs intermediate verification turns to lightweight models while preserving cache pinning on frontier reasoning turns.

What are Ghost Tokens and does context compression affect response quality?​

No, response quality is not degraded.

In multi-turn agent runs, early tool execution outputs (such as large filesystem dumps or database query results) are typically only needed for intermediate steps (e.g. checking status, filtering items). Passing tens of thousands of tokens of raw JSON on every subsequent turn burns unnecessary compute and degrades LLM attention.

Loopers solves this with Dynamic Prompt Tail-Hydration:

  • On intermediate turns, the raw payload is replaced with an encrypted cryptographic stub (_loopers_ref: "loopers:blob:<id>").
  • When the agent reaches a synthesis or reasoning turn requiring deep analysis (!isSimpleTurn), Loopers automatically decrypts the original context from Redis and appends it to the prompt tail (<loopers_hydrated_context>).
  • The frontier model receives 100% of the raw, uncompressed context exactly when it needs to formulate the final answer, achieving 65% to 75% overall spend reduction with zero accuracy degradation.

How does Loopers stop runaway agent loops?​

Loopers features a Loop Detection Engine (v1.1) running three deterministic algorithms:

  1. Fingerprint Ring: Computes hashes of incoming message signatures, tool parameters, and response structures across sliding windows.
  2. Velocity Limiter: Detects rapid-fire burst iterations that indicate an unconstrained recursive loop.
  3. Stall Detector: Identifies non-progressive states where an agent repeatedly issues identical or redundant tool calls without converging on a solution.

When a loop is detected, Loopers severs the connection immediately, returning HTTP status 429 with header X-Loopers-Loop-Detected: true.


How does Loopers compare to LiteLLM and Bifrost?​

Loopers is engineered specifically as a baremetal infrastructure-level firewall prioritize speed, zero budget leakage, and agent governance.

FeatureLoopersLiteLLMBifrost
Language / ArchitectureGo (Native Binary)Python (FastAPI)Go
Peak Throughput4,623 req/s~176 req/s~3,200 req/s
Budget Leakage (1k flood)0% ($0.00)0.17%0%
P99 Proxy Overhead240.98 ms46,812.60 ms~310 ms
Agent Loop Circuit BreakerYesNoNo
MCP Tool GovernanceYes (Per-tool)NoPolicy-based
Storage SecurityZero-Storage Pass-ThroughDatabase RequiredIn-Memory

What is MCP Governance in Loopers?​

Model Context Protocol (MCP) governance allows enterprise and developer teams to safely expose external tools (databases, shell tools, APIs, web search) to autonomous AI agents. Loopers proxies JSON-RPC 2.0 requests between agents and MCP servers, enabling:

  • Per-Tool Cost Controls: Set maximum USD spend per tool call (e.g. max $0.05 per SQL query).
  • Circuit Breakers: Cap the maximum tool invocations allowed within a single session.
  • Blast Radius Prevention: Stop compromised or confused agents from performing lateral movement across multiple sensitive tools.

Is Loopers zero-storage and safe for production data?​

Yes. Loopers follows a Zero-Storage Security Model:

  • No payload text, completions, or API keys are written to disk or database.
  • Request headers and metadata are processed in volatile memory only.
  • Budget accounting is recorded atomically in Redis using single-roundtrip Lua scripts without storing prompt content.

How do I install and deploy Loopers?​

Loopers can be deployed in under 60 seconds via Docker or binary release:

# Run with Docker
docker run -d \
-p 8080:8080 \
-e REDIS_ADDRESS=localhost:6379 \
tryloopers/loopers:latest

Then point your provider SDK base URL to standard Loopers port:

import openai

client = openai.OpenAI(
base_url="http://localhost:8080/v1",
api_key="your-openai-key"
)