Skip to main content
Agents can browse the web - search, read pages, and extract information.

Quick Start

1

Search the Web

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

Read Web Pages

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


Configuration Levels

// 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

ToolDescription
web_searchSearch the internet
read_urlRead a specific webpage
browseNavigate and interact
screenshotCapture page images

API Reference

WebConfig

Web configuration options

Best Practices

10 results is usually enough - more adds noise.
Slow pages shouldn’t block the agent forever.
Restrict to trusted domains when possible.