# How the Maintenance Agent Works

# How the Maintenance Agent Works

This is a separate OpenClaw agent using the OpenAI gpt-5.6-luna model. It is intended for CLI-style maintenance rather than vision or unrestricted administration. Its workspace memory search is intentionally FTS-only because no embedding credential is required.

## Flow

1. The hourly maintenance-status automation runs deterministic, read-only checks.
2. Results are stored in the agent workspace under state/status.json and state/maintenance.log.
3. The BookStack publisher updates this status page with redacted evidence.
4. The agent can review failures and propose the smallest reversible repair.
5. Deletes, restores, service restarts, configuration changes, external messages and other mutations require explicit approval.

## Checks

- Root filesystem capacity
- OVMS model endpoint and model availability
- OpenClaw status
- OpenClaw automation results, including backup errors
- Failed user services

Credentials and raw secret material are never copied into this workspace or published to BookStack.