2026-06-01 16:46:06 +00:00
2026-06-01 16:44:55 +00:00
2026-06-01 16:45:21 +00:00
2026-06-01 16:46:06 +00:00

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

# 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
S
Description
No description provided
Readme 29 KiB
Languages
Python 100%