AI-powered memory remediation with human-in-the-loop approval for Haiven container infrastructure.
This system consists of two components:
cd /mnt/apps/docker/infrastructure/remediation-approval
cp .env.example .env
# Edit .env with your generated REMEDIATION_SECRET
docker compose up -d
memory-remediation.py every 5 minutesmem_limit -> restarts container| Method | Path | Description |
|---|---|---|
GET |
/health |
Healthcheck |
GET |
/pending |
List pending recommendations |
GET |
/details/{token} |
View recommendation details |
GET |
/approve/{token} |
Approval confirmation page |
POST |
/approve/{token}/confirm |
Apply the memory change |
GET |
/reject/{token} |
Reject recommendation |
GET |
/audit |
View approval/rejection history |
See .env.example for configuration options.
Set these in the Cronicle web UI (scheduler.haiven.site) for the Memory Remediation job:
REMEDIATION_SECRET=<same-as-fastapi-env>
LITELLM_MASTER_KEY=<from-litellm/.env>
REMEDIATION_THRESHOLD=85
LITELLM_MODEL=qwen3-30b-a3b
docker logs -f remediation-approval
docker compose restart
cat /mnt/storage/remediation-approval/data/audit.json | python3 -m json.tool
ls -la /mnt/storage/remediation/reports/
deploy.resources.limits.memory in compose files| Service | Role |
|---|---|
| Prometheus | Provides container memory metrics |
| LiteLLM | AI analysis of memory profiles |
| Cronicle | Schedules the monitoring script |
| smtp-relay | Delivers approval emails |
Generated by haiven-service-onboarding plugin