A powerful AI agent system that combines traditional RAG (Retrieval-Augmented Generation) with knowledge graph capabilities to analyze and provide insights about big tech companies and their AI initiatives.
- Hybrid Search: Combines vector similarity search with knowledge graph traversal
- Temporal Knowledge: Tracks how information changes over time
- Multi-LLM Support: Works with OpenAI, Ollama, Anthropic, Google Gemini, and more
- Streaming API: Real-time responses with Server-Sent Events
- Production Ready: Comprehensive testing, error handling, and monitoring
- AI Framework: Pydantic AI
- Knowledge Graph: Neo4j + Graphiti
- Vector Database: PostgreSQL + pgvector
- API: FastAPI
- LLM: Configurable (OpenAI, Ollama, etc.)
- Docker and Docker Compose
- 8GB+ RAM
- 20GB free disk space
git clone https://github.com/DavidMelamed/agentic-rag-knowledge-graph.git
cd agentic-rag-knowledge-graphcp .env.example .env
# Edit .env with your configuration# Linux/Mac
./deploy.sh
# Windows PowerShell
.\deploy-windows.ps1
# Windows Command Prompt
deploy-windows.bat# Create documents directory
mkdir -p documents
# Copy your markdown files or use samples
cp -r big_tech_docs/* documents/docker exec agentic-rag-app python -m ingestion.ingest# CLI Interface
docker exec -it agentic-rag-app python cli.py
# API (http://localhost:8058)
curl http://localhost:8058/healthThe system supports multiple LLM providers:
LLM_PROVIDER=openai
LLM_API_KEY=sk-your-key
LLM_CHOICE=gpt-4-miniLLM_PROVIDER=ollama
LLM_BASE_URL=http://ollama:11434/v1
LLM_CHOICE=qwen2.5:14b-instructLLM_PROVIDER=openrouter
LLM_API_KEY=your-openrouter-key
LLM_CHOICE=anthropic/claude-3-5-sonnetβββββββββββββββ βββββββββββββββ βββββββββββββββ
β FastAPI ββββββΆβ Pydantic ββββββΆβ LLM β
β Server β β AI Agent β β Provider β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β
βββββββββββββ΄ββββββββββββ
βΌ βΌ
βββββββββββββββ βββββββββββββββ
β PostgreSQL β β Neo4j β
β pgvector β β Graphiti β
βββββββββββββββ βββββββββββββββ
- Semantic: "What AI research is Google working on?"
- Relational: "How are Microsoft and OpenAI connected?"
- Temporal: "Show me the timeline of Meta's AI announcements"
- Complex: "Compare AI strategies of FAANG companies"
# Install dependencies
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run locally
python run-local.pypytest
pytest --cov=agent --cov=ingestion- Ensure Docker Desktop is running
- Linux/WSL: Add user to docker group:
sudo usermod -aG docker $USER
- Modify ports in
docker-compose.yml
- Increase Docker memory allocation (8GB+ recommended)
This project is based on the ottomator-agents repository.
Contributions are welcome! Please feel free to submit a Pull Request.
- Original project by coleam00
- Built with Pydantic AI, FastAPI, PostgreSQL, and Neo4j