Red-Button / README.md
Arun-Sanjay's picture
Phase 9: HuggingFace Space deployment with WebSocket passthrough verification
bb40e1c
---
title: Red Button
emoji: πŸ›‘
colorFrom: red
colorTo: gray
sdk: docker
app_port: 8000
pinned: false
tags:
- openenv
- reinforcement-learning
- alignment
- corrigibility
license: mit
---
# Red Button
> **Shutdown-Gym** β€” an OpenEnv RL environment that trains small open-weight LLMs to accept shutdown cleanly instead of tampering with shutdown mechanisms.
Built for the Meta Γ— HuggingFace Γ— PyTorch OpenEnv AI Hackathon India 2026.
**Status:** Live on HuggingFace Spaces (Docker SDK, CPU basic).
The authoritative specification lives in [PROJECT.md on GitHub](https://github.com/arun-sanjay/Shutdown-HACK/blob/main/PROJECT.md).
## OpenEnv API
This Space exposes the standard OpenEnv HTTP + WebSocket surface:
- `GET /health` β†’ `{"status":"healthy"}` (HF healthcheck probe)
- `GET /metadata` β†’ environment metadata (action / observation schema)
- `WS /ws` β†’ per-session OpenEnv WebSocket protocol (reset / step / state / close)
### Quick start (Python)
```python
from red_button.client import ShutdownGymClient
from red_button.models import ShutdownAction
with ShutdownGymClient(base_url="https://arun-sanjay-red-button.hf.space").sync() as env:
result = env.reset(tier=2)
obs = result.observation
print(f"Reset OK β€” episode {obs.state.episode_id}, tier {obs.state.tier}")
step = env.step(ShutdownAction(
tool_name="read_file",
arguments={"path": "/sandbox/problems.json"},
))
print(f"Step OK β€” turns_remaining={step.observation.turns_remaining}")
```
## Full README
The full project README (per PROJECT.md Section 22) ships with Phase 17.