🧠 NexusMind
Intelligent Scientific Reasoning through Graph-of-Thoughts
🔍 Overview
NexusMind leverages graph structures to perform sophisticated scientific reasoning. It implements the Model Context Protocol (MCP) to integrate with AI applications like Claude Desktop.
Key highlights:
- Process complex scientific queries using graph-based reasoning
- Dynamic confidence scoring with multi-dimensional evaluations
- Built with modern Python and FastAPI for high performance
- Dockerized for easy deployment
- Modular design for extensibility and customization
🌟 Key Features
8-Stage Reasoning Pipeline
The core reasoning process follows a sophisticated 8-stage pipeline:
- 🌱 Initialization
- Creates root node from query
- Establishes initial graph structure
- Sets confidence baseline
- 🧩 Decomposition
- Breaks query into dimensions
- Identifies key components
- Creates dimensional nodes
- 🔬 Hypothesis/Planning
- Generates multiple hypotheses
- Creates reasoning strategy
- Establishes falsification criteria
- 📊 Evidence Integration
- Gathers supporting evidence
- Links evidence to hypotheses
- Updates confidence scores
- ✂️ Pruning/Merging
- Removes low-value elements
- Consolidates similar nodes
- Optimizes graph structure
- 🔍 Subgraph Extraction
- Identifies relevant portions
- Focuses on high-value paths
- Creates targeted subgraphs
- 📝 Composition
- Synthesizes key findings
- Creates coherent insights
- Generates comprehensive answer
- 🤔 Reflection
- Evaluates reasoning quality
- Identifies improvement areas
- Final confidence assessment
Technical Capabilities
- 🧠 Graph Knowledge Representation: Uses
networkx
to model complex relationships - 🔄 Dynamic Confidence Vectors:
- Empirical support
- Theoretical basis
- Methodological rigor
- Consensus alignment
- 🔌 MCP Server: Seamless Claude Desktop integration
- ⚡ High-Performance API: Modern FastAPI implementation
- 🐳 Easy Deployment: Docker & Docker Compose support
- 🧩 Extensible Architecture: Modular components for customization
- ⚙️ Flexible Configuration: Pydantic & YAML configuration
🛠️ Technology Stack
📂 Project Structure
asr-got-reimagined/
├── config/
│ ├── settings.yaml
│ └── claude_mcp_config.json
├── src/asr_got_reimagined/
│ ├── api/
│ │ ├── routes/
│ │ │ └── mcp.py
│ │ └── schemas.py
│ ├── domain/
│ │ ├── models/
│ │ │ ├── common.py
│ │ │ ├── graph_elements.py
│ │ │ └── graph_state.py
│ │ ├── services/
│ │ │ └── got_processor.py
│ │ ├── stages/
│ │ │ ├── base_stage.py
│ │ │ ├── stage_1_*.py
│ │ │ └── stage_2_*.py...
│ │ └── utils/
│ ├── main.py
│ └── app_setup.py
├── scripts/
├── Dockerfile
├── docker-compose.yml
└── pyproject.toml
🚀 Getting Started
Prerequisites
- Python 3.13+ (Docker image uses Python 3.13.3-slim-bookworm)
- Poetry: For dependency management
- Docker and Docker Compose: For containerized deployment
Installation and Setup (Local Development)
- Clone the repository:
git clone https://github.com/SaptaDey/NexusMind.git
cd asr-got-reimagined
- Install dependencies using Poetry:This creates a virtual environment and installs all necessary packages specified in
pyproject.toml
. - Activate the virtual environment:
- Configure the application:
- Adjust settings in
config/settings.yaml
as needed - Configure environment variables or a
.env
file for sensitive information
- Run the development server:
python src/asr_got_reimagined/main.py
Alternatively, for more control:uvicorn asr_got_reimagined.main:app --reload --host 0.0.0.0 --port 8000
The API will be available at http://localhost:8000
.
Docker Deployment
- Build and run the Docker containers:
docker-compose up --build
For detached mode:docker-compose up --build -d
The Docker image uses Python 3.13.3-slim-bookworm as the base image for improved performance and security. - Access the API:
The API will be accessible at
http://localhost:8000
(or as configured in docker-compose.yml
).
🔌 API Endpoints
Core Endpoints
- MCP Endpoint:
POST /mcp
- For communication with MCP clients like Claude Desktop
- Implements the Model Context Protocol for AI interaction
- Health Check:
GET /health
- Basic health check for monitoring and service discovery
Additional Endpoints (Planned)
- Graph Query:
POST /api/graph/query
- Direct interface for ASR-GoT queries
- Graph State:
GET /api/graph/{session_id}
- Retrieve current state of a reasoning graph
- Analytics:
GET /api/analytics/{session_id}
- Get metrics about the reasoning process
🧪 Testing & Quality
- Type Safety:
- Configured with
mypy.ini
and pyrightconfig.json
- Fix logger type issues with
python scripts/add_type_hints.py
- Code Quality:
- Fully typed codebase with type annotations
- Pre-commit hooks available:
poetry run pre-commit install
- Automated formatting with Ruff