Skip to content

Repository files navigation

Querit Search Plugin for Dify

Version Python License

Author: querit-ai Version: 0.0.7 Type: Dify Tool Plugin


What is Querit.ai Search?

Querit.ai Search is a retrieval system specifically designed for generative LLMs invocation scenarios, providing real-time search results.

Limited training data and local knowledge bases restrict LLMs, leading to hallucinations and timeliness issues when handling complex or real-time queries. To address this, AI search needs to provide retrieval services that are real-time, authoritative, accurate, high-quality, and comprehensive. Therefore, we offer a Web Search API that seamlessly integrates with your LLM applications, giving you access to authoritative, accurate, and high-quality information from across the web.

Why Querit.ai?

  • Comprehensive Content: Massive global index spanning nearly 20 countries and 10 languages with hundreds of billions of web pages.
    • Countries include: United States, India, United Kingdom, Canada, etc.
    • Languages include: English, Spanish, Portuguese, etc.
  • Strong Capabilities: Flexible retrieval options allowing enterprises to customize results for specific scenarios.
  • Excellent Results: Delivers accurate, authoritative, and high-quality content coverage.
  • High Performance: Ensures enterprise-grade high availability with ultra-low latency.

Description

This plugin integrates Querit.ai real-time search and retrieval services into Dify platform through standardized APIs, allowing agents to query external knowledge sources with natural language and obtain structured search results.

Querit.ai provides a global-scale multilingual indexing and semantic understanding engine for more reliable and precise results, with integrated filtering and ranking strategies to enhance LLM context support.

Features

  • Real-time web search for LLM applications
  • Natural language query understanding
  • Structured search results with URLs, images, and data
  • Global multi-language coverage
  • Low-latency enterprise-grade API

Installation

Prerequisites

  • Python 3.11+
  • Dify platform (self-hosted or cloud)

Steps

  1. Clone this repository:

    git clone https://github.com/querit-ai/dify-querit.git
    cd dify-querit
  2. Install dependencies:

    pip install -r requirements.txt
  3. Copy the environment file and configure your API key:

    cp .env.example .env
  4. Get your Querit API key from Querit Dashboard and add it to the .env file.

  5. Run the plugin:

    python -m main

Usage

In Dify

  1. Install the plugin in your Dify workspace
  2. Configure the Querit API key in the plugin settings
  3. Use the Querit Search tool in your AI agents/workflows

API Endpoint

The plugin uses the Querit Search API:

POST https://api.querit.ai/v1/search

Parameters:

  • query: The search query (natural language)
  • count: Number of results to return (optional)

Search Monitors

Beyond one-off search, the plugin exposes the Querit Monitors ecosystem. A Monitor turns a single search into a continuously running task: you register a query and an interval, the system runs it repeatedly on schedule, deduplicates against past runs automatically, and returns only what's new. This fits ongoing attention scenarios such as competitor activity, funding news, policy changes and new papers.

Monitor Tools

  • Create Monitor (monitor_create) — create a scheduled search monitor
  • List Monitors (monitor_list) — list monitors with status/name filters
  • Get Monitor (monitor_get) — full details including the search config
  • Update Monitor (monitor_update) — change name, schedule or search query
  • Delete Monitor (monitor_delete) — delete a monitor
  • Pause / Resume Monitor (monitor_pause, monitor_resume) — stop/start scheduled runs
  • Trigger Monitor (monitor_trigger) — run once immediately
  • List Executions (monitor_executions) — execution history (metadata only)
  • Get Execution (monitor_execution_get) — a single execution with its result events
  • Recent Executions (monitor_executions_recent) — recent executions with result content (main way to read new results)

Monitor API Endpoints

POST   https://api.querit.ai/v1/monitors                                  # create
GET    https://api.querit.ai/v1/monitors                                  # list
GET    https://api.querit.ai/v1/monitors/{monitor_id}                     # details
POST   https://api.querit.ai/v1/monitors/{monitor_id}                     # update
DELETE https://api.querit.ai/v1/monitors/{monitor_id}                     # delete
POST   https://api.querit.ai/v1/monitors/{monitor_id}/pause               # pause
POST   https://api.querit.ai/v1/monitors/{monitor_id}/resume              # resume
POST   https://api.querit.ai/v1/monitors/{monitor_id}/trigger             # trigger once
GET    https://api.querit.ai/v1/monitors/{monitor_id}/executions          # execution list
GET    https://api.querit.ai/v1/monitors/{monitor_id}/executions/{id}     # execution details
GET    https://api.querit.ai/v1/monitors/{monitor_id}/executions/recent   # recent executions

Schedule interval: hourly values 1h–24h, or 1d / 7d. Minimum interval is 1 hour.

Notes:

  • Creating a monitor does not run it immediately; the first run is at next_trigger_at. Use monitor_trigger to run it right away while testing.
  • monitor_update replaces the whole search object rather than merging fields.
  • A success execution with new_results = 0 is normal — it means results came back but none were new.

See GUIDE.md for detailed development documentation.

Plugin Structure

dify-querit/
├── main.py                 # Plugin entry point
├── manifest.yaml           # Plugin manifest
├── provider/               # Provider configuration
│   ├── dify_querit.py
│   └── dify_querit.yaml
├── tools/                  # Tool definitions
│   ├── dify_querit.py      # Search tool
│   ├── dify_querit.yaml
│   ├── monitor_base.py     # Shared HTTP helper for monitor tools
│   ├── monitor_create.py / .yaml
│   ├── monitor_list.py / .yaml
│   ├── monitor_get.py / .yaml
│   ├── monitor_update.py / .yaml
│   ├── monitor_delete.py / .yaml
│   ├── monitor_pause.py / .yaml
│   ├── monitor_resume.py / .yaml
│   ├── monitor_trigger.py / .yaml
│   ├── monitor_executions.py / .yaml
│   ├── monitor_execution_get.py / .yaml
│   └── monitor_executions_recent.py / .yaml
├── _assets/                # Icons and assets
├── README.md               # This file
├── GUIDE.md                # Development guide
└── requirements.txt        # Python dependencies

Publishing to Dify Marketplace

This plugin follows the official Dify plugin publishing workflow:

  1. Develop & Test: Make changes in this repository and test locally
  2. Create Release: Publish a new release with a version tag (e.g., v0.0.1)
  3. Auto-Publish: GitHub Actions will automatically:
  4. Submit to Dify: The branch will be merged into the official Dify plugin repository

For detailed publishing instructions, see CONTRIBUTING.md.


License

See LICENSE for details.


Support

About

Querit search in Dify

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages