Skip to content

Search Tools ​

Search Tools provides AI characters with web search capabilities, allowing characters to retrieve real-time information during conversations and inject search results into the context. The search plugin supports multiple search engine backends and provides working modes to accommodate different use cases.

Working Modes ​

d2 Diagram

Tool Mode ​

Search functionality is registered as callable tools for the creative LLM in the Function Call Runtime, covering web search, page reading, image search, and webpage image extraction. When the AI determines it needs external information or visual references, it initiates a tool call and receives the results directly in context.

Pre-request Agent Mode ​

Before the creative LLM generates a response, an independent search Agent runs automatically. The Agent analyzes the current conversation content, determines whether a search is needed, and writes search results into World Info entries.

  • Enabled via Run pre-request search agent
  • Uses its own prompt preset and API connection, separate from the creative model
  • Runs a tool-call loop until it replies with plain text and no tool calls
  • Reads back, updates, and deletes the entries it created so existing notes are revised cleanly
  • Writes search results as World Info entries for the creative LLM to read during generation
  • Streams live progress into the shared Run panel dock (opened automatically by default, or toggled in the dock menu with Open automatically on run)

Pre-request search agent run in the run panel

Choosing Between Modes

Tool Mode fits scenarios where the model decides on its own when to search during conversation—for example, when a user asks about recent news.

Pre-request Agent Mode searches automatically before AI generation, keeping the search pass separate from the main conversation.

Settings Panel ​

Search Tools configuration lives under Extensions → Search Tools:

Search Tools settings panel

The top toggles map to the two modes (Expose tools to main model = Tool Mode, Run pre-request search agent = Pre-request Agent Mode); they can be enabled independently or together. Below them are engine selection, agent presets, and World Info entry injection parameters. Click Show search run panel to open the shared Run panel dock on demand.

Supported Search Engines ​

Search EngineDescriptionConfiguration Requirements
DuckDuckGoDefault search engine, no API key requiredWorks out of the box
SearXNGSelf-hosted meta search engineRequires self-hosted instance URL
Brave SearchSearch API provided by BraveRequires API key
TavilyLLM-oriented search APIRequires API key
ExaNeural / semantic search APIRequires API key
SerperGoogle results via serper.devRequires API key
SerpApiGoogle results via SerpApiRequires API key
Z.AIZ.AI web searchRequires API key
DeepSeekDeepSeek native web searchRequires DeepSeek API key

Safe search is available for DuckDuckGo, SearXNG, Brave Search, Tavily, Exa, and SerpApi.

Image Search and Webpage Image Extraction ​

DuckDuckGo, SearXNG, Brave Search, Tavily, Serper, and SerpApi support structured image search returning full-size image URLs, thumbnails, titles, source page URLs, and dimensions. Text-only engines such as Exa, Z.AI, and DeepSeek return an explicit unsupported error when image search is requested.

Webpage image extraction parses og:image, twitter:image, and content <img> candidates from a public URL while filtering tracking pixels and tiny icons.

World Info Entry Management ​

In Pre-request Agent Mode, search results are created as World Info entries. You can configure Injection position, Injection depth, Injection role, and Injection order directly in the Search Tools panel, and inspect or clear stored entries via Manage stored search entries.

Use from other features ​

Search is also available to Image Generation character exploration, Workbench AI iteration, CardApp Studio, and the Character Editor Assistant popup, allowing agents to look up text and reference images online. The developer interface is documented in the Extension API.

Result Reuse ​

Search Tools reuses the previous search Agent result when all of the following match:

  1. The current chat matches the previous snapshot's chat
  2. The last user message matches the previous snapshot
  3. The current generation type supports reuse (such as regenerate or continue)

When results are reused, the Run panel marks the run as reused.

Impact of Message Operations ​

The plugin keeps the shared lorebook aligned with stored search results as the chat changes:

  • Deleting a message — search results for the deleted turn and every later turn are dropped
  • Swiping a message — search results for the swiped turn are dropped
  • Editing a message — stored results stay; editing the turn a search ran for triggers a fresh search on the next generation

Configuration Reference ​

SettingDescription
Expose tools to main modelEnable Tool Mode, allowing the model to call web search during conversation
Run pre-request search agentEnable Pre-request Agent Mode, searching automatically before generation
Search providerSelect the search engine
Default max search resultsNumber of results returned per search
Default page excerpt max charsMaximum text length extracted when visiting web pages (0 = full extract)
Safe SearchSafety filtering level for search results
Agent API presetAPI connection preset for the pre-request Agent (empty uses main connection)
Agent presetGeneration preset for the pre-request Agent; defaults to Default (Built-in plugin-only), with options for Follow active main preset or a user preset. Below the dropdown, View built-in plugin-only opens the read-only viewer and Derive from an existing preset opens the preset workspace with Built-in · plugin-only as the reference

Related Pages

Built upon SillyTavern