Skip to content

Spyro000/ml-rag-agent-langgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG Agent with LangGraph

This project is built to test the capabilities of RAG agents in potential real-world applications. In this case, it allows the user to ask questions about specific products, and RAG agents will answer them using knowledge extracted from the product documentation. For testing purposes, I used the Grandstream User Guide for GRP261x/GRP262x/GRP263x series VoIP phones. But it can be easily adapted to any other documentation source.

The project uses Playwright, BeautifulSoup, and Chroma to parse documentation from the web page and prepare the vector database.

The RAG agent is built using LangGraph. The LLM used for the agent and embeddings is Gemini.

Backend: FastAPI
Frontend: Vue 3, Tailwind CSS, daisyUI

Feel free to copy and modify the code for your own purposes.


Requirements

  • Docker & Docker Compose
  • (Alternatively) Python 3.12+ and Node.js 22+

Environment Variables

Create a .env file in the root folder with the following content:

GOOGLE_API_KEY=your_api_key_here

You can obtain a Google API key from the Get a Gemini API key.

Quick Start with Docker

Start Docker containers (from the root folder):

docker compose up

Visit:

Stop Docker containers:

docker compose down

Manual Setup

Backend

cd backend
cp ../.env .env
python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
playwright install --with-deps
uvicorn main:app --host 127.0.0.1 --port 8000 --reload

Frontend

cd frontend
npm install
npm run dev

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published