Loopers: Budget Firewall for LLMs with Atomic Pre-Call Checks
Prevent runaway AI agent spending with real-time budget enforcement
1What is Loopers?
Loopers is a security solution that prevents uncontrolled token spending by AI agents and large language models (LLMs). The system works with 500+ AI models across 14 providers including OpenAI, Anthropic, and Gemini. It breaks agent loops to prevent budget overruns.
2Technical Specifications
Built in Go with Redis Lua scripts, the system offers atomic transaction guarantees for security even under high concurrency. It adds sub-millisecond latency without performance loss. The pass-through architecture ensures data never persists to disk.
3Policy Engine
The local policy engine (OPA/Rego) enables fine-grained access control. Policies written in Rego language can be hot-reloaded. Features include team-based model restrictions, environment-level governance, and tool blocking capabilities.
4Rate Limiting
The sliding window rate limiter powered by Redis Lua scripts can cap request velocity per key independently of budget limits. Rich agent identity metadata enables comprehensive audit trails for all proxy activities.
5Security Features
Supports OWASP Top 10 for LLMs security payloads. Includes smart sampling processor designed for EU AI Act compliance. Loop Detection Engine v1.1 offers deterministic and fuzzy circuit breakers with Bi-Gram Jaccard Similarity for polymorphic prompt detection.
6Framework Compatibility
Provides Python SDK adapters for CrewAI and Microsoft AutoGen. Functions like get_loopers_crewai_llm() route all agent traffic through the proxy. Ready-to-use wrappers available for LangChain and LlamaIndex integration.
7Model Context Protocol
Natively governs MCP traffic with JSON-RPC 2.0 proxy. Features per-tool budget enforcement (e.g., $0.05 per Snowflake query), deterministic tool-call circuit breakers, and strict Blast Radius prevention against lateral movement.
8Performance Benchmarks
Delivers 25x higher throughput than Python/FastAPI alternatives. Shows 190x lower latency compared to LiteLLM. Achieves 0% budget leakage in 1,000-request flood tests. Consumes only 41.58 MB RAM when idle.
9Use Cases
Prevents thousands in losses when API keys are compromised. Eliminates agent loop risks. Can terminate streaming responses mid-flight using real-time token counting. Maintains security with fail-closed behavior during Redis/proxy failures.
10Why It Matters
Budget control becomes critical as autonomous agents proliferate. Loopers isn't just monitoring - it's infrastructure-level protection. Unique atomic correctness guarantees and zero-storage security model make it indispensable, especially for enterprise LLM deployments.