Web Search Agent

Enable web search capabilities to retrieve real-time information from the internet

Overview

The Web Search Agent allows your AI assistant to search the internet for real-time information, current events, and up-to-date data. It supports multiple search backends including Tavily, Google, and DuckDuckGo.


Prerequisites

Before you begin, make sure you have:

  • Tavily API Key (recommended) - Sign up at tavily.com
  • Or Google Custom Search API credentials (optional alternative)

Supported Search Backends

  • Best for: AI-optimized search results
  • Features: Structured data, fast responses, designed for LLMs
  • Cost: Free tier available, paid plans for higher volume
  • Setup: Requires API key
  • Best for: Comprehensive web coverage
  • Features: Access to Google's search index
  • Cost: Free tier with limits, paid for higher volume
  • Setup: Requires API key and Search Engine ID

DuckDuckGo

  • Best for: Privacy-focused search
  • Features: No tracking, no API key required
  • Cost: Free
  • Setup: Works out of the box
  • Limitations: Rate limited, slower responses

Step 1: Get a Tavily API Key

  1. Go to tavily.com and sign up for an account
  2. Navigate to your dashboard
  3. Click Create API Key
  4. Copy the API key - you'll need it in the next step

Tavily offers a free tier with 1,000 requests per month, perfect for testing.


Step 2: Enable the Web Search Agent

  1. Open Junet and navigate to the chat interface
  2. Click on the Agent Settings icon (puzzle piece) in the top navigation
  3. Find Web Search in the list of available agents
  4. Toggle the switch to Enabled

Step 3: Add a Web Search Connection

  1. In the Web Search Agent settings, click Add Connection
  2. Fill in the connection details:

Connection Name

Enter a descriptive name for this connection (e.g., "Tavily Web Search" or "Main Search")

This name appears in chat results when the agent cites sources.

Description (Optional)

Add a description to help users understand what this connection is for (e.g., "Primary web search using Tavily for real-time information")


Step 4: Configure Search Backend

Default Search Backend

Select your preferred search provider:

  • Tavily - Recommended for best AI results
  • Google - For comprehensive search coverage
  • DuckDuckGo - For privacy-focused searches

Tavily Search API Key

If you selected Tavily:

  1. Paste your Tavily API key from Step 1
  2. Leave blank if using Google or DuckDuckGo

Tavily Search Depth

Choose the search depth:

  • basic - Faster, fewer sources (recommended for most use cases)
  • advanced - More thorough, slower, more sources

Tavily Max Results

Set the maximum number of search results to retrieve (1-20):

  • 5-10 - Recommended for balanced performance
  • 15-20 - For comprehensive research queries
  • 1-5 - For quick lookups

Higher result counts consume more API quota and may slow down responses.


Step 5: Configure User Groups (Optional)

If you want to restrict access to specific user groups:

  1. Click the User Groups dropdown
  2. Select one or more groups that should have access to web search
  3. Leave empty to allow all users

Step 6: Configuration Options

Set as Default

Enable this option if you want this connection to be used by default when multiple web search connections exist.

Enabled

Make sure this toggle is ON to activate the connection.


Step 7: Save and Test

  1. Click Create Connection
  2. The connection will be validated automatically
  3. If successful, you'll see a confirmation message
  4. The connection now appears in the list with status Enabled

Using the Web Search Agent

Once configured, you can ask questions that require current information:

  • "What's the latest news about artificial intelligence?"
  • "What's the current weather in New York?"
  • "Find recent research papers on quantum computing"
  • "What are today's stock market trends?"
  • "Search for tutorials on React 19"
  • "What happened in the world today?"

The agent will automatically search the web and cite its sources.


Managing Multiple Connections

You can add multiple web search connections with different backends:

  1. Click Add Connection again
  2. Configure a different search backend (e.g., DuckDuckGo as backup)
  3. Use Set as Default to choose which connection is primary
  4. The agent will indicate which connection was used for each query

Best Practices

Optimize Search Settings

  • Use basic depth for general queries
  • Reserve advanced depth for research tasks
  • Keep max results between 5-10 for best performance
  • Test different backends for your use case

Manage API Costs

  • Monitor your Tavily usage in the dashboard
  • Set appropriate max result limits
  • Use DuckDuckGo as a free fallback option
  • Disable web search for user groups that don't need it

Security

  • Never share your Tavily API key
  • Rotate API keys periodically (every 90 days)
  • Use separate keys for development and production
  • Monitor usage for unusual patterns

Search Backend Comparison

FeatureTavilyGoogleDuckDuckGo
API Key RequiredYesYesNo
CostFree tier + paidFree tier + paidFree
SpeedFastFastModerate
AI-Optimized✅ Yes❌ No❌ No
Result QualityExcellentExcellentGood
PrivacyGoodModerateExcellent
Rate LimitsGenerousStrictModerate
Best ForAI applicationsComprehensive searchPrivacy-focused

Advanced Configuration

Multiple Backends for Reliability

Create connections for each backend:

  1. Primary: Tavily (for best results)
  2. Backup: Google (for comprehensive coverage)
  3. Fallback: DuckDuckGo (always available, no key needed)

The system can automatically failover if the primary backend is unavailable.

Customizing Search Depth

Basic Depth:

  • Faster responses (1-2 seconds)
  • 3-5 sources per query
  • Good for quick facts

Advanced Depth:

  • Slower responses (3-5 seconds)
  • 10-15 sources per query
  • Better for research and analysis

Updating a Connection

To modify an existing connection:

  1. Click the Edit icon next to the connection
  2. Update any fields (name, API key, settings, etc.)
  3. Click Save
  4. The connection will be re-validated

Deleting a Connection

To remove a connection:

  1. Click the Delete icon next to the connection
  2. Confirm the deletion
  3. The connection and its configuration are permanently removed

Deleting a connection cannot be undone. You'll need to reconfigure from scratch.

Web Search Agent | Junet.io Documentation