Skip to main content
The --web-search flag enables native web search capabilities for supported LLM providers.

Quick Start

praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview

Usage

praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
Expected Output:
๐ŸŒ Web Search enabled

โ•ญโ”€ Agent Info โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  ๐Ÿ‘ค Agent: DirectAgent                                                       โ”‚
โ”‚  Role: Assistant                                                             โ”‚
โ”‚  Model: openai/gpt-4o-search-preview                                        โ”‚
โ”‚  Web Search: Enabled                                                         โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Response โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Based on today's news (December 2024):                                      โ”‚
โ”‚                                                                              โ”‚
โ”‚ 1. **OpenAI announces GPT-5 preview** - New capabilities include...         โ”‚
โ”‚ 2. **Google releases Gemini 2.0** - Enhanced multimodal features...         โ”‚
โ”‚ 3. **Anthropic updates Claude** - Improved reasoning and...                 โ”‚
โ”‚                                                                              โ”‚
โ”‚ Sources: [1] techcrunch.com [2] theverge.com [3] wired.com                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Combine with Other Flags

# Web search with metrics
praisonai "Latest stock market news" --web-search --metrics --llm openai/gpt-4o-search-preview

# Web search with save
praisonai "Current weather in Tokyo" --web-search --save --llm openai/gpt-4o-search-preview

Supported Providers

ProviderModelsNotes
OpenAIgpt-4o-search-previewNative search integration
Geminigemini-pro, gemini-ultraGoogle Search integration
Anthropicclaude-sonnet-4-20250514, claude-3-opusWeb search tool
xAIgrok-2Real-time web access
Perplexitypplx-7b-online, pplx-70b-onlineBuilt-in search

How It Works

  1. Enable: The --web-search flag activates providerโ€™s native search
  2. Query: Your prompt is sent with web search capability
  3. Search: Provider searches the web for relevant information
  4. Synthesize: Results are synthesized into a coherent response
  5. Cite: Sources are included when available

Examples

News Query

praisonai "What happened in tech news this week?" \
  --web-search --llm openai/gpt-4o-search-preview

Research Query

praisonai "Latest research on quantum computing" \
  --web-search --llm openai/gpt-4o-search-preview

Real-time Data

praisonai "Current Bitcoin price and market analysis" \
  --web-search --llm openai/gpt-4o-search-preview

Programmatic Usage

from praisonaiagents import Agent

agent = Agent(
    instructions="You are a research assistant",
    llm="openai/gpt-4o-search-preview",
    web_search=True
)

result = agent.start("What are the latest AI news today?")
print(result)

Comparison with Other Options

Feature--web-searchDeep ResearchTools
SpeedFastSlowMedium
DepthSurfaceDeepConfigurable
SourcesFewManyDepends
ProviderLimitedOpenAI/GeminiAny

Best Practices

Use --web-search for quick, real-time information. For in-depth research, use praisonai research instead.
Web search availability depends on the provider and model. Not all models support native web search.
DoDonโ€™t
Use for current eventsUse for historical analysis
Use for quick lookupsUse for deep research
Specify time contextAssume recency
Check provider supportAssume all models work