# FlowDrop Playground

Provides an interactive playground for testing FlowDrop workflows with a chat-based interface.

All PHP classes in this module are `@internal`. See the [BC Policy](../../docs/reference/api/bc-policy.md) for details.

## REST API

### Session Endpoints

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/flowdrop/workflows/{workflow_id}/playground/sessions` | List sessions for workflow |
| POST | `/api/flowdrop/workflows/{workflow_id}/playground/sessions` | Create new session |
| GET | `/api/flowdrop/playground/sessions/{session_id}` | Get session details |
| DELETE | `/api/flowdrop/playground/sessions/{session_id}` | Delete session |

### Message Endpoints

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/flowdrop/playground/sessions/{session_id}/messages` | Get messages |
| POST | `/api/flowdrop/playground/sessions/{session_id}/messages` | Send message |
| GET | `/api/flowdrop/playground/sessions/{session_id}/messages/{message_id}` | Get single message |
| GET | `/api/flowdrop/playground/sessions/{session_id}/messages/{message_id}/status` | Message status |

### Execution Control

| Method | Path | Description |
|--------|------|-------------|
| POST | `/api/flowdrop/playground/sessions/{session_id}/stop` | Stop execution |
| POST | `/api/flowdrop/playground/sessions/{session_id}/reset` | Reset session |

## UI Routes

| Path | Description |
|------|-------------|
| `/admin/flowdrop/workflows/{workflow}/playground` | Playground page |
| `/admin/flowdrop/config/playground` | Settings form |

## Configuration

**Config:** `flowdrop_playground.settings`

- `auto_run` (boolean) - Auto-run workflows on load when they have no chat input node

## Permissions

| Permission | Description |
|------------|-------------|
| `administer flowdrop_playground` | Administration access |
| `execute playground workflow` | Execute workflows through playground |
