[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72220":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},72220,"OpenDeepSearch","sentient-agi\u002FOpenDeepSearch","sentient-agi","SOTA search powered LLM","",null,"Python",3827,341,40,16,0,1,4,13,3,29.6,"Apache License 2.0",false,"main",[],"2026-06-12 02:03:00","# 🔍OpenDeepSearch: Democratizing Search with Open-source Reasoning Models and Reasoning Agents 🚀\n\n\u003C!-- markdownlint-disable first-line-h1 -->\n\u003C!-- markdownlint-disable html -->\n\u003C!-- markdownlint-disable no-duplicate-header -->\n\n\u003Cdiv align=\"center\">\n    \u003Cimg src=\".\u002Fassets\u002Fsentient-logo-narrow.png\" alt=\"alt text\" width=\"60%\"\u002F>\n\u003C\u002Fdiv>\n\n\u003Chr>\n\u003Cdiv align=\"center\" style=\"line-height: 1;\">\n  \u003Ca href=\"https:\u002F\u002Fsentient.xyz\u002F\" target=\"_blank\" style=\"margin: 2px;\">\n    \u003Cimg alt=\"Homepage\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSentient-Homepage-%23EAEAEA?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzNDEuMzMzIiBoZWlnaHQ9IjM0MS4zMzMiIH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MTAuMy0yLjctMjIuMy02cy0yMi41LTYtMjMuMy02Yy0uOCAwLTIuMy45LTMuMyAyek0xMzYuNyAyMTYuOGMtMy40IDMuOC0xLjUgOS41IDMuNSAxMC43IDMuOSAxIDguMy0zLjQgNy4zLTcuMy0xLjItNS4xLTcuNS03LjEtMTAuOC0zLjR6Ii8%2BPC9zdmc%2B&link=https%3A%2F%2Fhuggingface.co%2FSentientagi\" style=\"display: inline-block; vertical-align: middle;\"\u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsentient-agi\" target=\"_blank\" style=\"margin: 2px;\">\n    \u003Cimg alt=\"GitHub\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGithub-sentient_agi-181717?logo=github\" style=\"display: inline-block; vertical-align: middle;\"\u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FSentientagi\" target=\"_blank\" style=\"margin: 2px;\">\n    \u003Cimg alt=\"Hugging Face\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-SentientAGI-ffc107?color=ffc107&logoColor=white\" style=\"display: inline-block; vertical-align: middle;\"\u002F>\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"center\" style=\"line-height: 1;\">\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Fsentientfoundation\" target=\"_blank\" style=\"margin: 2px;\">\n    \u003Cimg alt=\"Discord\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-SentientAGI-7289da?logo=discord&logoColor=white&color=7289da\" style=\"display: inline-block; vertical-align: middle;\"\u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fx.com\u002FSentientAGI\" target=\"_blank\" style=\"margin: 2px;\">\n    \u003Cimg alt=\"Twitter Follow\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F-SentientAGI-grey?logo=x&link=https%3A%2F%2Fx.com%2FSentientAGI%2F\" style=\"display: inline-block; vertical-align: middle;\"\u002F>\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003Ch4 align=\"center\">\n        \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2503.20201\"> Paper  \u003C\u002Fa>\n\u003C\u002Fh4>\n\n## Description 📝\n\nOpenDeepSearch is a lightweight yet powerful search tool designed for seamless integration with AI agents. It enables deep web search and retrieval, optimized for use with Hugging Face's **[SmolAgents](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fsmolagents)** ecosystem.\n\n\u003Cdiv align=\"center\">\n    \u003Cimg src=\".\u002Fassets\u002Fevals.png\" alt=\"Evaluation Results\" width=\"80%\"\u002F>\n\u003C\u002Fdiv>\n\n- **Performance**: ODS performs on par with closed source search alternatives on single-hop queries such as [SimpleQA](https:\u002F\u002Fopenai.com\u002Findex\u002Fintroducing-simpleqa\u002F) 🔍.\n- **Advanced Capabilities**: ODS performs much better than closed source search alternatives on multi-hop queries such as [FRAMES bench](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fgoogle\u002Fframes-benchmark) 🚀.\n\n## Table of Contents 📑\n\n- [🔍OpenDeepSearch: Democratizing Search with Open-source Reasoning Models and Reasoning Agents 🚀](#opendeepsearch-democratizing-search-with-open-source-reasoning-models-and-reasoning-agents-)\n  - [Description 📝](#description-)\n  - [Table of Contents 📑](#table-of-contents-)\n  - [Features ✨](#features-)\n  - [Installation 📚](#installation-)\n  - [Setup](#setup)\n  - [Usage ️](#usage-️)\n    - [Using OpenDeepSearch Standalone 🔍](#using-opendeepsearch-standalone-)\n    - [Running the Gradio Demo 🖥️](#running-the-gradio-demo-️)\n    - [Integrating with SmolAgents \\& LiteLLM 🤖⚙️](#integrating-with-smolagents--litellm-️)\n      - [](#)\n    - [ReAct agent with math and search tools 🤖⚙️](#react-agent-with-math-and-search-tools-️)\n      - [](#-1)\n  - [Search Modes 🔄](#search-modes-)\n    - [Default Mode ⚡](#default-mode-)\n    - [Pro Mode 🔍](#pro-mode-)\n  - [Acknowledgments 💡](#acknowledgments-)\n  - [Citation](#citation)\n  - [Contact 📩](#contact-)\n\n## Features ✨\n\n- **Semantic Search** 🧠: Leverages **[Crawl4AI](https:\u002F\u002Fgithub.com\u002Funclecode\u002Fcrawl4ai)** and semantic search rerankers (such as [Qwen2-7B-instruct](https:\u002F\u002Fhuggingface.co\u002FAlibaba-NLP\u002Fgte-Qwen2-7B-instruct\u002Ftree\u002Fmain) and [Jina AI](https:\u002F\u002Fjina.ai\u002F)) to provide in-depth results\n- **Two Modes of Operation** ⚡:\n  - **Default Mode**: Quick and efficient search with minimal latency.\n  - **Pro Mode (Deep Search)**: More in-depth and accurate results at the cost of additional processing time.\n- **Optimized for AI Agents** 🤖: Works seamlessly with **SmolAgents** like `CodeAgent`.\n- **Fast and Lightweight** ⚡: Designed for speed and efficiency with minimal setup.\n- **Extensible** 🔌: Easily configurable to work with different models and APIs.\n\n## Installation 📚\n\nTo install OpenDeepSearch, run:\n\n```bash\npip install -e . #you can also use: uv pip install -e .\npip install -r requirements.txt #you can also use: uv pip install -r requirements.txt\n```\n\nNote: you must have `torch` installed.\nNote: using `uv` instead of regular `pip` makes life much easier!\n\n### Using PDM (Alternative Package Manager) 📦\n\nYou can also use PDM as an alternative package manager for OpenDeepSearch. PDM is a modern Python package and dependency manager supporting the latest PEP standards.\n\n```bash\n# Install PDM if you haven't already\ncurl -sSL https:\u002F\u002Fraw.githubusercontent.com\u002Fpdm-project\u002Fpdm\u002Fmain\u002Finstall-pdm.py | python3 -\n\n# Initialize a new PDM project\npdm init\n\n# Install OpenDeepSearch and its dependencies\npdm install\n\n# Activate the virtual environment\neval \"$(pdm venv activate)\"\n```\n\nPDM offers several advantages:\n- Lockfile support for reproducible installations\n- PEP 582 support (no virtual environment needed)\n- Fast dependency resolution\n- Built-in virtual environment management\n\n## Setup\n\n1. **Choose a Search Provider**:\n   - **Option 1: Serper.dev**: Get **free 2500 credits** and add your API key.\n     - Visit [serper.dev](https:\u002F\u002Fserper.dev) to create an account.\n     - Retrieve your API key and store it as an environment variable:\n\n     ```bash\n     export SERPER_API_KEY='your-api-key-here'\n     ```\n\n   - **Option 2: SearXNG**: Use a self-hosted or public SearXNG instance.\n     - Specify the SearXNG instance URL when initializing OpenDeepSearch.\n     - Optionally provide an API key if your instance requires authentication:\n\n     ```bash\n     export SEARXNG_INSTANCE_URL='https:\u002F\u002Fyour-searxng-instance.com'\n     export SEARXNG_API_KEY='your-api-key-here'  # Optional\n     ```\n\n2. **Choose a Reranking Solution**:\n   - **Quick Start with Jina**: Sign up at [Jina AI](https:\u002F\u002Fjina.ai\u002F) to get an API key for immediate use\n   - **Self-hosted Option**: Set up [Infinity Embeddings](https:\u002F\u002Fgithub.com\u002Fmichaelfeil\u002Finfinity) server locally with open source models such as [Qwen2-7B-instruct](https:\u002F\u002Fhuggingface.co\u002FAlibaba-NLP\u002Fgte-Qwen2-7B-instruct\u002Ftree\u002Fmain)\n   - For more details on reranking options, see our [Rerankers Guide](src\u002Fopendeepsearch\u002Franking_models\u002FREADME.md)\n\n3. **Set up LiteLLM Provider**:\n   - Choose a provider from the [supported list](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fproviders\u002F), including:\n     - OpenAI\n     - Anthropic\n     - Google (Gemini)\n     - OpenRouter\n     - HuggingFace\n     - Fireworks\n     - And many more!\n   - Set your chosen provider's API key as an environment variable:\n   ```bash\n   export \u003CPROVIDER>_API_KEY='your-api-key-here'  # e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY\n   ```\n   - For OpenAI, you can also set a custom base URL (useful for self-hosted endpoints or proxies):\n   ```bash\n   export OPENAI_BASE_URL='https:\u002F\u002Fyour-custom-openai-endpoint.com'\n   ```\n   - You can set default LiteLLM model IDs for different tasks:\n   ```bash\n   # General default model (fallback for all tasks)\n   export LITELLM_MODEL_ID='openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001'\n\n   # Task-specific models\n   export LITELLM_SEARCH_MODEL_ID='openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001'  # For search tasks\n   export LITELLM_ORCHESTRATOR_MODEL_ID='openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001'  # For agent orchestration\n   export LITELLM_EVAL_MODEL_ID='gpt-4o-mini'  # For evaluation tasks\n   ```\n   - When initializing OpenDeepSearch, you can specify your chosen model using the provider's format (this will override the environment variables):\n   ```python\n   search_agent = OpenDeepSearchTool(model_name=\"provider\u002Fmodel-name\")  # e.g., \"anthropic\u002Fclaude-3-opus-20240229\", 'huggingface\u002Fmicrosoft\u002Fcodebert-base', 'openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001'\n   ```\n\n## Usage ️\n\nYou can use OpenDeepSearch independently or integrate it with **SmolAgents** for enhanced reasoning and code generation capabilities.\n\n### Using OpenDeepSearch Standalone 🔍\n\n```python\nfrom opendeepsearch import OpenDeepSearchTool\nimport os\n\n# Set environment variables for API keys\nos.environ[\"SERPER_API_KEY\"] = \"your-serper-api-key-here\"  # If using Serper\n# Or for SearXNG\n# os.environ[\"SEARXNG_INSTANCE_URL\"] = \"https:\u002F\u002Fyour-searxng-instance.com\"\n# os.environ[\"SEARXNG_API_KEY\"] = \"your-api-key-here\"  # Optional\n\nos.environ[\"OPENROUTER_API_KEY\"] = \"your-openrouter-api-key-here\"\nos.environ[\"JINA_API_KEY\"] = \"your-jina-api-key-here\"\n\n# Using Serper (default)\nsearch_agent = OpenDeepSearchTool(\n    model_name=\"openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001\",\n    reranker=\"jina\"\n)\n\n# Or using SearXNG\n# search_agent = OpenDeepSearchTool(\n#     model_name=\"openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001\",\n#     reranker=\"jina\",\n#     search_provider=\"searxng\",\n#     searxng_instance_url=\"https:\u002F\u002Fyour-searxng-instance.com\",\n#     searxng_api_key=\"your-api-key-here\"  # Optional\n# )\n\nif not search_agent.is_initialized:\n    search_agent.setup()\n    \nquery = \"Fastest land animal?\"\nresult = search_agent.forward(query)\nprint(result)\n```\n\n### Running the Gradio Demo 🖥️\n\nTo try out OpenDeepSearch with a user-friendly interface, simply run:\n\n```bash\npython gradio_demo.py\n```\n\nThis will launch a local web interface where you can test different search queries and modes interactively.\n\nYou can customize the demo with command-line arguments:\n\n```bash\n# Using Serper (default)\npython gradio_demo.py --model-name \"openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001\" --reranker \"jina\"\n\n# Using SearXNG\npython gradio_demo.py --model-name \"openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001\" --reranker \"jina\" \\\n  --search-provider \"searxng\" --searxng-instance \"https:\u002F\u002Fyour-searxng-instance.com\" \\\n  --searxng-api-key \"your-api-key-here\"  # Optional\n```\n\nAvailable options:\n- `--model-name`: LLM model to use for search\n- `--orchestrator-model`: LLM model for the agent orchestrator\n- `--reranker`: Reranker to use (`jina` or `infinity`)\n- `--search-provider`: Search provider to use (`serper` or `searxng`)\n- `--searxng-instance`: SearXNG instance URL (required if using `searxng`)\n- `--searxng-api-key`: SearXNG API key (optional)\n- `--serper-api-key`: Serper API key (optional, will use environment variable if not provided)\n- `--openai-base-url`: OpenAI API base URL (optional, will use OPENAI_BASE_URL env var if not provided)\n\n### Integrating with SmolAgents & LiteLLM 🤖⚙️\n\n####\n\n```python\nfrom opendeepsearch import OpenDeepSearchTool\nfrom smolagents import CodeAgent, LiteLLMModel\nimport os\n\n# Set environment variables for API keys\nos.environ[\"SERPER_API_KEY\"] = \"your-serper-api-key-here\"  # If using Serper\n# Or for SearXNG\n# os.environ[\"SEARXNG_INSTANCE_URL\"] = \"https:\u002F\u002Fyour-searxng-instance.com\"\n# os.environ[\"SEARXNG_API_KEY\"] = \"your-api-key-here\"  # Optional\n\nos.environ[\"OPENROUTER_API_KEY\"] = \"your-openrouter-api-key-here\"\nos.environ[\"JINA_API_KEY\"] = \"your-jina-api-key-here\"\n\n# Using Serper (default)\nsearch_agent = OpenDeepSearchTool(\n    model_name=\"openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001\",\n    reranker=\"jina\"\n)\n\n# Or using SearXNG\n# search_agent = OpenDeepSearchTool(\n#     model_name=\"openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001\",\n#     reranker=\"jina\",\n#     search_provider=\"searxng\",\n#     searxng_instance_url=\"https:\u002F\u002Fyour-searxng-instance.com\",\n#     searxng_api_key=\"your-api-key-here\"  # Optional\n# )\n\nmodel = LiteLLMModel(\n    \"openrouter\u002Fgoogle\u002Fgemini-2.0-flash-001\",\n    temperature=0.2\n)\n\ncode_agent = CodeAgent(tools=[search_agent], model=model)\nquery = \"How long would a cheetah at full speed take to run the length of Pont Alexandre III?\"\nresult = code_agent.run(query)\n\nprint(result)\n```\n### ReAct agent with math and search tools 🤖⚙️\n\n####\n```python\nfrom opendeepsearch import OpenDeepSearchTool\nfrom opendeepsearch.wolfram_tool import WolframAlphaTool\nfrom opendeepsearch.prompts import REACT_PROMPT\nfrom smolagents import LiteLLMModel, ToolCallingAgent, Tool\nimport os\n\n# Set environment variables for API keys\nos.environ[\"SERPER_API_KEY\"] = \"your-serper-api-key-here\"\nos.environ[\"JINA_API_KEY\"] = \"your-jina-api-key-here\"\nos.environ[\"WOLFRAM_ALPHA_APP_ID\"] = \"your-wolfram-alpha-app-id-here\"\nos.environ[\"FIREWORKS_API_KEY\"] = \"your-fireworks-api-key-here\"\n\nmodel = LiteLLMModel(\n    \"fireworks_ai\u002Fllama-v3p1-70b-instruct\",  # Your Fireworks Deepseek model\n    temperature=0.7\n)\nsearch_agent = OpenDeepSearchTool(model_name=\"fireworks_ai\u002Fllama-v3p1-70b-instruct\", reranker=\"jina\") # Set reranker to \"jina\" or \"infinity\"\n\n# Initialize the Wolfram Alpha tool\nwolfram_tool = WolframAlphaTool(app_id=os.environ[\"WOLFRAM_ALPHA_APP_ID\"])\n\n# Initialize the React Agent with search and wolfram tools\nreact_agent = ToolCallingAgent(\n    tools=[search_agent, wolfram_tool],\n    model=model,\n    prompt_templates=REACT_PROMPT # Using REACT_PROMPT as system prompt\n)\n\n# Example query for the React Agent\nquery = \"What is the distance, in metres, between the Colosseum in Rome and the Rialto bridge in Venice\"\nresult = react_agent.run(query)\n\nprint(result)\n```\n\n## Search Modes 🔄\n\nOpenDeepSearch offers two distinct search modes to balance between speed and depth:\n\n### Default Mode ⚡\n- Uses SERP-based interaction for quick results\n- Minimal processing overhead\n- Ideal for single-hop, straightforward queries\n- Fast response times\n- Perfect for basic information retrieval\n\n### Pro Mode 🔍\n- Involves comprehensive web scraping\n- Implements semantic reranking of results\n- Includes advanced post-processing of data\n- Slightly longer processing time\n- Excels at:\n  - Multi-hop queries\n  - Complex search requirements\n  - Detailed information gathering\n  - Questions requiring cross-reference verification\n\n## Acknowledgments 💡\n\nOpenDeepSearch is built on the shoulders of great open-source projects:\n\n- **[SmolAgents](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fsmolagents\u002Findex)** 🤗 – Powers the agent framework and reasoning capabilities.\n- **[Crawl4AI](https:\u002F\u002Fgithub.com\u002Funclecode\u002Fcrawl4ai)** 🕷️ – Provides data crawling support.\n- **[Infinity Embedding API](https:\u002F\u002Fgithub.com\u002Fmichaelfeil\u002Finfinity)** 🌍 – Powers semantic search capabilities.\n- **[LiteLLM](https:\u002F\u002Fwww.litellm.ai\u002F)** 🔥 – Used for efficient AI model integration.\n- **Various Open-Source Libraries** 📚 – Enhancing search and retrieval functionalities.\n\n## Citation\n\nIf you use `OpenDeepSearch` in your works, please cite it using the following BibTex entry:\n\n```\n@misc{alzubi2025opendeepsearchdemocratizing,\n      title={Open Deep Search: Democratizing Search with Open-source Reasoning Agents},\n      author={Salaheddin Alzubi and Creston Brooks and Purva Chiniya and Edoardo Contente and Chiara von Gerlach and Lucas Irwin and Yihan Jiang and Arda Kaz and Windsor Nguyen and Sewoong Oh and Himanshu Tyagi and Pramod Viswanath},\n      year={2025},\n      eprint={2503.20201},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.20201},\n}\n```\n\n\n## Contact 📩\n\nFor questions or collaborations, open an issue or reach out to the maintainers.\n","OpenDeepSearch 是一个基于开源推理模型和代理的最先进搜索技术项目。它利用大语言模型（LLM）提供强大的搜索功能，支持复杂的查询理解和处理。项目采用Python开发，具有高可扩展性和灵活性，允许用户通过简单的API调用来实现深度搜索能力。适合需要高效、精准信息检索的应用场景，如企业内部知识库管理、科研文献查找等。",2,"2026-06-11 03:40:54","high_star"]