Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 MindMirror AI

Private Offline Cognitive Reflection Intelligence Engine

An offline AI system that analyzes human thoughts, discovers cognitive patterns, and helps people understand their own thinking.

Python LLM Backend AI Privacy


🌌 Overview

MindMirror AI is a private offline cognitive intelligence engine designed to transform raw human thoughts into structured cognitive insights.

Traditional AI assistants are mainly built to answer questions, generate content, or complete tasks.

MindMirror explores a different direction:

Understanding the person behind the thought.

Instead of only asking:

"What should I do?"

MindMirror asks:

"Why am I thinking this way?"

The system analyzes multiple layers of human thinking:

  • Cognitive patterns
  • Emotional signals
  • Cognitive biases
  • Motivation
  • Personal growth
  • Reflection history

Everything runs locally.

No cloud processing.
No external AI APIs.
No data collection.

Your thoughts remain private.


🌠 Vision

Human thoughts are complex systems.

Every ambition, fear, decision, and goal contains hidden structures.

MindMirror explores the concept of:

AI-Assisted Self Observation

An AI system that does not replace human thinking.

An AI system that helps humans observe, understand, and improve their own thinking process.


✨ Core Intelligence Features

πŸͺž Cognitive Reflection Engine

MindMirror transforms unstructured thoughts into meaningful cognitive reflections.

It analyzes:

  • Main ideas
  • Hidden assumptions
  • Internal conflicts
  • Personal concerns
  • Deeper meanings
  • Repeated mental patterns

Example:

User Input

I feel behind others because they started earlier than me.

MindMirror Analysis

Ambition + social comparison + internal pressure + fear of falling behind

The goal is not to judge thoughts.

The goal is to make thinking patterns visible.


🧩 Cognitive Pattern Intelligence

MindMirror detects how a person approaches situations and decisions.

It identifies patterns such as:

  • Self-comparison
  • Perfectionism
  • Overthinking loops
  • Future-oriented thinking
  • Fear-based decisions
  • Internal conflicts
  • Growth mindset

By recognizing these patterns, users can better understand their own thinking process.


❀️ Emotional Signal Understanding

MindMirror extracts emotional signals from personal reflections.

It analyzes:

  • Stress
  • Pressure
  • Motivation
  • Curiosity
  • Confidence
  • Uncertainty
  • Fear of failure
  • Excitement and ambition

The system does not only detect emotions.

It studies how emotions influence thoughts and decisions.


⚠️ Cognitive Bias Detection

Human decisions can be affected by invisible thinking biases.

MindMirror identifies possible cognitive biases including:

  • Social comparison bias
  • Confirmation bias
  • Negative filtering
  • Overgeneralization
  • Scarcity mindset
  • Unrealistic expectations

MindMirror provides awareness and reflection.

It does not provide medical diagnosis.


πŸš€ Motivation Analysis

MindMirror analyzes the forces behind human goals.

It identifies:

  • Personal ambitions
  • Core values
  • Internal motivation
  • Long-term objectives
  • Reasons behind decisions

Understanding motivation helps users create better alignment between thoughts and actions.


πŸ“ˆ Personal Growth Evolution

MindMirror uses memory and reflection history to observe personal development.

It tracks:

  • Repeated thinking patterns
  • Changes in mindset
  • Strengths
  • Improvement areas
  • Learning direction
  • Personal evolution

Growth is not measured as perfection.

Growth is measured as continuous evolution.


πŸ’‘ Personalized Recommendations

After analyzing thoughts, MindMirror generates context-aware recommendations.

Examples:

  • Better thinking strategies
  • Learning approaches
  • Goal planning
  • Habit improvements
  • Reflection exercises
  • Personal development actions

Recommendations are generated from the user's own cognitive context.


🧬 System Architecture

                 User Thought

                      |
                      v

          Cognitive Intelligence Engine

                      |
       ---------------------------------

       |               |               |

       v               v               v

 Reflection      Pattern Analyzer   Memory System
 Engine

       |               |               |

       ---------------------------------

                      |

                      v

              Local LLM Reasoning

                      |

                      v

                 Qwen2.5 7B

                      |

                      v

                    Ollama

πŸ”₯ AI Processing Pipeline

Raw Human Reflection

          |

          v

Prompt Intelligence Layer

          |

          v

Local LLM Reasoning

          |

          v

Cognitive Feature Extraction

          |

          v

Structured Reflection

          |

          v

Semantic Memory Storage

          |

          v

Personal Evolution Profile

🧠 Memory System

MindMirror includes a personal memory architecture.

The system stores:

  • Previous reflections
  • Semantic context
  • Cognitive patterns
  • User insights
  • Evolution history

Memory allows the system to understand changes over time instead of analyzing every thought independently.


πŸ”’ Privacy First Architecture

Privacy is a fundamental design principle.

MindMirror runs completely locally using:

  • Ollama local inference
  • Qwen2.5 7B local language model
  • Local memory storage

The system does not use:

  • Cloud AI services
  • External APIs
  • Online databases
  • User tracking

Your personal reflections stay on your own machine.


πŸ› οΈ Technology Stack

Artificial Intelligence

  • Large Language Models
  • Natural Language Processing
  • Prompt Engineering
  • Cognitive Reasoning

Backend

  • Python
  • Ollama
  • Qwen2.5 7B

Interface

  • Streamlit

Memory

  • Semantic Memory
  • JSON Knowledge Storage
  • Reflection History
  • Cognitive Profiles

πŸ“‚ Project Structure

MindMirror-AI/

β”œβ”€β”€ app.py
β”œβ”€β”€ run_mindmirror.py
β”œβ”€β”€ requirements.txt
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ model.py
β”‚   β”œβ”€β”€ prompts.py
β”‚   β”œβ”€β”€ memory.py
β”‚   β”œβ”€β”€ semantic_memory.py
β”‚   β”œβ”€β”€ cognitive_model.py
β”‚   β”œβ”€β”€ patterns.py
β”‚   β”œβ”€β”€ evolution.py
β”‚   β”œβ”€β”€ profile.py
β”‚   └── ui_components.py
β”‚
β”œβ”€β”€ assets/
β”‚   └── mindmirror_ui.png
β”‚
└── README.md

⚑ Installation

Clone repository:

git clone https://github.com/QMA-Labs/MindMirror-AI.git

cd MindMirror-AI

Install dependencies:

pip install -r requirements.txt

Download local model:

ollama pull qwen2.5:7b

Start Ollama:

ollama serve

Run MindMirror:

streamlit run app.py

🎬 Example

User Thought

My mind is always busy thinking about the future.
I imagine many possible situations and cannot relax.

MindMirror Output

πŸͺž Cognitive Reflection

Future-oriented thinking can improve preparation and planning, but excessive scenario simulation may reduce the ability to enjoy the present moment.

🧩 Thinking Pattern

Predictive thinking and continuous scenario analysis.

❀️ Emotional Signal

Uncertainty and desire for control.

⚠️ Cognitive Bias

Focusing heavily on possible negative outcomes.

πŸ’‘ Recommendation

Create balance between future planning and present awareness.


πŸ“Έ Demo


πŸš€ Future Roadmap

Version 1.1

  • Improved semantic retrieval
  • Better memory reasoning
  • More accurate reflections

Version 2.0

  • Personal knowledge graph
  • Advanced cognitive evolution tracking
  • Multimodal memory

Version 3.0

  • Voice reflection
  • Multimodal understanding
  • Advanced personal AI companion architecture

🌍 Why MindMirror?

Most AI systems understand information.

MindMirror explores a different direction:

Understanding human thinking itself.

A future where AI is not only a productivity tool,

but also a tool for:

  • Self-awareness
  • Reflection
  • Personal growth
  • Human understanding

πŸ‘¨β€πŸ’» QMA Labs

Building practical AI systems focused on:

  • Local AI
  • Human-centered intelligence
  • Machine Learning
  • Future AI applications

⭐ If you believe AI can help humans understand themselves better, consider starring this repository.

About

A private offline AI cognitive reflection engine powered by local LLMs for analyzing thoughts, patterns, emotions, biases, and personal growth.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages