Skip to content

AutoBrainLab/gemini-fullstack-langgraph-quickstart

 
 

Repository files navigation

Auto-Researcher

Auto-Researcher is an autonomous AI platform designed to automate the entire research lifecycle. It combines a sophisticated backend agent built with LangGraph and Google's Gemini models with a user-friendly interface (currently a web app, with a VS Code extension in development). The agent can take a single research topic, intelligently discover and manage academic literature, synthesize knowledge using a Retrieval-Augmented Generation (RAG) pipeline, and automatically generate a comprehensive, cited report.

Auto-Researcher

For a detailed view of our future plans, please see our Project Roadmap.

Features

  • 🤖 Autonomous Research Agent: Employs a multi-stage LangGraph agent to automate research from topic to final report.
  • 🧠 Reflective & Iterative Search: Intelligently generates search queries, reflects on results, and refines its strategy to cover knowledge gaps.
  • 📚 Automated Literature Management: Discovers academic papers (Arxiv), finds open-access PDFs (Unpaywall), and automatically organizes them in a Zotero library.
  • ✍️ RAG-Powered Knowledge Synthesis: Builds a vector knowledge base from full-text papers to generate deep, context-aware insights.
  • 📄 Cited Report Generation: Produces a complete report on the research topic, fully supported by citations from the collected literature.
  • 🐳 Containerized & Ready-to-Run: A fully containerized environment using Docker for easy setup and consistent development.
  • 🔌 API-First & Extensible: Designed with a robust API, with a VS Code extension in development for a native research experience.

Project Structure

The project is divided into two main directories:

  • frontend/: Contains the React application built with Vite.
  • backend/: Contains the LangGraph/FastAPI application, including the research agent logic.

Getting Started (Docker Recommended)

This guide provides the recommended setup using Docker for a consistent and reproducible development environment.

1. Prerequisites:

  • Docker and Docker Compose: Ensure they are installed on your system.
  • LLM Provider Configuration: The backend agent uses litellm to support various LLM providers (e.g., Google Gemini, OpenAI, Azure). You need to configure the API key and model names in the .env file.
    1. Create a file named .env in the project root by copying the .env.example file.
    2. Open the .env file and add the API key for your chosen provider. For example, for Gemini:
      GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
      Or for OpenAI:
      OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
    3. (Optional) Specify the generation and embedding models. The defaults are gemini-1.5-flash and embedding-001. You can override them:
      GENERATION_MODEL="gemini-1.5-pro"
      EMBEDDING_MODEL="text-embedding-004"

2. Build and Run Services:

Run the following command to build the container images and start all services in detached mode:

make dev-docker

3. Accessing the Application:

Once the containers are running:

  • The React Frontend will be available at http://localhost:5173.
  • The Backend API will be available at http://localhost:8000.
  • The FastAPI/LangGraph UI can be accessed at http://localhost:8000/docs.

4. Testing the Setup:

To verify that everything is working correctly, you can run the test suite.

  • Run Unit & Integration Tests:

    make test-backend-docker
  • Run the End-to-End (E2E) Test:

    make test-e2e-docker TOPIC="The impact of AI on climate change"

For the full E2E testing methodology (streaming phases, enhanced script, snapshot template), see the E2E Testing Framework section in GEMINI.md.

Alternative: Local Setup without Docker

If you prefer not to use Docker, you can set up and run the servers locally.

  1. Follow the prerequisite steps in the CONTRIBUTING.md guide to install dependencies.
  2. Run make dev-local from the root directory to start both frontend and backend servers with hot-reloading.

How the Backend Agent Works

The core of the backend is a LangGraph agent that follows a sophisticated, multi-stage workflow for automated research. For a detailed explanation of the agent's architecture and state transitions, please see the technical documentation.

graph TD
    A[Start] --> B(1. generate_initial_queries);
    B -- fan-out --> C((2. execute_searches in parallel));
    C -- join results --> D{3. reflection_and_refinement};
    subgraph Research Loop
        D -- needs more info --> C;
    end
    D -- info is sufficient --> E(4. automated_resource_management);
    E --> F(5. rag_based_knowledge_synthesis);
    F --> G(6. automated_report_generation);
    G --> H[End];
Loading

Technologies Used

Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for details on our testing process, code style, and submission guidelines.

License

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

About

Get started with building Fullstack Agents using Gemini 2.5 and LangGraph

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 37.6%
  • Jupyter Notebook 37.1%
  • TypeScript 14.5%
  • Shell 4.8%
  • CSS 1.8%
  • Makefile 1.6%
  • Other 2.6%