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

# Web

> Browse and interact with websites

Agents can browse the web - search, read pages, and extract information.

> [!WARNING]
>
> `web` is accepted on a `Task` for Python-SDK parity but is **not yet implemented** in the TypeScript SDK — passing it emits a `[praisonai] … not yet honoured` notice and has no effect. This feature is Python-only for now.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "Web Browsing"
        A[👤 User] --> B[🤖 Agent]
        B --> C[🌐 Web]
        C --> D[📝 Content]
    end

    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

    class B agent
    class A,C,D tool
```

## Quick Start

**1. Simple Usage**

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { Agent } from 'praisonai';

const agent = new Agent({
  instructions: 'You research topics online',
  tools: ['web_search']
});

await agent.chat('What are the latest AI developments?');
// Agent searches and summarizes findings
```

**2. With Configuration**

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
const agent = new Agent({
  tools: ['web_search', 'read_url']
});

await agent.chat('Summarize the article at example.com/news');
// Agent reads and summarizes the page
```

***

## User Interaction Flow

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant Agent
    participant Web
    
    User->>Agent: "Research AI trends"
    Agent->>Web: Search query
    Web-->>Agent: Search results
    Agent->>Web: Read top articles
    Web-->>Agent: Page content
    Agent-->>User: Summary of findings
```

***

## Configuration Levels

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
// Level 1: Array - Enable web tools
const agent = new Agent({
  tools: ['web_search']
});

// Level 2: String - Specify provider
const agent = new Agent({
  tools: ['web_search'],
  searchProvider: 'google'  // or 'bing', 'duckduckgo'
});

// Level 3: Dict - Full options
const agent = new Agent({
  web: {
    search: true,
    browse: true,
    maxResults: 10,
    timeout: 30000,
    allowedDomains: ['*.wikipedia.org', '*.github.com']
  }
});
```

***

## Web Tools

| Tool | Description |
| - | - |
| `web_search` | Search the internet |
| `read_url` | Read a specific webpage |
| `browse` | Navigate and interact |
| `screenshot` | Capture page images |

***

## API Reference

> [card] [WebConfig](https://praison.ai/docs/sdk/reference/typescript/classes/WebConfig.md)
>
> Web configuration options

***

## Best Practices

> [accordion] Limit search results
>
> 10 results is usually enough - more adds noise.

> [accordion] Set timeouts
>
> Slow pages shouldn't block the agent forever.

> [accordion] Filter domains
>
> Restrict to trusted domains when possible.

***

## Related

> [card] [Tools](https://praison.ai/docs/js/tools.md)
>
> Agent tools

> [card] [Knowledge](https://praison.ai/docs/js/knowledge-base.md)
>
> Knowledge base


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.