mirror of
https://github.com/lobehub/lobehub.git
synced 2026-09-20 04:56:13 +08:00
191f3fe776
* 📝 docs: fix outdated content across the docs site Audited docs/ against the current codebase and fixed stale content that drifted after major refactors (Clerk/NextAuth → Better Auth, src/server → apps/server, src/{config,envs,locales} → packages/*, model-bank updates). - self-hosting/auth: mark removed NextAuth/Clerk pages with deprecation warnings; fix microsoft/zitadel alias claims and the Logto callback path - environment-variables & advanced: correct wrong defaults (S3_SET_ACL, AI_IMAGE_DEFAULT_IMAGE_NUM, index/proxy URLs), drop non-existent env vars and fictional feature flags, fix OIDC config guidance - development: update refactored paths, Better Auth, .mjs configs, remove the MSW section (msw is not a dependency) - providers & model examples: replace retired model ids with in-bank ones; fix comfyui frontmatter corruption - usage: rename Moderator→Orchestrator, GTD→Task, correct shortcut keys, channel capability tables, Feishu/Lark WebSocket mode - platform/migration: fix dead links, docker service name, npx/npm → bun EN and zh-CN pairs updated together. * 📝 docs: fix Logto callback path and AUTH_SECRET deprecation guidance - Revert Logto/Sealos callback URLs to /api/auth/callback/logto to match the runtime SSO redirectURI override - Narrow legacy auth Callout: AUTH_SECRET remains required for Better Auth; mark NEXT_AUTH_SECRET as deprecated in zh-CN * 📝 docs: refresh agent skills for locales, env, auth, and agentRun paths Align OSS agent guidance with post-refactor layout: - packages/locales/src/default + bun run i18n - packages/env/src for env schemas (@/envs alias) - spa-auth shell + src/routes/auth segments - chat agentRun/transports/hetero instead of aiChat * 📝 docs: document APP_URL as required for Better Auth base URL Self-hosted auth uses appEnv.APP_URL as baseURL, not request-header auto-detection. NEXT_PUBLIC_AUTH_URL remains deprecated. * 📝 docs: note self-host search provider setup for web search Built-in lobe-web-browsing needs no client plugin, but self-hosted servers still require SEARCH_PROVIDERS / SEARXNG_URL (default SearXNG). * 📝 docs: point feature guide welcome UI at AgentHome Opening message/questions on the agent chat page live in src/features/AgentHome, not Onboarding WelcomeMessage.
230 lines
8.8 KiB
Plaintext
230 lines
8.8 KiB
Plaintext
---
|
|
title: Web Search
|
|
description: >-
|
|
Agents search the internet for real-time information — with source citations
|
|
and grounding.
|
|
tags:
|
|
- LobeHub
|
|
- Web Search
|
|
- Real-time Information
|
|
- Citations
|
|
- Grounding
|
|
---
|
|
|
|
# Web Search
|
|
|
|
LobeHub's web search integration lets Agents access current information from the internet — real-time news, prices, documentation, and facts beyond their training cutoff. When web search is active, the Agent retrieves up-to-date answers and cites the sources it used.
|
|
|
|
## What Web Search Enables
|
|
|
|
With web search enabled, Agents can:
|
|
|
|
- Access real-time information — current news, prices, and events
|
|
- Verify information against the latest sources
|
|
- Cite the web pages they consulted
|
|
- Research topics from multiple sources simultaneously
|
|
- Answer questions about recent events outside their training data
|
|
|
|
## How It Works
|
|
|
|
When you ask a question that requires current information:
|
|
|
|
1. The AI generates optimized search queries from your question
|
|
2. Searches are performed across the internet
|
|
3. Relevant sources are retrieved and analyzed
|
|
4. The AI synthesizes findings into a response
|
|
5. The response includes source citations
|
|
|
|
This happens automatically when the AI determines web search would be helpful, or on-demand when you explicitly request it.
|
|
|
|
## Search Grounding Display
|
|
|
|
When web search is used, a **search grounding** section appears above the AI's response as a collapsible card showing:
|
|
|
|
- **Source count** — How many web sources were consulted
|
|
- **Favicon preview** — Icons from source websites
|
|
- **Expandable search queries** — The exact queries the AI used (click to expand)
|
|
- **Citations** — Source titles, domains, and URLs you can click to visit
|
|
|
|
Expand the grounding card to see exactly where the information came from and evaluate source credibility.
|
|
|
|
## Enabling Web Search
|
|
|
|
Web search ships as a native built-in tool (`lobe-web-browsing`) — there's nothing to install. Turn it on per Agent with one click:
|
|
|
|
Open the Agent's **Profile**, click **+ Add Skill**, and enable **Web Search**. That's it — the Agent can now search the web automatically when a question needs current information, or on your explicit request.
|
|
|
|
<Callout type={'info'}>
|
|
Built-in Web Search does not need a marketplace plugin or MCP install on the client. **Self-hosted
|
|
deployments** still need a server search provider configured (default is SearXNG via
|
|
`SEARXNG_URL` / `SEARCH_PROVIDERS`) — see [Online Search](/docs/self-hosting/advanced/online-search).
|
|
Managed LobeHub Cloud already has this wired for you.
|
|
</Callout>
|
|
|
|
### Optional: MCP-Based Search Tools
|
|
|
|
If you want a specific search backend (Brave Search, Google Search, DuckDuckGo, etc.) or more control over the search implementation, you can alternatively connect a search MCP server in your MCP settings. This is optional — most use cases are already covered by the built-in Web Search Skill above.
|
|
|
|
## Using Web Search
|
|
|
|
### Automatic Search
|
|
|
|
Web search activates automatically for questions that clearly require current data:
|
|
|
|
```
|
|
"What's the current price of Bitcoin?"
|
|
"Who won the World Cup in 2024?"
|
|
"What are the latest developments in AI?"
|
|
```
|
|
|
|
### Explicit Search Requests
|
|
|
|
You can also explicitly request a web search:
|
|
|
|
```
|
|
"Search the web for recent reviews of the iPhone 15"
|
|
"Look up the latest research on climate change"
|
|
"Find current mortgage rates in California"
|
|
```
|
|
|
|
### Follow-Up Searches
|
|
|
|
Each search builds on the conversation context. Chain searches to go deeper:
|
|
|
|
```
|
|
"What are the top programming languages in 2024?"
|
|
→ "Search for job market trends for Python developers"
|
|
→ "Find salary data for senior Python engineers in Europe"
|
|
```
|
|
|
|
## Search Quality
|
|
|
|
### Optimized Queries
|
|
|
|
The AI generates optimized search queries tailored to your question, including adding time context, using precise terminology, and breaking complex questions into multiple targeted searches.
|
|
|
|
### Source Selection
|
|
|
|
Results are ranked by relevance, authority, and recency. The AI considers whether sources are authoritative (news outlets, official docs, academic papers) vs. informal (blogs, forum posts).
|
|
|
|
### Information Synthesis
|
|
|
|
The AI synthesizes findings from multiple sources into a coherent response, noting when sources agree or disagree, and flagging any uncertainty.
|
|
|
|
## Use Cases
|
|
|
|
<Tabs>
|
|
<Tab title="Research & News">
|
|
- Get current information on news, markets, finance, and academic topics
|
|
- "Latest news on \[subject]"
|
|
- "Recent papers on \[topic]"
|
|
- "Current stock price of X"
|
|
</Tab>
|
|
|
|
<Tab title="Technical Information">
|
|
- Access up-to-date docs, API changes, package releases, and bug fix discussions
|
|
- "What's new in React 19?"
|
|
- "Find solutions to \[specific error]"
|
|
- Especially useful for fast-moving frameworks where training data may be outdated
|
|
</Tab>
|
|
|
|
<Tab title="Product Research">
|
|
- Compare current prices, find recent reviews, and identify alternatives
|
|
- "Compare the latest MacBook models"
|
|
- "Reviews for noise-cancelling headphones under $200"
|
|
</Tab>
|
|
|
|
<Tab title="Planning">
|
|
- Get real-world current data for travel, events, and local recommendations
|
|
- "Best restaurants in Austin right now"
|
|
- "Current museum exhibits in Paris"
|
|
- "Tech conferences in 2025"
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
## Understanding Citations
|
|
|
|
Every web search response includes citations. Check them:
|
|
|
|
- **Source title** — The page or article name
|
|
- **Domain** — The website hosting the information
|
|
- **URL** — Click to visit the original source
|
|
- **Relevance snippet** — Preview of the relevant content used
|
|
|
|
### Citation Verification
|
|
|
|
<AccordionGroup>
|
|
<Accordion title="Check Publication Dates">
|
|
For time-sensitive topics, verify the publication date. A result from two years ago may be outdated for rapidly evolving subjects.
|
|
</Accordion>
|
|
|
|
<Accordion title="Evaluate Source Authority">
|
|
Consider whether sources are authoritative (news outlet, official docs, academic paper) vs. informal (blog, forum post). Weight your trust accordingly.
|
|
</Accordion>
|
|
|
|
<Accordion title="Cross-Reference Key Facts">
|
|
For critical information, check that multiple sources agree. If only one source makes a claim, treat it with more skepticism.
|
|
</Accordion>
|
|
|
|
<Accordion title="Click Through to Originals">
|
|
Always expand the grounding card and click through to verify critical information yourself.
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
|
|
## Tips for Better Results
|
|
|
|
**Be specific** — "What are the latest LLM releases in November 2024?" gets far better results than "Tell me about AI".
|
|
|
|
**Include time context** — Add "recent", "latest", "current", or specific dates to get timely results.
|
|
|
|
**Ask for comparisons** — "Compare X and Y" or "What are the pros and cons of Z" triggers useful multi-source searches.
|
|
|
|
**Review the citations** — Always expand the grounding card to see what sources were consulted and judge their quality.
|
|
|
|
**Use follow-ups** — Chain questions to go from broad overview to specific details.
|
|
|
|
## Privacy
|
|
|
|
<Callout type={'warning'}>
|
|
Web searches may be logged by the search provider you've configured. Avoid searching for
|
|
sensitive or personally identifying information.
|
|
</Callout>
|
|
|
|
Search queries are sent to your configured search provider. Source websites may also track visits when you click through to citations. Review the privacy policy of your chosen search provider for details.
|
|
|
|
## Limitations
|
|
|
|
<Tabs>
|
|
<Tab title="Content Limitations">
|
|
- **Paywalled content** — Cannot access subscription-only content (e.g., academic journals, news sites with paywalls)
|
|
- **Geo-restricted content** — Some sources may be regionally limited
|
|
- **Very recent events** — Slight indexing delay means very recent information (hours old) may not appear
|
|
</Tab>
|
|
|
|
<Tab title="Performance Limitations">
|
|
- **Added latency** — Web search adds a few seconds to response time
|
|
- **Token usage** — Search results consume additional tokens in the context
|
|
- **Rate limits** — Some search providers have usage limits
|
|
</Tab>
|
|
|
|
<Tab title="Scope Limitations">
|
|
- **Creative tasks** — Web search isn't helpful for purely creative writing or personal advice
|
|
- **Real-time data** — Not suitable for data that changes by the second (live stock tickers, etc.)
|
|
- **Deep web** — Cannot access content not indexed by search engines
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
<Callout type={'info'}>
|
|
Client-side, the built-in Web Search Skill needs no plugin or MCP install. Self-hosted servers
|
|
still require search-provider env setup ([Online Search](/docs/self-hosting/advanced/online-search)).
|
|
Optional MCP search backends may need their own API key or subscription.
|
|
</Callout>
|
|
|
|
<Cards>
|
|
<Card href={'/docs/usage/community/mcp-market'} title={'MCP Marketplace'} />
|
|
|
|
<Card href={'/docs/usage/agent/scheduled-task'} title={'Scheduled Tasks'} />
|
|
|
|
<Card href={'/docs/usage/agent/chain-of-thought'} title={'Chain of Thought'} />
|
|
</Cards>
|