One command to rule them all. Installs, configures, and orchestrates the complete OpenClaw infrastructure stack for OpenClaw, Claude Code, and any Agent Skills-compatible tool.
5 infrastructure tools. 1 command.
Building production-ready AI agents requires multiple infrastructure layers: cost tracking, persistent memory, context optimization, intelligent routing, and API quota monitoring.
Setting up and running 5 separate tools is tedious. This suite installs them all, initializes them, and provides a unified dashboard and management interface.
| Tool | Purpose | Dashboard Port | Free Tier | Pro Tier |
|---|---|---|---|---|
| Cost Governor | Real-time cost tracking with circuit breakers | 9090 | Basic tracking | Unlimited + AI optimization |
| Memory System | Persistent memory with semantic search | 9091 | 100 memories (7 days) | Unlimited + persistent storage |
| Context Optimizer | Intelligent context compression (40-60% savings) | 9092 | 100 compressions/day | Unlimited + pattern learning |
| Smart Router | Automatic model selection (30-50% cost savings) | 9093 | 100 decisions/day | Unlimited + pattern learning |
| API Quota Tracker | ToS-compliant quota monitoring (prevents 429 errors) | 9094 | 100 req/min | Unlimited + queuing |
# Clone the suite orchestrator
git clone https://github.com/AtlasPA/openclaw-infrastructure.git
cd openclaw-infrastructure
# Install all 5 infrastructure tools
python3 scripts/infrastructure.py install
# Initialize everything
python3 scripts/infrastructure.py setup
# Check system health
python3 scripts/infrastructure.py status| Command | What it does |
|---|---|
install |
Clone and install all 5 infrastructure tools from GitHub |
setup |
Initialize all tools (databases, configurations, baselines) |
status |
Unified dashboard — health check across all 5 tools |
start-dashboards |
Start all 5 web dashboards (ports 9090-9094) |
stop-dashboards |
Stop all running dashboards |
analytics |
Combined analytics across all tools |
update |
Update all tools to latest versions |
uninstall |
Remove all infrastructure tools |
All commands accept --openclaw-dir /path or default to ~/.openclaw.
The status command shows a real-time overview of all 5 tools:
╔══════════════════════════════════════════════════════════════╗
║ OpenClaw Infrastructure Suite Status ║
╚══════════════════════════════════════════════════════════════╝
📊 Cost Governor (Port 9090)
├─ Status: Running
├─ Daily Budget: $5.00 / $10.00 (50%)
├─ Total Spent Today: $5.23
└─ Alerts: 1 warning (approaching daily limit)
🧠 Memory System (Port 9091)
├─ Status: Running
├─ Total Memories: 847
├─ Recent Retrievals: 23 (last hour)
└─ Storage: 12.4 MB / 100 MB
🗜️ Context Optimizer (Port 9092)
├─ Status: Running
├─ Compressions Today: 45 / 100
├─ Token Savings: 52% average
└─ Cost Savings: $2.34 today
🎯 Smart Router (Port 9093)
├─ Status: Running
├─ Routing Decisions: 67 / 100 (today)
├─ Model Distribution: Opus 12% | Sonnet 45% | Haiku 43%
└─ Cost Savings: 38% vs always-Opus
⏱️ API Quota Tracker (Port 9094)
├─ Status: Running
├─ Active Windows: 3 providers
├─ Requests/Min: 45 / 100
└─ Queue: 0 pending
╔══════════════════════════════════════════════════════════════╗
║ Combined Savings: $8.67 today | $247.23 this month ║
║ ROI: Suite costs $2.50/month | Saves $247.23/month ║
╚══════════════════════════════════════════════════════════════╝
When you run install, the suite clones these 5 repositories to ~/.openclaw/:
- openclaw-cost-governor — https://github.com/AtlasPA/openclaw-cost-governor
- openclaw-memory — https://github.com/AtlasPA/openclaw-memory
- openclaw-context-optimizer — https://github.com/AtlasPA/openclaw-context-optimizer
- openclaw-smart-router — https://github.com/AtlasPA/openclaw-smart-router
- openclaw-api-quota-tracker — https://github.com/AtlasPA/openclaw-api-quota-tracker
Each tool can be used independently or managed through this suite.
The 5 tools work together as a cohesive infrastructure stack:
┌─────────────────────┐
│ OpenClaw Agent │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Smart Router │ ← Intelligent model selection
│ (9093) │ (30-50% cost savings)
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Context Optimizer │ ← Compress context
│ (9092) │ (40-60% token savings)
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ API Quota Tracker │ ← Check rate limits
│ (9094) │ (prevent 429 errors)
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Cost Governor │ ← Track costs, enforce budgets
│ (9090) │ (automatic circuit breakers)
└──────────┬──────────┘
│
Model API Call
│
┌──────────▼──────────┐
│ Memory System │ ← Store/retrieve memories
│ (9091) │ (persistent across sessions)
└─────────────────────┘
- Smart Router analyzes complexity → selects optimal model
- Context Optimizer compresses context → reduces tokens
- API Quota Tracker checks limits → allows or queues request
- Cost Governor validates budget → allows or blocks request
- Cost Governor records actual cost
- Memory System extracts and stores important facts
- API Quota Tracker updates sliding windows
- Smart Router records routing outcome for learning
- Memory System injects relevant memories at session start
- All tools provide analytics and recommendations at session end
Each tool has a free tier and Pro tier ($0.50 USDT/month per tool via x402 payment protocol).
Suite Bundle:
- Free tier: All 5 tools with basic features
- Pro tier: $2.50 USDT/month for all 5 tools (save $0.50/month vs individual)
Typical ROI:
- Pro tier costs: $2.50/month
- Average savings: $200-300/month
- ROI: 80x-120x
Without the suite:
cd ~/.openclaw
git clone https://github.com/AtlasPA/openclaw-cost-governor.git
cd openclaw-cost-governor && npm install && npm run setup
cd ..
git clone https://github.com/AtlasPA/openclaw-memory.git
cd openclaw-memory && npm install && npm run setup
cd ..
# ... repeat for 3 more tools ...With the suite:
git clone https://github.com/AtlasPA/openclaw-infrastructure.git
cd openclaw-infrastructure
python3 scripts/infrastructure.py install
python3 scripts/infrastructure.py setup
python3 scripts/infrastructure.py statuspython3 scripts/infrastructure.py start-dashboards
# Opens 5 browser tabs:
# - http://localhost:9090 (Cost Governor)
# - http://localhost:9091 (Memory System)
# - http://localhost:9092 (Context Optimizer)
# - http://localhost:9093 (Smart Router)
# - http://localhost:9094 (API Quota Tracker)python3 scripts/infrastructure.py analytics
╔══════════════════════════════════════════════════════════════╗
║ Combined Analytics - Last 7 Days ║
╚══════════════════════════════════════════════════════════════╝
💰 Cost Savings
├─ Smart Router savings: $47.23 (38% reduction)
├─ Context Optimizer savings: $18.45 (token compression)
├─ Total savings: $65.68
└─ ROI: 26x (suite costs $2.50)
🧠 Memory Insights
├─ Total memories stored: 1,247
├─ Most retrieved topics: Python (45), React (32), API design (28)
└─ Context reuse rate: 67% (memories used instead of re-explaining)
📊 Usage Patterns
├─ Peak usage hours: 9am-11am, 2pm-5pm
├─ Most used models: Sonnet (52%), Haiku (35%), Opus (13%)
└─ Average tokens/request: 2,340 (down from 5,800 without optimizer)
⚠️ Rate Limit Health
├─ 429 errors prevented: 23 (would have blocked work)
├─ Requests queued: 8 (Pro tier)
└─ Peak usage: 87 req/min (stayed under 100 limit)python3 scripts/infrastructure.py update
# Checks for updates to all 5 tools
# Pulls latest versions from GitHub
# Runs migrations if needed| Approach | Installation Time | Dashboard Access | Unified Analytics | Updates |
|---|---|---|---|---|
| Individual Tools | 15-20 min (5 separate installs) | Open 5 tabs manually | None | Update each separately |
| Infrastructure Suite | 2-3 min (one command) | One command opens all 5 | Combined view | One command updates all |
- Python 3.8+ for orchestration script
- Node.js 16+ for the 5 infrastructure tools
- SQLite3 for databases
- Git for installation
MIT License - See LICENSE file
- OpenClaw Security Suite — 11 security tools for workspace protection
- OpenClaw — The core agent framework
Issues and PRs welcome at https://github.com/AtlasPA/openclaw-infrastructure
- GitHub Issues: https://github.com/AtlasPA/openclaw-infrastructure/issues
- Documentation: See individual tool READMEs
- Pro tier support: x402 payment protocol integration