Skip to content

DexopT/ThreadMind

Repository files navigation

ThreadMind Banner

ThreadMind: The Autonomous Intelligence Framework

ThreadMind is a high-performance, modular AI agent framework built with TypeScript. Engineered for extreme reliability, deep technical integration, and autonomous project lifecycle management.


πŸ—οΈ Architecture

ThreadMind operates on a Gateway-Loop architecture, ensuring asynchronous safety and real-time streaming capabilities.

System Overview

graph TD
    User([πŸ’¬ Telegram User]) -->|Message / Command| Gateway[🚦 Gateway Router]
    
    subgraph ThreadMind Core
    Gateway -->|Queue & Serialize| AgentLoop[🧠 Agent ReAct Loop]
    AgentLoop -->|Dynamic Binding| ProviderHub[πŸ”Œ Provider Hub]
    
    ProviderHub -->|API Request| Anthropic(Anthropic)
    ProviderHub -->|API Request| OpenAI(OpenAI)
    ProviderHub -->|API Request| Google(Google Gemini)
    ProviderHub -->|API Request| OpenCode(OpenCode / Zen)
    end
    
    AgentLoop <-->|Invoke| Tools[πŸ› οΈ Tool Execution Engine]
    
    subgraph System Integrations
    Tools <-->|Manage Container| Docker[🐳 Docker Sandbox Environment]
    Tools <-->|Add/Search FTS5| MemoryDatabase[(πŸ’Ύ SQLite Hybrid Memory)]
    Tools -->|Compile & Zip| VibeCoding[πŸ’» Vibe Coding Exporter]
    end
    
    Gateway -.->|AbortController /stop| AgentLoop
Loading

Memory Hierarchy

graph LR
    subgraph SQLite
        Core[Core: Facts/Prefs]
        Episodic[Episodic: History]
    end
    subgraph JSON
        Semantic[Semantic: Knowledge Graph]
    end
    Memory[🧠 Hybrid Memory Manager] --> Core
    Memory --> Episodic
    Memory --> Semantic
    Episodic -->|FTS5| Search[Semantic Search]
Loading

πŸš€ Key Features

  • πŸ’» Vibe Coding: Generates complete, contextually aware projects, packages them into ZIP files, and delivers them instantly.
  • 🐳 Docker Sandbox: Isolated Debian-based execution environment with auto-recovery and configurable RAM/CPU limits to prevent OOM.
  • 🧠 Hybrid Memory: Context-aware persistent storage using SQLite FTS5 and graph-based relationships with intelligent forgetting curves.
  • πŸ”Œ Provider Swapping: Hot-swap between top-tier LLMs without restarting the system.
  • πŸ” Researcher Swarm: Autonomous sub-agents that synthesize web information into high-density insights.

πŸ’» System Requirements

  • OS: Windows 10/11 (PowerShell), macOS, or Linux (Ubuntu/Debian recommended).
  • Node.js: v18.0.0 or higher.
  • Docker: Desktop (Windows/Mac) or Engine (Linux) β€” Required for Sandbox features.
  • RAM: Minimum 4GB (8GB+ recommended for heavy compilation in Docker).
  • Disk: 1GB minimum for SQLite and Docker images.

πŸ› οΈ Installation Guide

πŸͺŸ Windows Setup (PowerShell)

  1. Clone the Repo:
    git clone https://github.com/DexopT/ThreadMind.git
    cd ThreadMind
  2. Install Dependencies:
    npm install
  3. Environment Config:
    copy .env.local.example .env
    # Open .env and fill in your API keys
  4. Launch:
    npm start

🐧 Linux / macOS Setup (Bash)

  1. Clone the Repo:
    git clone https://github.com/DexopT/ThreadMind.git
    cd ThreadMind
  2. Install Dependencies:
    npm install
  3. Environment Config:
    cp .env.local.example .env
    # Edit .env with your favorite editor
  4. Launch:
    npm start

πŸ›‘οΈ Special Abilities & Constraints

Special Abilities

  • Isolated Execution: Every line of code the agent writes is tested for you in a locked-down container.
  • Bulletproof UX: Uses a custom HTML serializer to bypass communication platform parsing limits.
  • Global Abort: Stop any reasoning or tool process instantly with /stop.

Performance Constraints

  • Resource Limits: Configurable in src/tools/docker.ts to manage CPU/RAM footprints.
  • Token Ceiling: Automatically compresses history after 40 messages to maintain speed.
  • Latency: Deep research swarms may take 10-30 seconds depending on web scraping complexity.

πŸ“¦ Project Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/           # Gateway, Providers, Middleware
β”‚   β”œβ”€β”€ features/       # Advanced Logic (Immune System, Causal Graphs)
β”‚   β”œβ”€β”€ tools/          # System Interfaces (Docker, FS, Web)
β”‚   β”œβ”€β”€ memory/         # Persistence (SQLite, JSON)
β”‚   └── channels/       # Adapters (Telegram, Web)
β”œβ”€β”€ data/               # Persistent data (Ignored by Git)
└── extension/          # Chrome Extension source

Contact Me At: https://t.me/k3xopt

ThreadMind: Secure. Reliable. Autonomous. Built for the future of engineering.

About

AI Agent Framework For Vibe Coders & Others !

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors