---
name: stop-demo
description: "Stop the Surf prediction market demo. Use when the user wants to stop, pause, kill, or clean up the running demo processes."
user_invocable: true
---

# Stop Surf Demo

Kill all running demo processes (servers and RisingWave).

## Steps

### 1. Kill demo servers

```bash
pkill -f "tsx demo/server.ts" 2>/dev/null
pkill -f "tsx benchmark/index.ts" 2>/dev/null
lsof -ti:8081 -ti:8082 -ti:3002 -ti:3003 | xargs kill -9 2>/dev/null
```

### 2. Stop RisingWave

```bash
docker stop surf-risingwave 2>/dev/null
```

### 3. Verify ports are free

```bash
curl -s -o /dev/null -w "%{http_code}" http://localhost:3002 2>/dev/null || echo "3002 free"
curl -s -o /dev/null -w "%{http_code}" http://localhost:3003 2>/dev/null || echo "3003 free"
```

### 4. Confirm

Tell the user all demo processes are stopped.
