File size: 9,037 Bytes
24f0bf0
f881423
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
 
 
 
24f0bf0
f881423
24f0bf0
f881423
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
24f0bf0
f881423
24f0bf0
f881423
 
 
24f0bf0
 
 
f881423
 
 
24f0bf0
f881423
 
 
24f0bf0
f881423
 
 
24f0bf0
 
 
 
 
f881423
24f0bf0
f881423
 
 
 
 
 
24f0bf0
f881423
24f0bf0
 
 
 
f881423
 
 
24f0bf0
f881423
 
 
24f0bf0
f881423
24f0bf0
f881423
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
24f0bf0
f881423
24f0bf0
f881423
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
24f0bf0
f881423
24f0bf0
f881423
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
24f0bf0
f881423
24f0bf0
f881423
 
 
 
 
 
 
24f0bf0
f881423
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24f0bf0
f881423
24f0bf0
f881423
24f0bf0
f881423
 
 
24f0bf0
f881423
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
24f0bf0
f881423
 
 
24f0bf0
f881423
 
 
 
 
 
 
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
24f0bf0
f881423
24f0bf0
f881423
 
 
 
 
 
 
 
 
 
 
24f0bf0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# scraperl-documentation

Welcome to ScrapeRL - an advanced Reinforcement Learning-powered web scraping environment. This documentation covers all aspects of using and configuring ScrapeRL.

---

## table-of-contents

1. [Getting Started](#getting-started)
2. [Dashboard Overview](#dashboard-overview)
3. [Agents](#agents)
4. [Plugins](#plugins)
5. [Memory System](#memory-system)
6. [Models & Providers](#models--providers)
7. [Settings](#settings)
8. [API Reference](#api-reference)
9. [Troubleshooting](#troubleshooting)

---

## getting-started

### what-is-scraperl

ScrapeRL is an intelligent web scraping system that uses Reinforcement Learning (RL) to learn and adapt scraping strategies. Unlike traditional scrapers, ScrapeRL can:

- **Learn from experience** - Improve scraping strategies over time
- **Adapt to changes** - Handle website structure changes automatically
- **Multi-agent coordination** - Use specialized agents for different tasks
- **Memory-enhanced** - Remember patterns and optimize future runs

### quick-start

1. **Enter a Target URL** - Provide the webpage you want to scrape
2. **Write an Instruction** - Describe what data you want to extract
3. **Configure Options** - Select model, agents, and plugins
4. **Start Episode** - Click Start and watch the magic happen!

### example-task

```
URL: https://example.com/products
Instruction: Extract all product names, prices, and descriptions
Task Type: Medium
```

---

## dashboard-overview

The dashboard is your command center for monitoring and controlling scraping operations.

### layout-structure

| Section | Description |
|---------|-------------|
| **Input Bar** | Enter URL, instruction, and configure task |
| **Left Sidebar** | View active agents, MCPs, skills, and tools |
| **Center Area** | Main visualization and current observation |
| **Right Sidebar** | Memory stats, extracted data, recent actions |
| **Bottom Logs** | Real-time terminal-style log output |

### stats-header

The header shows key metrics with expandable details:

- **Episodes** - Total scraping sessions completed
- **Steps** - Actions taken in current/total sessions
- **Reward** - Performance score (higher is better)
- **Time** - Current time and session duration

Click the **⋯** icon on any stat to see detailed statistics (min, max, average).

### task-configuration

#### task-types

| Type | Description | Use Case |
|------|-------------|----------|
|  **Low** | Simple single-page scraping | Product page, article text |
|  **Medium** | Multi-page with navigation | Search results, listings |
|  **High** | Complex interactive tasks | Login-required, forms |

---

## agents

ScrapeRL uses a multi-agent architecture where specialized agents handle different aspects of scraping.

### available-agents

| Agent | Role | Description |
|-------|------|-------------|
| **Coordinator** |  Orchestrator | Manages all other agents, decides strategy |
| **Scraper** |  Extractor | Extracts data from page content |
| **Navigator** |  Navigation | Handles page navigation, clicking, scrolling |
| **Analyzer** |  Analysis | Analyzes extracted data for patterns |
| **Validator** |  Validation | Validates data quality and completeness |

### agent-selection

1. Click the **Agents** button in the input bar
2. Select agents you want to enable
3. Active agents appear in the left sidebar accordion
4. Monitor agent activity in real-time

### agent-status-indicators

-  **Active** - Currently processing
-  **Ready** - Waiting for task
-  **Idle** - Not currently in use
-  **Error** - Encountered an issue

---

## plugins

Extend ScrapeRL's capabilities with plugins organized by category.

### plugin-categories

#### mcps-model-context-protocols

Tools that provide browser automation and page interaction:

| Plugin | Description |
|--------|-------------|
| Browser Use | AI-powered browser automation |
| Puppeteer MCP | Headless Chrome control |
| Playwright MCP | Cross-browser automation |

#### skills

Specialized capabilities for specific tasks:

| Plugin | Description |
|--------|-------------|
| Web Scraping | Core extraction algorithms |
| Data Extraction | Structured data parsing |
| Form Filling | Automated form completion |

#### apis

External service integrations:

| Plugin | Description |
|--------|-------------|
| Firecrawl | High-performance web crawler |
| Jina Reader | Content reader API |
| Serper | Search engine results API |

#### vision

Visual understanding capabilities:

| Plugin | Description |
|--------|-------------|
| GPT-4 Vision | OpenAI visual analysis |
| Gemini Vision | Google visual AI |
| Claude Vision | Anthropic visual models |

### managing-plugins

1. Go to **Plugins** tab
2. Browse by category
3. Click **Install** to add a plugin
4. Enable plugins in Dashboard via the Plugins popup

---

## memory-system

ScrapeRL uses a hierarchical memory system for context retention.

### memory-layers

| Layer | Purpose | Retention |
|-------|---------|-----------|
| **Working** | Current task context | Session |
| **Episodic** | Experience records | Persistent |
| **Semantic** | Learned patterns | Persistent |
| **Procedural** | Action sequences | Persistent |

### memory-features

- **Auto-consolidation** - Promotes important data between layers
- **Similarity search** - Find related memories quickly
- **Pattern recognition** - Learn from past experiences

---

## models-and-providers

### supported-providers

| Provider | Models | Best For |
|----------|--------|----------|
| **Groq** | GPT-OSS 120B | Fast inference, default |
| **Google** | Gemini 2.5 Flash | Balanced performance |
| **OpenAI** | GPT-4 Turbo | High accuracy |
| **Anthropic** | Claude 3 Opus | Complex reasoning |

### model-selection

1. Click **Model** button in input bar
2. Select from available models
3. Models require appropriate API keys

### api-keys

Configure API keys in **Settings > API Keys**:

1. Select provider
2. Enter your API key
3. Click Save
4. Key status shows as "Active" when configured

---

## settings

### general-settings

| Setting | Description |
|---------|-------------|
| WebSocket Updates | Enable real-time updates |
| Memory Persistence | Save memory across sessions |
| Auto-save Episodes | Automatically save completed episodes |
| Debug Mode | Enable verbose logging |

### budget-and-limits

Control API usage costs:

- **Daily Limit** - Maximum spend per day
- **Monthly Limit** - Maximum spend per month
- **Max Tokens** - Token limit per request
- **Alert Threshold** - Warning at 80% usage

>  Budget limits are disabled by default. Enable in Settings to control spending.

### appearance

- **Theme** - Dark (default), Light, Auto
- **Compact Mode** - Reduce UI spacing
- **Animations** - Enable/disable transitions

---

## api-reference

### health-check

```bash
GET /api/health
```

Response:
```json
{
  "status": "healthy",
  "version": "0.1.0",
  "timestamp": "2026-03-28T00:00:00Z"
}
```

### episode-management

```bash
# Start new episode
POST /api/episode/reset
{
  "task_id": "scrape-products",
  "config": { ... }
}

# Take action
POST /api/episode/step
{
  "action": "navigate",
  "params": { "url": "..." }
}

# Get current state
GET /api/episode/state
```

### memory-api

```bash
# Store entry
POST /api/memory/store
{
  "content": "...",
  "memory_type": "working",
  "metadata": { ... }
}

# Query memories
POST /api/memory/query
{
  "query": "product prices",
  "memory_type": "semantic",
  "limit": 10
}
```

### plugins-api

```bash
# List plugins
GET /api/plugins/

# Install plugin
POST /api/plugins/install
{ "plugin_id": "firecrawl" }

# Uninstall plugin
POST /api/plugins/uninstall
{ "plugin_id": "firecrawl" }
```

---

## troubleshooting

### common-issues

#### api-key-required-error

**Solution:** Configure at least one API key in Settings > API Keys

#### episode-not-starting

**Checklist:**
- [ ] Valid URL entered
- [ ] At least one agent selected
- [ ] API key configured
- [ ] System status shows "Online"

#### slow-performance

**Tips:**
- Use Groq for faster inference
- Reduce enabled plugins
- Lower task complexity if possible

#### memory-full

**Solution:** Clear memory layers in Settings > Advanced > Clear Cache

### getting-help

- Check the logs panel for error details
- View episode history for past issues
- Report bugs on GitHub

---

## keyboard-shortcuts

| Shortcut | Action |
|----------|--------|
| `Ctrl + Enter` | Start/Stop episode |
| `Ctrl + L` | Clear logs |
| `Ctrl + ,` | Open settings |
| `Escape` | Close popups |

---

## version-history

### v0-1-0-current

- Initial release
- Multi-agent architecture
- Plugin system
- Memory layers
- Dashboard with real-time monitoring

---

*Documentation last updated: March 2026*

*Built with  by NeerajCodz*

## document-flow

```mermaid
flowchart TD
    A[document] --> B[key-sections]
    B --> C[implementation]
    B --> D[operations]
    B --> E[validation]
```
## related-api-reference

| item | value |
| --- | --- |
| api-reference | `api-reference.md` |