🔍 AI-Powered Real-Time Web Search Engine for LobeChat
Empower your AI conversations with intelligent, real-time web search capabilities
Get Started · Features · Deployment · Documentation
- Overview
- Key Features
- Quick Start
- Deployment Guide
- Technical Stack
- API Reference
- Roadmap
- Contributing
- License
- Acknowledgments
The LobeChat Tavily AI Search Plugin seamlessly integrates Tavily AI's cutting-edge search API into LobeChat, transforming your AI assistant into an intelligent research companion with real-time access to web information.
|
🎯 Optimized for LLMs
|
⚡ Lightning Fast
|
|
💎 Developer Friendly
|
🔒 Privacy & Security
|
- 🔍 Intelligent Search: Leverage Tavily's AI-optimized search engine designed specifically for LLM applications
- 📊 Rich Results: Get comprehensive, structured search results with relevant context
- 🎨 Beautiful UI: Modern, responsive interface built with Next.js 15 and React 19
- ⚙️ Easy Configuration: Simple setup process with intuitive settings management
- 🚀 One-Click Deploy: Deploy your own instance to Vercel in seconds
- 🔐 Secure by Default: API key encryption and secure credential management
- 🌐 Multi-language: Support for both English and Chinese interfaces
- 📱 Responsive Design: Optimized for desktop and mobile experiences
Before you begin, ensure you have:
- A LobeChat instance (cloud or self-hosted)
- A Tavily API account
- Sign Up: Visit tavily.com and create a free account
- Generate Key: Navigate to your dashboard and create a new API key
- Save Key: Copy and securely store your API key
💡 Tip: You get 1,000 free searches per month without requiring a credit card!
- Open your LobeChat instance
- Navigate to Plugin Store → Custom Plugin → Edit Installation File
- Add the following URL to Description File URL:
https://lobe-plugin.composere.com/manifest.json - Click Install Plugin
- Enter your Tavily API key in the plugin settings
For enhanced security and customization, deploy your own instance.
- Start a new conversation in LobeChat
- Enable the Tavily Search plugin
- Ask questions that require real-time information
- Watch as your AI assistant retrieves and analyzes current web data
-
Fork & Deploy
# Fork this repository # Click the "Deploy to Vercel" button above # Follow the deployment wizard
-
Configure Your Instance
Update
public/manifest.json:{ "api": [{ "url": "https://YOUR_DOMAIN.vercel.app/api/tavily" }], "ui": { "url": "https://YOUR_DOMAIN.vercel.app/search" } } -
Install in LobeChat
Use your custom manifest URL:
https://YOUR_DOMAIN.vercel.app/manifest.json
For advanced users who want to customize the API gateway:
- Reference
public/manifest-dev.jsonas a template - Update the
gatewayfield:{ "gateway": "https://YOUR_CUSTOM_GATEWAY.com" }
# Clone the repository
git clone https://github.com/dielect/lobechat-tavily-plugin.git
cd lobechat-tavily-plugin
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm startThis plugin is built with modern, cutting-edge technologies:
| Category | Technologies |
|---|---|
| Framework | Next.js 15.1.7, React 19 |
| Language | TypeScript 5 |
| Styling | Tailwind CSS 3.4, tailwindcss-animate |
| Animation | Framer Motion 12.4 |
| UI Components | Radix UI, Lucide React |
| API Integration | Tavily Core SDK 0.3.1 |
| LobeHub SDKs | @lobehub/chat-plugin-sdk, @lobehub/chat-plugins-gateway |
| Build Tool | Turbopack (Next.js) |
┌─────────────────────────────────────────────────────────┐
│ LobeChat │
│ ┌───────────────────────────────────────────────────┐ │
│ │ Plugin Interface │ │
│ └────────────────────┬──────────────────────────────┘ │
└───────────────────────┼─────────────────────────────────┘
│
│ Plugin SDK
│
┌───────────────────────▼─────────────────────────────────┐
│ Tavily Search Plugin (This Project) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Next.js API Routes (/api/tavily) │ │
│ │ ┌───────────────────────────────────────────┐ │ │
│ │ │ Authentication & Validation │ │ │
│ │ └────────────────┬──────────────────────────┘ │ │
│ │ │ │ │
│ │ ┌────────────────▼──────────────────────────┐ │ │
│ │ │ Tavily API Integration │ │ │
│ │ └────────────────┬──────────────────────────┘ │ │
│ └───────────────────┼─────────────────────────────┘ │
│ │ │
│ ┌───────────────────▼─────────────────────────────┐ │
│ │ UI Component (/search) │ │
│ │ • Results Display │ │
│ │ • Interactive Interface │ │
│ └─────────────────────────────────────────────────┘ │
└───────────────────────┬─────────────────────────────────┘
│
│ Tavily API
│
┌───────────────────────▼─────────────────────────────────┐
│ Tavily AI Search API │
│ https://api.tavily.com │
└─────────────────────────────────────────────────────────┘
Endpoint: POST /api/tavily
Description: Performs advanced web searches using Tavily's search engine API.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | ✅ Yes | The search query or keywords to look up |
Example Request:
const response = await fetch('https://lobe-plugin.composere.com/api/tavily', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
query: 'Latest AI developments 2025'
})
});
const data = await response.json();Response Format:
interface SearchResult {
results: Array<{
title: string;
url: string;
content: string;
score: number;
}>;
query: string;
responseTime: number;
}-
Enhanced Tavily API Integration
- Support for multiple search types (web, news, academic)
- Configurable result length and format
- Advanced filtering and sorting options
- Domain-specific search capabilities
-
UI/UX Improvements
-
Rich result preview with thumbnails - Search history management
- Bookmarking favorite results
- Export results to various formats
-
-
Performance Enhancements
- Intelligent caching mechanism
- Request debouncing and throttling
- Optimized response times
- Progressive result loading
-
Developer Experience
- Comprehensive API documentation
- Example integrations and templates
- Testing utilities and mocks
- Debug mode and logging options
-
Enterprise Features
- Usage analytics and monitoring
- Rate limiting configuration
- Multi-user API key management
- Webhook notifications
We welcome contributions from the community! Whether you're fixing bugs, improving documentation, or proposing new features, your help is appreciated.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow the existing code style and conventions
- Write clear, descriptive commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
Found a bug or have a suggestion? Please open an issue with:
- A clear, descriptive title
- Detailed description of the issue or feature
- Steps to reproduce (for bugs)
- Expected vs. actual behavior
- Screenshots or code samples (if applicable)
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 dielect
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
This project wouldn't be possible without these amazing tools and communities:
- LobeChat - The innovative AI chat platform that makes this plugin possible
- Tavily AI - For providing the powerful, LLM-optimized search API
- Vercel - For seamless deployment and hosting infrastructure
- Next.js - The React framework that powers this application
- Tailwind CSS - For the beautiful, responsive design system
- All contributors who have helped improve this plugin
- The LobeChat community for their support and feedback
- Early adopters and testers who provided valuable insights