Skip to content

This is an advanced AI research assistant that provides trustworthy, real-time answers from the web. It intelligently breaks down your query, finds and validates the best online sources, and then synthesizes a comprehensive, cited response. The result is a reliable answer built on verified information, not just pre-existing knowledge.

License

Notifications You must be signed in to change notification settings

dovvnloading/Autonomous-AI-Web-Search-Assistant

Chorus: A Multi-Agent AI Research Assistant

Python PySide6 Ollama License Status


An open-source, privacy-first alternative to Perplexity & ChatGPT’s web search mode, powered by local models, a multi-agent architecture, and real-time web access. It can run effectively on consumer-grade hardware with as little as 12GB of VRAM (e.g., a single GEFORCE RTX 3060 GPU).

Chorus doesn’t just answer questions—it reasons. It operates a sophisticated workflow where a chorus of specialized AI agents collaborate to plan, execute, search, validate, and synthesize information. It runs entirely on your local machine, ensuring every interaction is secure, private, and radically transparent.

  • Persistent Chat History: Automatically saves all conversations. Load, rename, or delete past chats from a dedicated history panel.
  • Current, Factual Answers: Fetches and synthesizes information from live web searches for up-to-the-minute accuracy.
  • Verifiable & Trustworthy: Provides source citations for every answer, allowing you to trace information back to its origin.
  • Pluggable Tools: Go beyond web search. Analyze local files with the File Reader or solve complex math with the Calculator tool, with a framework designed for easy expansion.
  • Follow-up Analysis: Trigger a deeper, meta-analysis of a response to find gaps, suggest extensions, or raise new questions based on the original source material.
  • 100% Private: No data, queries, or conversations ever leave your computer.
  • Radical Transparency: A unique Narrator Agent provides a human-like, running commentary on the AI's internal thought process in a live-updating action log.
  • Hybrid Contextual Memory: Remembers both short-term conversational flow and long-term semantic context within each chat session.

Think of it as your own local, autonomous research team: more accurate than a standard chatbot, more versatile than a web search engine, and completely in your control.


Untitled video - Made with Clipchamp (11)


Screenshot 2025-09-28 103805
Screenshot 2025-10-03 170318

Architectural Deep Dive: The Journey of a Query

The sophistication of Chorus lies in its modular, multi-agent pipeline. The architecture has been refactored for efficiency and extensibility, ensuring the right process is used for the right job.

Step 1: Intelligent Planning & Tool Routing

The RAGPipeline acts as a high-speed switchboard. Before invoking the main IntentAgent, it performs a series of high-priority checks to find the most efficient path for the user's query:

  • File Attached? If a file is attached and the File Reader tool is active, the query is routed directly to the tool for local document analysis.
  • Math Query? If the query is identified as a mathematical expression and the Calculator tool is active, it is routed for precise calculation.
  • URL in Prompt? If a URL is detected, the system bypasses intent analysis and proceeds directly to web scraping.
  • Standard Query: Only if none of the above conditions are met does the system invoke the IntentAgent to generate a full, context-aware web search plan.

Step 2: Tool Execution

If a tool is identified in Step 1, it is executed immediately. This parallel path allows Chorus to handle non-search tasks with specialized logic. The output from the tool is then passed directly to the final synthesis stage, providing a fast and accurate response without the overhead of the web search pipeline.

Step 3: Adaptive Information Retrieval

If a web search is required, the framework deploys its "scout" capabilities.

  • Context-Aware Source Ranking: Using the search_type from the planning phase, the system uses a sophisticated ranking algorithm to prioritize search results.
  • Resilient Search Strategy: The system employs a "narrow-to-broad" fallback mechanism, automatically widening the search scope if a targeted query fails.
  • Robust Content Extraction: A two-stage extraction process guarantees text is extracted even from complex or poorly structured web pages.

Step 4: Intelligent Quality Control

Chorus operates on a "trust but verify" principle. The dedicated ValidatorAgent checks each scraped source for relevance and depth, ensuring only high-quality, contextual information proceeds to the next stage.

Step 5: Multi-Stage Synthesis & Self-Correction

The system features internal feedback loops that allow it to adapt and recover from failure.

  • The Refinement Loop (Failure Recovery): If all initial sources are rejected, the RefinerAgent is invoked to analyze the failure reasons and construct a new, more intelligent search plan.
  • The Augmentation Loop (Information Gaps): The final SynthesisAgent can request more information by issuing an <additional_search> if it detects a critical detail is missing.

Step 6: Follow-up & Deeper Analysis

After a response is generated from web sources, the user can initiate a new workflow. By clicking the "Follow-up" button, a dedicated FollowupWorker is launched. This triggers a meta-analysis of the original source data and the AI's first response, aiming to identify gaps, suggest extensions, or raise new questions.

Step 7: Persistent & Semantic Memory

  • HistoryManager (The Librarian): This class handles all file I/O, saving every chat session to a local JSON file. It now has the ability to update individual messages, allowing it to persist states like a "Follow-up" action being triggered.
  • SemanticMemory (The Working Memory): When a chat is loaded, its history hydrates this class, which uses vector embeddings to provide deep contextual understanding for the agents.

The Chorus of Agents

Chorus's intelligence comes from a structured workflow orchestrated between several specialized AI agents.

  1. Intent Agent (The Planner): Analyzes the user's query and context to produce a classified, actionable search plan.
  2. Validator Agent (The Intelligent Filter): Critically evaluates each scraped web source, passing content that is either directly relevant or provides valuable context.
  3. Refiner Agent (The Problem Solver): If all initial results are rejected, this agent analyzes the failure feedback to generate an improved search plan.
  4. Abstraction Agent (The Data Extractor): Processes each validated source, ruthlessly extracting key facts and structuring the raw text into a clean, dense format.
  5. Synthesis Agent (The Author): Receives structured data from all validated sources and synthesizes it into a final, cohesive, user-facing answer.
  6. Followup Agent (The Analyst): At the user's request, this agent re-examines the source data and the initial AI response to perform a deeper analysis.
  7. Narrator Agent (The Commentator): Provides a running, human-like monologue in the Action Log, transparently explaining what the system is doing at each step.
  8. Title Agent (The Archivist): A lightweight agent that runs in the background to generate a concise title for new conversations.

Is Chorus the Right Tool For You? A Deep Dive

Chorus is more than just a piece of software; it's a statement about how AI should work. It's built for a specific kind of user who values not just the answer, but the integrity of the process used to get there.

You'll Feel Right at Home with Chorus If...

  • You demand radical transparency. The live Action Log and unique Narrator Agent provide a running commentary on the AI's entire thought process, from planning to validation to self-correction.

  • You believe in verifiable answers, not "magic." Chorus is built on a foundation of verifiability. Its multi-agent pipeline is a rigorous methodology designed to find, validate, and cite information.

  • You treat privacy and data ownership as non-negotiable. Chorus runs 100% locally. Your conversations, prompts, and the documents you analyze never leave your machine.

  • You need to work with your own data. The File Reader tool lets you have a conversation with your local documents—code files, logs, research notes, or reports—with the same analytical rigor as a web search, all while maintaining absolute privacy.

  • You need precision, not just prose. When a question involves numbers, you need a correct answer, not an LLM's best guess. The Calculator tool ensures that mathematical queries are solved with perfect accuracy.

  • You want to leverage the hardware you already own. Chorus is designed to turn your capable GPU into a private AI powerhouse, running effectively on consumer-grade hardware (like an RTX 3060).

  • You need a tool that adapts, not just executes. Its self-correction and refinement loops mean it doesn't just fail silently; it analyzes why a search failed and tries a smarter approach.

  • You're a builder, a tinkerer, or a power user. Because Chorus is open-source, you have ultimate control. Swap the models, tune the prompts in System_Instructions.txt, or even add your own tools to the tool_plugins directory.

...But Chorus Might Not Be Your First Choice If:

  • You need the absolute fastest answer for simple questions. The multi-agent process is thorough, but it's not instantaneous.
  • You're looking for a casual, conversational companion. Chorus is a goal-oriented research assistant.
  • You prefer a zero-setup, browser-based experience. Running Chorus requires installing Ollama and downloading several gigabytes of models.

Technology Stack

  • Backend: Python 3.10+
  • GUI Framework: PySide6
  • LLM Engine: Ollama
  • Web Search: duckduckgo-search
  • Web Scraping & Extraction: requests, BeautifulSoup4, trafilatura
  • Vector Math (for Semantic Memory): numpy

Getting Started

https://github.com/dovvnloading/Autonomous-AI-Web-Search-Assistant/blob/main/Sys_Requirements.md


Installation

https://github.com/dovvnloading/Autonomous-AI-Web-Search-Assistant/blob/main/VS_Installation.md


Usage Guide

  • Three-Panel Layout:
    • History Panel (Left): Lists all your saved conversations. Right-click for options to Rename or Delete.
    • Chat Interface (Center): The main window where you interact with the AI.
    • Action Log (Right): A real-time log of the AI's internal process.
  • Tools Menu (Bottom Left): A "🔧 Tools" menu allows you to enable or disable specialized capabilities. The button will glow to indicate active tools.
    • Calculator: Enables detection of mathematical queries.
    • File Reader: Enables the file attachment button (+) next to the input field.
  • Follow-up Button (On AI Messages): For responses generated from web searches, a "Follow-up" button will appear. Clicking this will trigger a deeper analysis of the topic using the original sources.
  • Expandable Details: Responses may include "Thinking Process" and "Sources" buttons. Click these to see the agent's reasoning and view the source citations.

Contributing

Contributions are welcome! If you have suggestions for improvements or encounter any bugs, please feel free to open an issue or submit a pull request.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/NewFeature).
  3. Commit your changes (git commit -m 'Add a new feature').
  4. Push to the branch (git push origin feature/NewFeature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This is an advanced AI research assistant that provides trustworthy, real-time answers from the web. It intelligently breaks down your query, finds and validates the best online sources, and then synthesizes a comprehensive, cited response. The result is a reliable answer built on verified information, not just pre-existing knowledge.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages