Skip to main content
The --web-fetch flag enables URL content retrieval and analysis using Anthropic’s native web fetch capability.

Quick Start

praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
Web Fetch Demo

Usage

Basic Web Fetch

praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
Expected Output:
📥 Web Fetch enabled

╭─ Agent Info ─────────────────────────────────────────────────────────────────╮
│  👤 Agent: DirectAgent                                                       │
│  Role: Assistant                                                             │
│  Model: anthropic/claude-sonnet-4-20250514                                          │
│  Web Fetch: Enabled                                                          │
╰──────────────────────────────────────────────────────────────────────────────╯

╭─ Fetching URL ───────────────────────────────────────────────────────────────╮
│  🔗 https://docs.praison.ai                                                  │
╰──────────────────────────────────────────────────────────────────────────────╯

╭────────────────────────────────── Response ──────────────────────────────────╮
│ # Summary of PraisonAI Documentation                                        │
│                                                                              │
│ PraisonAI is a production-ready Multi-AI Agents framework with:             │
│ - Self-reflection capabilities                                              │
│ - Integration with CrewAI and AutoGen                                       │
│ - Low-code solution for multi-agent systems                                 │
│ ...                                                                          │
╰──────────────────────────────────────────────────────────────────────────────╯

Combine with Other Flags

# Web fetch with save
praisonai "Analyze https://example.com/article" --web-fetch --save --llm anthropic/claude-sonnet-4-20250514

# Web fetch with metrics
praisonai "Extract data from https://api.example.com" --web-fetch --metrics --llm anthropic/claude-sonnet-4-20250514

Requirements

Web Fetch is only available with Anthropic models. It will not work with other providers.
RequirementValue
ProviderAnthropic only
Modelsclaude-sonnet-4-20250514, claude-3-opus, claude-3-sonnet, claude-3-haiku
API KeyANTHROPIC_API_KEY environment variable

How It Works

  1. Enable: The --web-fetch flag activates Anthropic’s URL fetching
  2. Fetch: Claude fetches the content from the specified URL
  3. Parse: Content is parsed and cleaned
  4. Analyze: Claude analyzes the content based on your prompt
  5. Respond: Synthesized response is returned

Use Cases

Summarization

praisonai "Summarize this article: https://example.com/article" \
  --web-fetch --llm anthropic/claude-sonnet-4-20250514

Data Extraction

praisonai "Extract all product prices from https://example.com/products" \
  --web-fetch --llm anthropic/claude-sonnet-4-20250514

Content Analysis

praisonai "Analyze the sentiment of https://example.com/review" \
  --web-fetch --llm anthropic/claude-sonnet-4-20250514

Documentation Review

praisonai "Review the API documentation at https://api.example.com/docs" \
  --web-fetch --llm anthropic/claude-sonnet-4-20250514

Programmatic Usage

from praisonaiagents import Agent

agent = Agent(
    instructions="You are a content analyzer",
    llm="anthropic/claude-sonnet-4-20250514",
    web=True
)

result = agent.start("Summarize https://docs.praison.ai")
print(result)
FeatureWeb FetchWeb Search
PurposeFetch specific URLSearch the web
InputURL requiredQuery
DepthFull page contentSearch snippets
ProviderAnthropic onlyMultiple

Best Practices

Use Web Fetch when you have a specific URL to analyze. Use Web Search when you need to find information.
Some websites may block automated fetching. Results may vary based on site accessibility.
DoDon’t
Use for specific URLsUse for general search
Check URL accessibilityAssume all sites work
Use for content analysisUse for real-time data
Combine with save for long contentRely on terminal output