File size: 1,618 Bytes
bb40e1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76a8376
f707fd4
76a8376
f707fd4
 
 
bb40e1c
f707fd4
bb40e1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f707fd4
bb40e1c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
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.