Skip to content

About

A robust multi-agent LLM system featuring an autonomous 4-stage pipeline (search, scrape, write, critique) for comprehensive data synthesis. Built with LangChain, Groq, and Tavily.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Markdown# 🔍 MultiAgent_DeepSearchAI

An autonomous, dual-agent research engine powered by Mistral Large 3, LangChain Core Runnables, and Streamlit.

MultiAgent_DeepSearchAI shifts the web lookup process from basic keyword searches into structured, high-density material extraction. Instead of browsing manually, this system utilizes a modular multi-agent graph layout to locate target resources, bypass web interface noise, digest comprehensive document bodies, and synthesize deeply integrated intelligence summaries natively with clickable source references.


🏗️ Architecture & Sequential System Flow

The codebase divides labor between two highly specialized agents using an isolated state dictionary. Rather than relying on simple text parsing loops, it uses native provider tool-calling wrapped inside LangGraph-backed runner nodes:

                  ┌─────────────────────────────┐
                  │      User Input Query       │
                  └──────────────┬──────────────┘
                                 │
                                 ▼
┌──────────────────────────────────────────────────────────────┐
│  🚀 1. DISCOVERY SCOUT AGENT (Tavily Python SDK)            │
│  • Performs semantic searches up to max_results=10           │
│  • Filters titles, links, and gathers ~300-word context tags │
└──────────────────────────────┬───────────────────────────────┘
                                 │
                                 ▼
┌──────────────────────────────────────────────────────────────┐
│  📖 2. CONTENT EXTRACTOR AGENT (BeautifulSoup4 & Requests)    │
│  • Mimics modern browser footprints to pass web security     │
│  • Decomposes UI clutter (ads, sidebars, cookie banners)      │
│  • Slices granular text streams at 3000 words maximum         │
└──────────────────────────────┬───────────────────────────────┘
                                 │
                                 ▼
┌──────────────────────────────────────────────────────────────┐
│  ✍️ 3. REPORT SYNTHESIS LAYER (LCEL & Runnables)             │
│  • Formats an Executive Summary and deep thematic sections    │
│  • Maps numerical in-text footnote markers ([1], [2])        │
│  • Compiles explicit clickable URL sections at the footer    │
└──────────────────────────────┬───────────────────────────────┘
                                 │
                                 ▼
                  ┌─────────────────────────────┐
                  │ Minimalist Streamlit Output │
                  └─────────────────────────────┘
Core Execution MatrixPipeline LayerUnderlying EngineFunctional ScopeTemperatureDiscovery Agentmistral-large-latestContextual search, URL targeting, and data discovery0.0 (Strict)Extraction Agentmistral-large-latestRaw DOM traversal, metadata parsing, and word gating0.0 (Strict)Synthesis Chainmistral-large-latestCreative structuring, indexing, and bibliography layout0.2 (Fluid)PresentationStreamlit RuntimeIsolated minimalist reader panel and operational metricsN/A🛠️ Advanced Engineering Design Features📡 Surgical Scraper OptimizationTo prevent token-bloat and conserve context windows, the extraction system implements a memory-efficient regex strip vector:It completely eliminates script blocks, stylesheets, frames, and interactive UI nodes (<script>, <style>, <nav>, <iframe>, <form>).It isolates and destroys persistent overlay tags matching case-insensitive clutter paths (social|share|comment|sidebar|footer|cookie|ad-|banner|promo).It preserves formatting paragraph boundaries using custom new-line serialization tokens.🛡️ Secure Production ArchitectureState Dictionary Isolation: Global pipeline components interact solely through structured dictionary transformations via LangChain states.Environment Separation: API credentials and localized configuration boundaries are strictly managed through .env structures. The code is structured to ensure zero potential for systemic secret leakage across remote logs.🚀 Getting Started & Local InstallationPrerequisitesPython 3.10 or higher installed locally.A valid Tavily API Key for discovery sweeps.A valid Mistral AI account for enterprise-grade reasoning.1. Project Cloning & ActivationClone the repository and move directly into the workspace root folder:Bashgit clone [https://github.com/devthegod1/MultiAgent_DeepSearchAI.git](https://github.com/devthegod1/MultiAgent_DeepSearchAI.git)
cd MultiAgent_DeepSearchAI
Set up a completely clean python virtual environment and activate it:Bash# Windows
python -m venv venv
venv\Scripts\activate

# macOS/Linux
python3 -m venv venv
source venv/bin/activate
Install all required system packages:Bashpip install -r requirements.txt
2. Configure Local SecretsCreate a file named .env in the root folder directory:PlaintextMISTRAL_API_KEY=your_actual_mistral_api_key
TAVILY_API_KEY=your_actual_tavily_api_key
3. Launching the System UIExecute the application dashboard using the native Streamlit client runner:Bashstreamlit run app.py
Open your local browser navigation bar to http://localhost:8501 to initialize deep search workflows.📦 Codebase BlueprintPlaintextMultiAgent_DeepSearchAI/
│
├── .gitignore             # Explicit ignore paths (.env, cache strings, venv)
├── requirements.txt       # Versioned system library dependencies
│
├── tools.py               # Tavily search tool & anti-bot BeautifulSoup scrapers
├── agents.py              # Mistral create_agent definitions & LCEL prompt topologies
├── pipeline.py            # Main runtime orchestrator & system state manager
└── app.py                 # Streamlit front-end visualization presentation layer
📄 LicenseDistributed under the MIT License. See LICENSE for more details.

About

A robust multi-agent LLM system featuring an autonomous 4-stage pipeline (search, scrape, write, critique) for comprehensive data synthesis. Built with LangChain, Groq, and Tavily.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages