Unified agent runtime: loop detection + context compression for AI coding agents
Project description
DedrooM
Loop detection + context compression for AI coding agents.
DedrooM sits between your AI agent (Claude Code, Codex, Aider, Cursor, Cline, OpenCode) and the LLM provider to:
- Detect and block infinite loops — saves wasted API calls when tools repeat
- Compress context — reduces token usage by 60–95% without changing behavior
- Redact sensitive data — strip API keys, tokens, and secrets from tool outputs
- Track ROI — attribution engine shows exactly how much each tool saves
Quick Start
pip install dedroom
# Wrap an AI agent through the proxy
dedroom wrap claude # Claude Code
dedroom wrap codex # OpenAI Codex CLI
dedroom wrap aider # Aider
dedroom wrap cursor # Cursor Editor
dedroom wrap cline # Cline (VS Code)
dedroom wrap opencode # OpenCode
Commands
| Command | Description |
|---|---|
dedroom wrap <agent> |
Start proxy + launch agent through it |
dedroom unwrap <agent> |
Restore agent config to pre-wrap state |
dedroom doctor |
Run diagnostics (proxy, routing, savings) |
dedroom proxy |
Start standalone proxy server |
dedroom dash |
Launch the TUI dashboard |
Python API
from dedroom import DedrooM
pipeline = DedrooM("""
loop_detection:
max_repeats: 3
""")
# Check for loops
verdict = pipeline.verify("write_file", '{"path": "/tmp/x.txt"}')
# 0 = Allow, 1 = Warn, 2 = BlockRetry, 3 = BlockHalt
# Compress content
compressed = pipeline.compress(tool_output, content_type="code")
# Full pipeline
result = pipeline.process_tool("write_file", '{}', tool_result)
print(f"Blocked: {result['is_blocked']}")
print(f"Saved {result['original_tokens'] - result['compressed_tokens']} tokens")
Development
# Clone and build
git clone https://github.com/Devaretanmay/dedroom
cd dedroom
cargo build -p dedroom-cli -p dedroom-proxy
# Install Python package in dev mode
pip install -e .
# Run tests
pytest python/tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dedroom-0.1.2-cp312-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: dedroom-0.1.2-cp312-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 928.3 kB
- Tags: CPython 3.12+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0386410c53734c6276e8372f2cc8b722e8ef79d2ec7e267246bfa2f31a3b7eb
|
|
| MD5 |
ea8eb7244ceac118a06271d0c9f1249b
|
|
| BLAKE2b-256 |
2008d89cf3342580e1dad116aae4c385ce5d73d1c86e5202967e99c02193fd7c
|