A terminal-based AI research assistant built with Python, LangChain, OpenRouter, and Rich.
It can:
- Summarize webpages into study notes
- Chat with your saved notes via session memory
- Run entirely from the terminal
Load any webpage:
/url https://docs.langchain.com/The assistant:
- Downloads the webpage
- Extracts readable text
- Generates concise study notes
- Loads the notes into the current session
After loading a webpage:
> what is langchain?
> explain tools
> compare chains and agents
The assistant answers using the summarized notes as context.
Memory stores only the current session (URL, summary, and message history).
Starting a new URL overwrites the previous session. Exiting wipes all memory.
When exiting:
/exitMemory is wiped immediately and the assistant exits.
git clone <your-repo-url>
cd web-loaderUsing UV:
uv syncOr manually:
uv add \
langchain \
langchain-openrouter \
beautifulsoup4 \
requests \
python-dotenv \
richCreate your environment file:
cp .env.example .envAdd your OpenRouter API key:
MISTRAL_API_KEY=your_api_key_hereStart the assistant:
uv run main.pyYou should see:
Web Research Assistant
Type /help
/url https://overthewire.org/wargames/bandit//help/exitweb-loader/
│
├── main.py
├── chatbot.py
├── chat.py
├── summarizer.py
├── memory.py
├── config.py
├── cli.py
│
├── data/
│ └── memory.json
│
├── .env.example
├── README.md
├── pyproject.toml
└── .gitignore
> /url https://overthewire.org/wargames/bandit/
(summary displayed in green panel)
> what does bandit teach?
(Answer displayed in cyan panel)
> /exit
Goodbye!
- PDF support
- YouTube transcript summarization
- Multi-document chat
- Vector database retrieval
- Local embeddings
- Streaming responses
- Export notes to Markdown
- Export notes to PDF
- Conversation history
- Multi-model support
- Source citations