# zerolithx/autobot_wp architecture

> Architecture diagram of the GitHub repository zerolithx/autobot_wp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zerolithx/autobot_wp
- Repository: https://github.com/zerolithx/autobot_wp

## Overview

Sleep Reply is an Android assistant that automatically replies during configured sleep or offline hours. Its documented workflow checks whether auto-replies are enabled and within schedule, then selects either a fixed custom message or an AI-generated reply before sending it. Configuration covers reply mode, schedule, model, API key, and AI instructions; a separate test capability checks AI replies. The repository tree contains only the README and a workflow file, so subsystem paths and internal call wiring cannot be verified from source; links below reflect documented behavior only.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Auto-reply runtime"]
  node_incoming["Incoming message"]
  node_eligibility["Enable and schedule check"]
  node_mode["Reply mode selection"]
  node_custom["Custom message"]
  node_delivery["Send reply"]
end

subgraph group_configuration["App configuration"]
  node_settings["Reply and schedule settings"]
  node_ai_settings["Model and AI instructions"]
end

subgraph group_ai["AI replies"]
  node_ai_reply["AI reply generation"]
  node_test["AI reply test"]
end

node_sender(("Message sender"))
node_openrouter{{"OpenRouter"}}

node_sender -->|"sends"| node_incoming
node_incoming -->|"checks"| node_eligibility
node_eligibility -->|"if eligible"| node_mode
node_mode -->|"custom mode"| node_custom
node_mode -->|"AI mode"| node_ai_reply
node_custom -->|"provides message"| node_delivery
node_ai_reply -->|"provides response"| node_delivery
node_settings -->|"sets schedule and enablement"| node_eligibility
node_settings -->|"sets reply mode"| node_mode
node_ai_settings -->|"configures generation"| node_ai_reply
node_ai_reply -->|"requests generation"| node_openrouter
node_openrouter -->|"returns response"| node_ai_reply
node_test -->|"tests selected model"| node_openrouter
node_ai_settings -->|"supplies instructions"| node_test

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_incoming,node_eligibility,node_mode,node_custom,node_delivery toneBlue
class node_settings,node_ai_settings toneAmber
class node_ai_reply,node_test,node_openrouter toneMint
class node_sender toneIndigo
```

## Components

### Auto-reply runtime

- **Incoming message**
- **Enable and schedule check**
- **Reply mode selection**
- **Custom message**
- **Send reply**

### App configuration

- **Reply and schedule settings**
- **Model and AI instructions**

### AI replies

- **AI reply generation**
- **AI reply test**

### Other components

- **Message sender**
- **OpenRouter**

## Connections

- Message sender → Incoming message: sends
- Incoming message → Enable and schedule check: checks
- Enable and schedule check → Reply mode selection: if eligible
- Reply mode selection → Custom message: custom mode
- Reply mode selection → AI reply generation: AI mode
- Custom message → Send reply: provides message
- AI reply generation → Send reply: provides response
- Reply and schedule settings → Enable and schedule check: sets schedule and enablement
- Reply and schedule settings → Reply mode selection: sets reply mode
- Model and AI instructions → AI reply generation: configures generation
- AI reply generation → OpenRouter: requests generation
- OpenRouter → AI reply generation: returns response
- AI reply test → OpenRouter: tests selected model
- Model and AI instructions → AI reply test: supplies instructions
