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
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.
| Requirement | Value |
|---|
| Provider | Anthropic only |
| Models | claude-sonnet-4-20250514, claude-3-opus, claude-3-sonnet, claude-3-haiku |
| API Key | ANTHROPIC_API_KEY environment variable |
How It Works
- Enable: The
--web-fetch flag activates Anthropicโs URL fetching
- Fetch: Claude fetches the content from the specified URL
- Parse: Content is parsed and cleaned
- Analyze: Claude analyzes the content based on your prompt
- Respond: Synthesized response is returned
Use Cases
Summarization
praisonai "Summarize this article: https://example.com/article" \
--web-fetch --llm anthropic/claude-sonnet-4-20250514
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_fetch=True
)
result = agent.start("Summarize https://docs.praison.ai")
print(result)
Comparison with Web Search
| Feature | Web Fetch | Web Search |
|---|
| Purpose | Fetch specific URL | Search the web |
| Input | URL required | Query |
| Depth | Full page content | Search snippets |
| Provider | Anthropic only | Multiple |
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.
| Do | Donโt |
|---|
| Use for specific URLs | Use for general search |
| Check URL accessibility | Assume all sites work |
| Use for content analysis | Use for real-time data |
| Combine with save for long content | Rely on terminal output |