Skip to content

AjayRajan05/MindGraph-OS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 MindGraph OS

The AI Workspace That Thinks With You, Not Just For You

Python FastAPI Neo4j Qdrant Ollama License

MindGraph OS is an AI-powered knowledge operating system that transforms documents, codebases, and research into a living knowledge graph with autonomous reasoning agents.

Unlike traditional RAG systems that simply retrieve text, MindGraph OS builds a temporal knowledge graph of your ideas, tracks how your thinking evolves over time, detects contradictions, and proactively surfaces insights.

It acts as a second brain for developers, researchers, and teams.


πŸš€ Core Idea

Most AI tools work like this:

User Question
     ↓
Vector Search
     ↓
LLM Answer

MindGraph OS introduces knowledge reasoning:

Documents + Code + Notes
        ↓
Embedding Index (Qdrant)
        ↓
Knowledge Graph (Neo4j)
        ↓
Autonomous AI Agents
        ↓
Insight Generation
        ↓
Human Decision Making

This turns a static knowledge base into a self organizing intelligent system.


✨ Key Features

πŸ“š Multi-Source Knowledge Ingestion

MindGraph can ingest and understand:

  • PDFs
  • Markdown notes
  • Plain text documents
  • Entire GitHub repositories
  • Python codebases

It automatically extracts concepts, relationships, and structures.


🧩 Temporal Knowledge Graph

Every concept is stored with timestamps.

You can ask:

  • β€œHow has my understanding of transformers evolved?”
  • β€œWhen did this concept first appear in my research?”
  • β€œWhat knowledge has become outdated?”

Graph nodes store:

Concept
Chunk
Document
Contradiction

Relationships:

MENTIONS
RELATED_TO
INVOLVES
BELONGS_TO

πŸ€– Autonomous AI Agents

MindGraph includes background AI agents that continuously analyze your knowledge base.

Contradiction Agent

Detects conflicting information between documents.

Example:

Doc A: Transformers outperform CNNs
Doc B: CNNs outperform Transformers

Agent flags:

⚠️ Knowledge Conflict Detected

Connection Discovery Agent

Finds hidden relationships between ideas.

Example:

Graph Neural Networks
        ↕
Knowledge Graph Embeddings

Knowledge Staleness Agent

Identifies knowledge that hasn't been updated recently.

Example:

Concept last updated: 92 days ago
Status: STALE

🧠 GraphRAG (Graph + Vector Retrieval)

Traditional RAG:

Vector search only

MindGraph uses hybrid retrieval:

Vector similarity (Qdrant)
       +
Graph traversal (Neo4j)

This allows context-aware reasoning across documents.


πŸ§‘β€πŸ’» Codebase Intelligence

MindGraph can analyze entire GitHub repositories.

Using tree-sitter, it extracts:

  • classes
  • functions
  • module structure
  • imports

This enables queries like:

Explain this repository architecture

or

Where is authentication implemented?

⚑ Real-Time Insight Notifications

Background agents push insights using WebSockets.

Examples:

⚠️ Contradiction detected in research notes

πŸ”— New connection discovered between concepts

πŸ“‰ Knowledge staleness detected

These insights appear instantly in the UI.


πŸ“Š Knowledge Debt Report

MindGraph can generate a Knowledge Debt Report summarizing:

  • contradictions
  • outdated knowledge
  • missing conceptual connections

This helps researchers and engineers maintain clean knowledge structures.


Feature Comparison

Feature Traditional RAG MindGraph OS
Vector Search βœ… βœ…
Knowledge Graph ❌ βœ…
Temporal Knowledge Tracking ❌ βœ…
Contradiction Detection ❌ βœ…
Autonomous Agents ❌ βœ…
Codebase Understanding ❌ βœ…
Real-time Knowledge Insights ❌ βœ…

πŸ— Architecture

                    Streamlit UI
                         β”‚
                  WebSocket Updates
                         β”‚
                       FastAPI
                         β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚               β”‚               β”‚
      Qdrant           Neo4j           Redis
   (Vector DB)     (Knowledge Graph)   (Cache)
         β”‚
         β”‚
      Ollama
(Local LLM + Embeddings)

Autonomous Agents

 β”œβ”€β”€ Contradiction Agent
 β”œβ”€β”€ Connection Agent
 β”œβ”€β”€ Staleness Agent
 └── Knowledge Debt Generator

🧰 Tech Stack

Backend

  • FastAPI – high-performance async API
  • Python 3.11

Databases

  • Qdrant – vector database
  • Neo4j – graph database
  • Redis – caching and pub/sub

AI

  • Ollama – local LLM runtime
  • Llama3 / Mistral / Phi3
  • nomic-embed-text embeddings

Code Analysis

  • tree-sitter

Graph Reasoning

  • LangGraph

Frontend

  • Streamlit

πŸ“‚ Project Structure

mindgraph-os
β”‚   |
β”‚   |── api
β”‚   β”‚   β”œβ”€β”€ upload.py
β”‚   β”‚   β”œβ”€β”€ query.py
β”‚   β”‚   β”œβ”€β”€ graph.py
β”‚   β”‚   └── ws.py
β”‚   β”‚
β”‚   β”œβ”€β”€ agents
β”‚   β”‚   β”œβ”€β”€ contradiction_agent.py
β”‚   β”‚   β”œβ”€β”€ connection_agent.py
β”‚   β”‚   β”œβ”€β”€ staleness_agent.py
β”‚   β”‚   └── workflow.py
β”‚   β”‚
β”‚   β”œβ”€β”€ services
β”‚   β”‚   β”œβ”€β”€ parser.py
β”‚   β”‚   β”œβ”€β”€ chunker.py
β”‚   β”‚   β”œβ”€β”€ embedder.py
β”‚   β”‚   β”œβ”€β”€ graph_builder.py
β”‚   β”‚   β”œβ”€β”€ retriever.py
β”‚   β”‚   β”œβ”€β”€ generator.py
β”‚   β”‚   └── github_ingestor.py
β”‚   β”‚
β”‚   └── db
β”‚   |   β”œβ”€β”€ qdrant_client.py
β”‚   |   └── neo4j_client.py
β”‚   └── app.py
β”‚
└── docker-compose.yml

βš™οΈ Installation

1️⃣ Clone Repository

git clone https://github.com/yourusername/mindgraph-os.git

cd mindgraph-os

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Start Databases

docker compose up -d

This starts:

  • Neo4j
  • Qdrant
  • Redis

4️⃣ Install Ollama Models

ollama pull llama3
ollama pull nomic-embed-text

5️⃣ Start Backend

uvicorn app.main:app --reload

6️⃣ Start Frontend

streamlit run app.py

πŸ’¬ Example Queries

Once running, you can ask:

Explain this research paper
What contradictions exist in my knowledge?
Explain this GitHub repository architecture
Which concepts in my research are outdated?

πŸ§ͺ Example Use Cases

AI Research Assistant

Track how your understanding of topics evolves.


Codebase Intelligence

Analyze large repositories with natural language.


Knowledge Management

Maintain a living knowledge graph of ideas.


πŸ›£ Roadmap

Planned upgrades:

  • Multi-tenant collaboration
  • Knowledge personas (researcher / engineer modes)
  • Graph visualization with D3
  • Autonomous research agents
  • arXiv paper ingestion
  • citation graph analysis
  • real-time knowledge dashboards

🀝 Contributing

Contributions are welcome!

Steps:

  1. Fork the repository
  2. Create a feature branch
  3. Commit changes
  4. Open a pull request

Please follow clean code practices and include tests when possible.


πŸ“œ License

MIT License.

You are free to use this project for research, commercial products, or learning.


🌟 Inspiration

MindGraph OS was inspired by the idea that:

Knowledge should not just be stored β€” it should evolve, reason, and challenge itself.


⭐ If You Like This Project

Please consider starring the repository and sharing it with others.

It helps the project grow and motivates further development.


MindGraph OS: Where your knowledge becomes intelligent.

About

MindGraph OS: An AI powered knowledge operating system that transforms documents and codebases into a living temporal knowledge graph with autonomous reasoning agents.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages