Spaces:
Sleeping
license: mit
title: AutoScholar
sdk: docker
pinned: false
AutoScholar
AutoScholar is an autonomous multi-step research agent/assistant built with LangGraph. Given any research topic, it plans a search strategy, queries the web, reads and extracts content from sources, and formulates a structured, cited report β without any manual intervention. It uses a self-reflection loop to evaluate the quality of its output and automatically re-searches if the report doesn't fully answer the original question.
How It Works
When a user submits a research topic, the agent runs through a graph of nodes β each responsible for one stage of the research process:
- Planner β The LLM breaks the topic into 3-4 specific sub-questions worth searching for independently.
- Search β Each sub-question is sent to the Tavily Search API, which returns clean, LLM-ready results including URLs and content snippets.
- Reader β The top URLs are fetched and parsed with BeautifulSoup, extracting the main body text and stripping unwanted data.
- Synthesizer β All gathered content is assembled into a prompt and sent to the LLM, which writes a structured report with an introduction, key findings, and conclusion.
- Reflection β The LLM evaluates whether the report fully answers the original question. If not, the agent loops back to the Search node with refined queries. The loop is capped at 2 iterations to prevent infinite cycles.
Agent Graph
[Planner] β [Search] β [Reader] β [Synthesizer] β [Reflection]
β β
βββββββββββββ re-search if needed ββββββββ
β
END
Project Structure
AutoScholar/
βββ app/
β βββ agent/
β β βββ nodes/
β β β βββ planner.py
β β β βββ search.py
β β β βββ reader.py
β β β βββ synthesizer.py
β β β βββ reflection.py
β β βββ graph.py
β β βββ state.py
β βββ streamlit.py
βββ README.md
Workflow
User Topic
β
Planner (LLM)
β
Tavily Web Search Γ N sub-questions
β
BeautifulSoup Page Reader
β
Synthesizer (LLM)
β
Reflection (LLM)
β
Structured Report