File size: 2,609 Bytes
a5e64df
 
3e0f245
 
 
a5e64df
3e0f245
a5e64df
 
 
3e0f245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
title: Web Research Agent
emoji: πŸ”Ž
colorFrom: gray
colorTo: red
sdk: docker
app_port: 7860
pinned: false
---

# Web Research Agent πŸ”Ž

Ask a question β†’ get a **cited briefing** built from live web sources you can verify β€” then **dig deeper**
into any claim, section, or source, in your own words, and it appends an expandable research branch.

> Project **#13** of the *"30 AI Projects in 15 Days"* build-in-public challenge.
> Focus: **multi-step agent orchestration** (plan β†’ search β†’ read β†’ reflect β†’ cite).

## What makes it different
Most research tools hand you a static answer. This one is **explorable**: click *dig deeper* on any
citation, highlighted sentence, or source, type what you want investigated, and it spawns a scoped
research pass rendered inline as a branch β€” which you can dig into again. A recursive research tree.

## How it works (honest by construction)
- **Plan** β€” the question is broken into targeted search queries.
- **Search** β€” keyless, multi-source: general web (DuckDuckGo / SearXNG / Bing) + Google News, and for
  the *technical* area, arXiv + GitHub. No API keys required.
- **Read** β€” top results are fetched and extracted to clean text (redirects resolved, SSRF-guarded).
- **Reflect** β€” deep mode critiques its own draft for gaps and runs another round.
- **Cite** β€” the writer uses ONLY the sources it actually read, cites every claim inline `[n]`, and
  says what's missing rather than inventing. Citations render as **domain chips**; click one for the
  supporting passage.

## Modes & areas
- **Modes:** `quick` (search β†’ read β†’ cited answer) Β· `deep` (plan β†’ gather β†’ reflect β†’ report).
- **Areas:** `web` Β· `opportunity` Β· `technical` (adds arXiv + GitHub) Β· `competitive` Β· `client` β€”
  each blends the right sources.

## Run it
```bash
pip install -r requirements.txt
python app.py                    # http://127.0.0.1:7860  (web UI)
python agent.py "your question" --mode deep --area technical   # CLI
# Backend: local Ollama by default (free/private); set RESEARCH_LLM_BACKEND=claude + ANTHROPIC_API_KEY for cloud.
# Optional: RESEARCH_SAVE=1 banks each brief to a memory store so research compounds (local use).
```

## Two tiers
- **This hosted demo** narrates with a hosted model, keyless search.
- **GritAI Studio** runs the whole thing on your own local GPU fleet β€” free per-run, fully private β€”
  and can bank every brief to your own knowledge base so research compounds over time.

---
Built by **Robert Lucyk** Β· [GritAI Solutions](https://gritai.solutions) Β· part of the 30-in-15 challenge.