Back to projects

Nexus Research

Nexus Research is an enterprise-grade, fully autonomous AI research assistant. Unlike standard conversational AI models that provide immediate but often superficial answers, Nexus executes a complete, deep-dive research pipeline.

ReactFastAPILangGraphGeminiPostgreSQL
Multi-Agent Orchestration
Real-time Web Search
Fact-Checking Loop
Framer Motion UI
Nexus Research preview

The Problem

In the era of generative AI, users often face several challenges when seeking in-depth information:

  • Superficial Answers: Standard chatbots often lack the depth required for academic or enterprise-level research.
  • Hallucinations & Inaccuracies: AI models can confidently present false information if not actively verified against real-time data.
  • Information Overload: Manually researching a complex topic requires opening dozens of tabs, verifying sources, and synthesizing data.
  • Context Loss: Long-form research generation often exceeds standard context windows, leading to disorganized or repetitive outputs.

The Solution

Nexus Research solves these problems by moving from a single-prompt paradigm to an agentic workflow. By utilizing a multi-agent state-machine architecture, the system breaks down complex queries into manageable tasks, delegates them to specialized AI personas, searches the live internet, fact-checks its own findings, and compiles a final, high-quality markdown report.

Key Features

  • Multi-Agent Orchestration: A collaborative pipeline where agents review each other's work and iteratively build reports.
  • Deep Web Search Integration: Real-time web scraping and search (powered by Tavily) ensures up-to-date and accurate data gathering.
  • Self-Correction Loop: An independent Fact-Checker agent verifies claims and forces the Researcher to gather more data if discrepancies are found.
  • Bring Your Own Key (BYOK): Allows users to connect their personal Google Gemini API keys to bypass global rate limits.
  • Private Workspaces: Secure, multi-user authentication to keep research history and API keys completely private.
  • Paper Mode: A distraction-free, elegant reading mode optimized for long-form reports.
  • Rich Exports: One-click copy to Markdown or print to PDF capabilities for easy sharing.

Architecture & Tech Stack

Nexus Research is built on a modern, scalable, and decoupled architecture.

  • Backend: Python 3.9+, FastAPI (High-performance asynchronous API).
  • AI & Orchestration: Google Gemini 1.5 Pro, LangChain, LangGraph (State-machine for agent orchestration).
  • Search API: Tavily API for optimized LLM-based web search.
  • Database: PostgreSQL (via psycopg2) for scalable, production-grade storage of users, workspaces, and reports.
  • Frontend: React (via Vite) + TypeScript for type safety and speed.
  • Styling: TailwindCSS for utility-first, responsive design, featuring a premium Dark Mode.
  • Animations: Framer Motion for beautiful micro-animations, providing real-time visual feedback on agent activities.
  • DevOps & Deployment: Docker, GitHub Actions, Vercel, Render, Neon/Supabase.

The Multi-Agent Workflow

The core innovation of Nexus Research lies in its LangGraph-powered state machine. When a user submits a query, the system transitions through the following specialized nodes:

  • The Planner Agent: Analyzes the user's request and generates a step-by-step research plan. It identifies exactly what information needs to be gathered, breaking a broad topic into specific research vectors.
  • The Researcher Agent: Executes the Planner's strategy by formulating search queries, hitting the Tavily Search API, reading web pages, and accumulating raw data into the shared graph state.
  • The Fact-Checker Agent: Reviews the accumulated data against the original query. It verifies claims, highlights discrepancies, and identifies missing information. Crucially, if the data is insufficient or contradictory, the graph loops back to the Researcher agent to gather more specific data before proceeding.
  • The Writer Agent: Takes the verified facts and synthesizes them into a cohesive, structured markdown report. It ensures proper formatting, adds citations, and creates a highly readable final product.

UI/UX Design Philosophy

The user interface was designed to feel like a premium, professional tool:

  • Real-time Transparency: Through the AgentTracker component, users can watch the AI 'think'. The UI displays exactly which agent is currently active and what task they are performing, turning a 'black box' process into an engaging experience.
  • Focus-Driven Reading: The 'Paper Mode' strips away navigation and controls, centering the finalized research report on the screen—much like reading an academic paper or a Medium article.
  • Fluid Interactions: Framer Motion is utilized to smoothly transition between states (e.g., from the chat input phase to the active research phase, and finally to the report rendering phase).

Challenges & Technical Learnings

Managing State Across Agents: Passing context between multiple LLM calls can lead to token bloat. Using LangGraph allowed for a strictly typed State object that gets updated incrementally, ensuring that the Writer agent only sees the synthesized facts and not the noise of raw search results.

Preventing Hallucinations: Initial prototypes occasionally generated plausible but false claims. The introduction of the independent Fact-Checker Agent created a deterministic loop that drastically reduced hallucinations, proving that LLMs perform better when evaluating other LLMs' outputs.

Handling Long-Running Requests: Because a deep research task can take 30-60 seconds, standard HTTP requests might time out. The architecture handles this through asynchronous processing and real-time status polling to keep the frontend updated without blocking the main thread.

Conclusion

Nexus Research demonstrates the transition from conversational AI to agentic AI. By orchestrating specialized agents to perform distinct roles, the system achieves a level of depth, accuracy, and reliability that a single LLM prompt cannot match. This project serves as a robust template for the future of automated enterprise research and intelligent workflows.