# Ralph Control Quickstart

## Current control model

Ralph now uses a state file:

`/home/clawbot/.openclaw/workspace/.openclaw/ralph-state.json`

This file decides whether Ralph should be enabled or disabled.

## Commands

Run these from the workspace:

```bash
bash ralphctl.sh start
bash ralphctl.sh stop
bash ralphctl.sh status
bash ralphctl.sh logs
```

## Message phrases

The workspace instructions now recognize these exact phrases:

```text
start ralph
stop ralph
ralph status
```

If chat-side shell execution is permitted, those phrases can trigger the same backend control actions.

## Meaning

- `start` = enable Ralph and start the loop process if it is not already running
- `stop` = disable Ralph and stop the running loop if one exists
- `status` = show whether Ralph is enabled and whether a process is actually running
- `logs` = show recent Ralph activity

## How the loop behaves

`ralph.sh` checks `.openclaw/ralph-state.json` before each iteration.

If enabled is false, Ralph exits cleanly.
If enabled is true, Ralph continues working through one active task per run.

## Why this is safer

This design separates:
- control state
- process state
- task execution

That makes it easier to stop Ralph safely without relying on fragile Telegram-native skill command execution.
