Skip to main content

Overview

Kortix agents can search the internet, extract content from web pages, and gather current information beyond their training data. This capability enables agents to research topics, fact-check claims, gather news, and collect data from multiple online sources. Powered by Tavily for web search and Firecrawl for content extraction, this tool provides comprehensive web intelligence capabilities.

Core Functions

Searches the web for current information. Supports both single and batch queries.

Scrape Webpage

Fetches and converts web page content to clean markdown format.

Real-World Examples

Example 1: Current Events Research

Example 2: Multi-Topic Research (Batch Mode)

Example 3: Deep Content Extraction

Example 4: Image Search with OCR

Implementation Details

From the source code (web_search_tool.py:102-800):

Batch Search Performance

From web_search_tool.py:205-224:
Batch mode executes all queries in parallel, dramatically improving performance.

Image Enrichment with Vision AI

From web_search_tool.py:358-514:
Images are analyzed using the Moondream2 vision model to extract text and descriptions:

Web Scraping with Firecrawl

From web_search_tool.py:649-781:

Retry Logic for Reliability

From web_search_tool.py:683-712:

Search Results Format

Single Search Response

Batch Search Response

Scraped Content Format

Scraped pages are saved to /workspace/scrape/ as JSON:

Best Practices

1. Always Use Batch Mode

2. Include Current Year in Queries

3. Batch URL Scraping

4. Always Cite Sources

Critical Requirement: After answering a question using web search, MUST include a “Sources:” section with markdown links.

5. Don’t Override Browser-Extracted Data

When to Use Web Search vs Browser

Use Web Search

  • Finding information across multiple sources
  • Current events and news
  • Comparing multiple perspectives
  • Research questions
  • Fact-checking

Use Browser

  • Interacting with a specific website
  • Multi-step flows requiring clicks
  • Form submissions
  • Dynamic content requiring JavaScript
  • Visual inspection needed

Image Processing

If REPLICATE_API_TOKEN is configured, images are enriched with:
  • Dimensions: Width and height in pixels
  • OCR: Text visible in the image
  • Description: AI-generated description using Moondream2 vision model
Without the token, images include URL and dimensions only.

Configuration

Web intelligence requires:

Limitations

  • Web search limited to 50 results per query
  • Scraping timeout: 30 seconds per URL with 3 retries
  • Image enrichment requires REPLICATE_API_TOKEN
  • Some websites may block scraping
  • For GitHub URLs, prefer using gh CLI instead