AI Analysis
Claude reads your server state and proposes structured fixes. Every action requires a backup and explicit confirmation — nothing is auto-applied.
What it does
AI Analysis collects a diagnostic snapshot of the target server and asks Claude to analyze it. The model returns a structured JSON response with a status, issue list, recommended actions, and free-form recommendations.
What the snapshot contains
- System diagnostics (uptime, memory, disk, load, top processes)
- OpenClaw status output
- Recent API errors from gateway logs (last 30 min)
- Agents list with models
- Sessions with token usage percentages
- Gateway config (bind, port, auth mode)
- If RAG is installed: health state and connections, plus the full
RAG_ARCHITECTURE_DOCsafety brief
What Claude returns
{
"status": "OK" | "WARNING" | "CRITICAL",
"summary": "One-sentence summary in Russian",
"issues": [
{
"severity": "critical" | "warning" | "info",
"title": "Short title",
"description": "Detailed explanation",
"action": {
"type": "command",
"label": "Button label",
"command": "exact shell command",
"requiresRestart": false
}
}
],
"recommendations": ["Free-form suggestion"]
}
Safety rules (built into the prompt)
The system prompt explicitly instructs Claude to:
- Never propose destructive commands without a backup. Session resets, for example, must copy the file before touching it.
- Use
mvinstead ofrmwhen possible. - Return ONLY valid JSON — no markdown, no text before or after.
- If RAG is installed, treat it as read-only. No
rm/mvon agent rag dirs, no direct index.db writes, never readconfig.json.
User confirmation
Every proposed action shows three buttons in the UI:
- Details — show the full command about to run
- Execute — run it, with automatic backup-before-execute
- Skip — dismiss this issue
If execution fails, the UI exposes a Rollback button that restores from the backup.
Free-form Q&A
Below the structured analysis there's an Ask about this server input. Type any question — Claude answers based on the same diagnostic snapshot. No persistence; each question is independent.
API key resolution
The Anthropic key used for analysis is resolved in this order:
- Server's main agent auth profile (if present)
- Global
ANTHROPIC_API_KEYenv var
If neither is set, AI Analysis is disabled on that server with a clear error.