Agent Zero Medic - It Be nice to have a Button #1059
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
|
#!/usr/bin/env python3 import os class Medic: def main(): if name == 'main': |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🩺 Agent Zero Medic - Lightweight Recovery Tool
A tiny (~11KB) first-aid kit for when Agent Zero crashes.
What is it?
Agent Zero Medic is a standalone Python script that diagnoses and repairs broken Agent Zero installations. When your 4GB+ Agent Zero environment breaks, this 11KB tool gets you back to a repairable state.
✨ Features
💡 Why I made this
After moving Agent Zero between machines and dealing with hardcoded paths breaking, I wanted a tiny, portable tool that could fix the most common issues without needing a working Python environment or internet access.
🔗 Code
What is it?
Agent Zero Medic is a standalone Python script that diagnoses and repairs broken Agent Zero installations. When your 4GB+ Agent Zero environment breaks, this 11KB tool gets you back to a repairable state.
✨ Features
Feature Description
🔍 Diagnose Scans for missing files, broken imports, wrong paths
🔧 Repair Fixes .env paths, repairs imports, creates missing directories
📦 Restore Extracts from backup ZIP files
✅ Verify Confirms installation works before you try to start
🖥️ Interactive GUI file picker or text input when auto-detect fails
🌐 Multi-Platform Windows, WSL, Docker - auto-detects and adapts
🚀 Quick Start
Download medic.py to your Agent Zero folder
Or anywhere - it will find Agent Zero automatically
Full repair cycle
python agent-zero-medic.py --all
Or step by step
python agent-zero-medic.py --diagnose # Check what's broken
python agent-zero-medic.py --repair # Fix issues
python agent-zero-medic.py --verify # Confirm it works
🛠️ What it fixes
Common crash causes:
❌ Missing usr/skills/, logs/, tmp/ directories
❌ Broken imports: from helpers. → from python.helpers.
❌ Wrong paths in .env (Linux paths on Windows, etc.)
❌ Corrupted or missing core files
Platform-specific fixes:
Windows: /root/ → C:/Users/...
WSL: C:\ → /mnt/c/
Docker: Windows paths → /a0/
📋 Usage Examples
Auto-detect and repair
python agent-zero-medic.py --all
Manual path (if auto-detect fails)
python agent-zero-medic.py --path "C:\Tools\agent-zero" --all
Interactive mode (GUI picker or text input)
python agent-zero-medic.py --interactive
Restore from backup
python agent-zero-medic.py --restore backup-2024-01-15.zip
📊 Size Comparison
Component Size
Full Agent Zero ~4GB+
Agent Zero Medic ~11KB
💡 Why I made this
After moving Agent Zero between machines and dealing with hardcoded paths breaking, I wanted a tiny, portable tool that could fix the most common issues without needing a working Python environment or internet access.
🔗 Code
#!/usr/bin/env python3
"""Agent Zero Medic - github.com/yourusername/agent-zero-medic"""
Full code: [attach agent-zero-medic.py]
Beta Was this translation helpful? Give feedback.
All reactions