AI-Powered System Administrator Agent for Emergency Diagnostics & Recovery
SOS Agent is an intelligent system rescue tool powered by multiple AI models. It provides emergency diagnostics, performance optimization, and recovery assistance for Linux systems.
-
π€ Multi-Model AI Support
- Google Gemini (default, fast & free tier)
- OpenAI GPT-4o (powerful reasoning)
- Inception Labs Mercury (specialized for coding)
- Claude via AgentAPI (OAuth, experimental)
-
π§ Comprehensive System Diagnostics
- Hardware health monitoring
- Service status checks
- Log analysis & error detection
- Performance metrics
-
π‘οΈ Safety First
- Protected critical services (sshd, NetworkManager)
- Emergency mode for urgent situations
- Automatic backup recommendations
-
π Interactive TUI (Text User Interface)
- Cyberpunk-themed visual interface
- Persistent Chat with context
- Guided Fixer system with Dry-Run safety
- Real-time Dashboards
# Download and run installer
curl -fsSL https://raw.githubusercontent.com/milhy545/sos-agent/main/install.sh | bashOr manual installation:
git clone https://github.com/milhy545/sos-agent.git
cd sos-agent
./install.shThat's it! The installer handles everything automatically:
- β Checks Python 3.11+
- β Creates isolated environment
- β Installs dependencies
- β
Creates global
soscommand - β Runs setup wizard
Configure your AI provider:
sos setupThen start diagnosing:
sos diagnose --category hardwareπ Detailed installation guide: INSTALL.md | INSTALL.cz.md
sos menu # π₯οΈ Launch Interactive TUI (Recommended)
sos diagnose --category <type> # Run diagnostics (CLI)
sos diagnose --issue "problem" # Run diagnostics with specific issue
sos chat --message "hi" # Chat with the agent (stores session context)
sos fix # Interactive fix mode (CLI)
sos emergency # Emergency fallback diagnostics
sos monitor # Real-time system monitoring
sos check-boot # Boot/GRUB diagnostics
sos optimize-apps # Clean & optimize applications
sos setup # Configure API keysLaunch the full interface with:
sos menuFeatures:
- Grid Menu: Fast navigation (0-9 keys).
- antiX-cli-cc vibe: Status bar with current issue + bold neon grid.
- Chat: Persistent AI chat with system/issue context.
- Fixers: Guided fix interface with Dry-Run + double-confirm execute.
- Diagnostics Hub: See the last
--issueand shell tips from TUI. - Logs: Tail recent agent logs directly in TUI.
- Monitor: Start/stop real-time dashboards.
hardware- CPU, RAM, disk, sensorsnetwork- Connectivity, interfaces, firewallservices- Systemd services statussecurity- Security audits & vulnerabilitiesperformance- CPU/RAM/disk performance analysis
Get your API keys:
- Gemini: https://aistudio.google.com/app/apikey (Recommended β)
- OpenAI: https://platform.openai.com/api-keys
- Inception Labs: https://inceptionlabs.ai
Add to .env:
GEMINI_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here # Optional
INCEPTION_API_KEY=your_key_here # OptionalEdit config/default.yaml:
ai_provider: gemini # or "openai", "inception"
gemini_model: gemini-2.0-flash-exp
openai_model: gpt-4o
inception_model: mercury-coder# Install dev dependencies
poetry install --with dev
# Run tests
poetry run pytest
# Format code
poetry run black src/
poetry run ruff check src/
# Type checking
poetry run mypy src/Documentation is available in:
- π¬π§ English -
README.md - π¨πΏ Czech -
README.cz.md
- Architecture - System design & components
- Multi-Model Setup - AI provider configuration
- Debug History - Known issues & fixes
- Contributing - How to contribute
SOS Agent protects critical services:
- Never disabled: sshd, NetworkManager, ollama, tailscaled
- Emergency mode: Read-only diagnostics only
- Backup first: Always recommends backups before changes
Contributions welcome! Please read CONTRIBUTING.md first.
MIT License - see LICENSE for details.
- π Issues: https://github.com/milhy545/sos-agent/issues
- π¬ Discussions: https://github.com/milhy545/sos-agent/discussions
- π§ Email: milhy545@gmail.com
Built with β€οΈ for system administrators who need AI assistance in emergencies