commit 086b45e50f537df1dbb36b686230f3312dda0079 Author: Аделина Саттарова Date: Mon Jun 1 16:44:55 2026 +0000 add README diff --git a/README.md b/README.md new file mode 100644 index 0000000..644041d --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# RAG Agent with ChromaDB and Tavily + +This repository contains a simple RAG agent that uses **ChromaDB** as a local vector store and **Tavily** for web search. The agent can decide whether to answer from the local knowledge base or fetch fresh information from the internet. + +## Project structure +- `vectorstore.py` – utilities for creating/loading ChromaDB and adding documents. +- `tools.py` – two LangChain tools: local KB search and Tavily web search. +- `agent.py` – agent creation with routing logic. +- `main.py` – CLI chat loop. +- `documents/` – folder with sample `.txt` or `.md` files for the knowledge base. +- `requirements.txt` – dependencies (LangChain >1.0, chromadb, tavily-python, etc.). + +## Usage +```bash +# 1. Install dependencies +pip install -r requirements.txt + +# 2. Set Tavily API key +export TAVILY_API_KEY=your_key_here + +# 3. Load documents into ChromaDB (once) +python load_docs.py + +# 4. Run the chat interface +python main.py +```