> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mypraxos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Browsing

> AI-powered web browsing and information extraction

## Overview

Praxos provides two levels of web browsing capabilities: simple HTML reading for static sites and AI-powered browsing for JavaScript-heavy dynamic sites.

## Simple Web Reading

### read\_webpage\_content

Fast, efficient reading of static HTML pages.

**Use Cases:**

* News articles
* Blog posts
* Documentation pages
* Simple product pages
* Any content-first website

**Example:**

```
User: What's on the Python documentation homepage?
Praxos: Let me check the Python docs...

[2-3 seconds later]

The Python documentation homepage features:
- Getting Started guide
- Tutorial for beginners
- Library Reference
- Language Reference
- Python Setup and Usage guides
```

**Characteristics:**

* Speed: 2-5 seconds
* Cost: Minimal (no LLM calls)
* JavaScript: Not supported
* Interaction: Read-only

## AI-Powered Browsing

### browse\_website\_with\_ai

Intelligent browser automation using Playwright and AI.

**Use Cases:**

* JavaScript-rendered content
* Dynamic web applications
* Form submissions
* Multi-step navigation
* Complex site interactions
* Content behind interactions

**Example:**

```
User: Search for "wireless headphones under $100" on Amazon
       and tell me the top results

Praxos: I'm browsing Amazon now, this will take about 30 seconds...

[30-60 seconds later]

Top wireless headphones under $100 on Amazon:
1. Anker Soundcore Q20 - $59.99
   - 40hr battery, active noise cancellation
   - Rating: 4.5/5 (12,483 reviews)

2. JBL Tune 510BT - $29.95
   - Lightweight, 40hr battery
   - Rating: 4.4/5 (8,291 reviews)

3. Sony WH-CH510 - $38.00
   - 35hr battery, quick charge
   - Rating: 4.3/5 (15,673 reviews)
```

**Characteristics:**

* Speed: 30-60 seconds
* Cost: \~\$0.01-0.05 per task
* JavaScript: Full support
* Interaction: Clicks, forms, navigation

## How AI Browsing Works

```mermaid theme={null}
graph TB
    A[User Request] --> B[Praxos sends<br/>intermediate message]
    B --> C[Launch Playwright<br/>Browser]
    C --> D[Navigate to URL]
    D --> E[AI Analyzes Page]
    E --> F{Task Complete?}
    F -->|No| G[Execute Action]
    G --> H[Wait for Response]
    H --> E
    F -->|Yes| I[Extract Information]
    I --> J[Format Response]
    J --> K[Send to User]
```

## User Experience Pattern

<Note>
  Praxos ALWAYS sends an intermediate message before starting AI browsing to set expectations.
</Note>

**Flow:**

1. User makes request involving browsing
2. Praxos: "I'm browsing that website now, about 30 seconds..."
3. \[Browser automation happens]
4. Praxos: \[Final response with information]

This ensures users know the operation will take time.

## Capabilities

### Navigation

* **Load pages** - Go to any URL
* **Click links** - Follow links and buttons
* **Form submission** - Fill forms and submit
* **Scrolling** - Scroll to load more content
* **Back/Forward** - Navigate history

### Interaction

* **Input fields** - Type into text boxes
* **Dropdowns** - Select from menus
* **Checkboxes** - Toggle options
* **Buttons** - Click any clickable element
* **Hover** - Trigger hover effects

### Data Extraction

* **Text content** - Extract visible text
* **Structured data** - Parse tables, lists
* **Metadata** - Titles, descriptions, prices
* **Images** - Alt text and descriptions
* **Links** - Extract URLs

### Multi-Step Tasks

```
User: Go to product page, add to cart,
      and tell me the total price

Praxos: I'll browse that site now, about 45 seconds...

[Steps executed:]
1. Navigate to product page
2. Click "Add to Cart"
3. Go to cart
4. Extract total price

Result: Total price with this item is $127.49
```

## Configuration

### Tool Parameters

```python theme={null}
browse_website_with_ai(
    url: str,              # Target URL
    task: str,             # Natural language task
    max_steps: int = 10    # Maximum browser actions
)
```

### Environment Setup

```bash theme={null}
# Playwright installation required
playwright install

# Or in Docker (already included)
FROM mcr.microsoft.com/playwright/python:v1.55.0-noble
```

### Resource Requirements

* Memory: \~200-500MB per execution
* CPU: Moderate usage
* Network: Required
* Time: 30-60 seconds average

## Comparison

| Feature           | read\_webpage\_content | browse\_website\_with\_ai |
| ----------------- | ---------------------- | ------------------------- |
| Speed             | 2-5 seconds            | 30-60 seconds             |
| JavaScript        | ❌ No                   | ✅ Yes                     |
| Forms/Interaction | ❌ No                   | ✅ Yes                     |
| Multi-page        | ❌ No                   | ✅ Yes                     |
| Cost              | Free                   | \~\$0.01-0.05             |
| User notification | Not needed             | Required                  |
| Use case          | Static sites           | Dynamic sites             |

## Best Practices

### When to Use Simple Reading

* Static content sites
* Speed is priority
* No interaction needed
* Content loads without JavaScript

### When to Use AI Browsing

* JavaScript-rendered content
* Need to interact with forms
* Multi-step navigation required
* Content behind clicks/scrolls

### Task Descriptions

Write clear, specific tasks:

**Good:**

```
"Search for 'laptop' and extract the top 5 results with prices"
"Fill the contact form with name 'John', email 'john@example.com', and submit"
"Navigate to pricing page and extract all plan details"
```

**Too Vague:**

```
"Get information from the site"
"Look around"
"Find stuff"
```

## Limitations

### Website Restrictions

Some sites block automation:

* CAPTCHAs
* Bot detection systems
* Rate limiting
* Cloudflare protection

### Performance

* Not suitable for real-time needs
* Resource intensive
* May timeout on very slow sites

### Accuracy

* AI may misinterpret complex layouts
* Depends on clear task descriptions
* May need multiple attempts

## Troubleshooting

### Browser Timeout

**Problem:** Task takes too long

**Solutions:**

* Increase `max_steps` parameter
* Simplify the task
* Try a more specific URL
* Check site isn't blocking automation

### Playwright Not Found

**Problem:** `playwright` executable not found

**Solution:**

```bash theme={null}
playwright install
```

### Memory Issues

**Problem:** Out of memory errors

**Solutions:**

* Increase pod/container memory
* Limit concurrent browsing tasks
* Use simple reading when possible

### Navigation Failures

**Problem:** Can't find elements or navigate

**Solutions:**

* Check URL is correct
* Verify site structure hasn't changed
* Try more specific task description
* Check site isn't behind login

## Advanced Usage

### Screenshots (Future)

Vision model integration for:

* Visual verification
* Layout understanding
* Image-based navigation

### Session Persistence (Future)

Maintain browser sessions:

* Stay logged in
* Persist cookies
* Continue from previous state

### Parallel Browsing (Future)

Multiple browser instances:

* Research across sites
* Price comparisons
* Data aggregation

## Security

### Privacy

* Each user gets isolated browser
* No session sharing
* Cookies cleared after task
* No tracking

### Safety

* No credential storage in browser
* HTTPS enforced where possible
* No arbitrary code execution
* Sandboxed environment

## Next Steps

<CardGroup cols={2}>
  <Card title="Calendar Tools" href="/guides/calendar" />

  <Card title="Email Tools" href="/guides/email" />

  <Card title="File Management" href="/guides/file-management" />

  <Card title="Tools Overview" href="/guides/tools-overview" />
</CardGroup>
