Get up and running with Sentinel in less than 5 minutes!
Sentinel is a Self-Healing Temporal Knowledge Graph that automatically:
- 📥 Scrapes and monitors web content
- 🧠 Extracts knowledge using AI
- 📊 Stores it in a temporal graph database
- 🔧 Automatically updates when content changes
- ⏰ Tracks how knowledge evolves over time
Before you begin, make sure you have:
- Python 3.11+ installed
- Docker installed and running (for Neo4j)
- Ollama installed (for local LLM) OR an OpenAI API key
pip install sentinel-core[all]Or for development:
git clone https://github.com/Om7035/Sentinel-The-Self-Healing-Knowledge-Graph
cd Sentinel-The-Self-Healing-Knowledge-Graph
pip install -e ".[all]"docker run -d \
--name neo4j \
-p 7474:7474 -p 7687:7687 \
-e NEO4J_AUTH=neo4j/password \
neo4j:latestWait ~30 seconds for Neo4j to start, then verify at http://localhost:7474
If you want to use a local LLM instead of OpenAI:
# Install Ollama from https://ollama.ai
ollama pull llama3
ollama servesentinel initThis interactive wizard will:
- ✅ Check your Docker installation
- ✅ Collect your API keys
- ✅ Generate a
.envfile - ✅ Verify all connections
Follow the prompts and you're done!
sentinel watch https://stripe.com/pricingThis will:
- Scrape the Stripe pricing page
- Extract entities and relationships using AI
- Store them in your Neo4j graph
sentinel ask "How much does Stripe cost?"Sentinel will query the knowledge graph and give you an answer based on what it learned.
sentinel statusSee your graph statistics, database connection, and scraper status.
import asyncio
from sentinel_core import Sentinel, GraphManager, GraphExtractor
from sentinel_core.scraper import get_scraper
async def main():
# Initialize components
graph = GraphManager()
scraper = get_scraper() # Auto-detects best available scraper
extractor = GraphExtractor(model_name="ollama/llama3")
# Create Sentinel instance
sentinel = Sentinel(graph, scraper, extractor)
# Process a URL
result = await sentinel.process_url("https://example.com")
print(f"Extracted {result['extracted_nodes']} nodes!")
# Query the graph
snapshot = graph.get_graph_snapshot()
print(f"Total nodes: {snapshot['metadata']['node_count']}")
# Clean up
graph.close()
if __name__ == "__main__":
asyncio.run(main())# Get help
sentinel --help
# Run a healing cycle (update stale knowledge)
sentinel heal --days 7
# See what would be healed without doing it
sentinel heal --dry-runStart the API server:
cd sentinel_platform/api
uvicorn main:app --reloadStart the frontend:
cd sentinel_platform/ui
npm install
npm run devVisit http://localhost:3000 to see your knowledge graph in 3D!
Edit your .env file to customize:
# Use OpenAI instead of Ollama
OLLAMA_MODEL=gpt-4
OPENAI_API_KEY=sk-...
# Use Firecrawl for premium scraping
FIRECRAWL_API_KEY=fc-...
# Customize Neo4j
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your-passwordMake sure Docker is running and Neo4j is started:
docker ps # Should show neo4j container
docker logs neo4j # Check for errorsMake sure Ollama is running:
ollama serve
# In another terminal:
ollama list # Should show your modelsThe local scraper should always work. If you see this error:
pip install beautifulsoup4 markdownify requests- 📖 Full Documentation
- 💬 GitHub Issues
- 📧 Email: speedtech602@gmail.com
- ⏰ Time Travel: Query your graph at any point in the past
- 🔧 Self-Healing: Automatic updates when content changes
- 🌐 Multi-Source: Combine knowledge from multiple websites
- 🤖 RAG Pipelines: Use Sentinel as a knowledge base for your AI apps
Happy graphing! 🎉