Lumiin0us commited on
Commit
c77da8a
Β·
unverified Β·
1 Parent(s): 027bfe8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +75 -0
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AutoScholar
2
+
3
+ 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.
4
+ 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.
5
+
6
+ ---
7
+
8
+
9
+ ## How It Works
10
+
11
+ When a user submits a research topic, the agent runs through a graph of nodes β€” each responsible for one stage of the research process:
12
+ 1. Planner β€” The LLM breaks the topic into 3-4 specific sub-questions worth searching for independently.
13
+ 2. Search β€” Each sub-question is sent to the Tavily Search API, which returns clean, LLM-ready results including URLs and content snippets.
14
+ 3. Reader β€” The top URLs are fetched and parsed with BeautifulSoup, extracting the main body text and stripping unwanted data.
15
+ 4. 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.
16
+ 5. 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.
17
+
18
+ ---
19
+
20
+ ## Agent Graph
21
+
22
+ ```
23
+ [Planner] β†’ [Search] β†’ [Reader] β†’ [Synthesizer] β†’ [Reflection]
24
+ ↑ ↓
25
+ └──────────── re-search if needed β”€β”€β”€β”€β”€β”€β”€β”˜
26
+ ↓
27
+ END
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Project Structure
33
+
34
+ ```
35
+
36
+ AutoScholar/
37
+ β”œβ”€β”€ app/
38
+ β”‚ β”œβ”€β”€ agent/
39
+ β”‚ β”‚ β”œβ”€β”€ nodes/
40
+ β”‚ β”‚ β”‚ β”œβ”€β”€ planner.py
41
+ β”‚ β”‚ β”‚ β”œβ”€β”€ search.py
42
+ β”‚ β”‚ β”‚ β”œβ”€β”€ reader.py
43
+ β”‚ β”‚ β”‚ β”œβ”€β”€ synthesizer.py
44
+ β”‚ β”‚ β”‚ └── reflection.py
45
+ β”‚ β”‚ β”œβ”€β”€ graph.py
46
+ β”‚ β”‚ └── state.py
47
+ β”‚ └── streamlit.py
48
+ └── README.md
49
+
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Workflow
55
+
56
+ User Topic
57
+ ↓
58
+ Planner (LLM)
59
+ ↓
60
+ Tavily Web Search Γ— N sub-questions
61
+ ↓
62
+ BeautifulSoup Page Reader
63
+ ↓
64
+ Synthesizer (LLM)
65
+ ↓
66
+ Reflection (LLM)
67
+ ↓
68
+ Structured Report
69
+
70
+ ---
71
+
72
+ ## AutoScholar UI
73
+
74
+ <img width="388" height="642" alt="Screenshot 2026-03-12 at 11 15 39 AM" src="https://github.com/user-attachments/assets/8dce02eb-03e2-46f5-9ab6-5310cec131f6" />
75
+