Skip to content

Repository files navigation

Agentic Research Assistant

Agentic Research Assistant is a Gradio chat app powered by LangChain and Groq. It reads webpages on demand, saves useful findings to local memory, and recalls those findings in later conversations.

The project is intentionally compact, but it is structured for extension: tools are isolated, the agent is separated from the UI, and the memory layer can later be replaced with a database, vector store, or multi-agent workflow.

Features

  • LangChain agent built with ChatGroq
  • Gradio chat interface with a clean theme
  • Research mode selector for websites, articles, research papers, and general research
  • Webpage reader tool using requests and BeautifulSoup
  • Persistent research notes saved to data/notes.json
  • Recall tool for saved findings
  • Package layout that can grow into a multi-agent assistant

Tech Stack

  • Python
  • Gradio
  • LangChain
  • Groq
  • BeautifulSoup

Project Structure

agentic-research-assistant/
  app.py
  agentic_research_assistant/
    agent.py
    config.py
    tools.py
    ui.py
  data/
    .gitkeep
  tests/
    test_project_structure.py
  .env.example
  requirements.txt

Setup

Create and activate a virtual environment:

python -m venv .venv
.venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt

Create your environment file:

copy .env.example .env

Then add your Groq API key to .env:

GROQ_API_KEY=your_groq_api_key_here

Run the app:

python app.py

Example Prompts

  • Read https://en.wikipedia.org/wiki/Large_language_model and save three key ideas.
  • Summarize this article in five bullets: https://example.com/article
  • Read this paper page and explain the method, findings, and limitations.
  • What findings have you saved so far?

How It Works

The Gradio UI sends chat turns and a selected research mode to the LangChain agent. The mode changes the response style without adding unnecessary complexity:

  • Website: page purpose, key facts, credibility, and practical takeaways
  • Article: main argument, supporting points, assumptions, and summary
  • Research Paper: problem, method, findings, limitations, and implications
  • General Research: balanced synthesis and next steps

The agent chooses between three tools:

  • read_webpage: fetches and extracts readable webpage text
  • save_finding: saves a useful finding to local JSON memory
  • list_findings: retrieves saved findings, optionally filtered by topic

Saved notes are written to data/notes.json, which is ignored by git so personal research notes do not get committed.

Notes

The research paper mode is designed for paper landing pages, abstracts, and web-accessible content. PDF parsing is intentionally left out of the first version to keep the project focused and reliable.

Extension Ideas

  • Add a source comparison tool for reading multiple webpages
  • Store notes in SQLite instead of JSON
  • Add separate research, memory, and synthesis agents
  • Add PDF parsing for research papers
  • Add export to Markdown
  • Add citations and source tracking for saved findings

About

LangChain and Gradio research assistant that reads webpages, saves findings, and recalls notes with persistent memory.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages