ThreadMind is a high-performance, modular AI agent framework built with TypeScript. Engineered for extreme reliability, deep technical integration, and autonomous project lifecycle management.
ThreadMind operates on a Gateway-Loop architecture, ensuring asynchronous safety and real-time streaming capabilities.
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
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]
- π» 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.
- 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.
- Clone the Repo:
git clone https://github.com/DexopT/ThreadMind.git cd ThreadMind
- Install Dependencies:
npm install
- Environment Config:
copy .env.local.example .env # Open .env and fill in your API keys - Launch:
npm start
- Clone the Repo:
git clone https://github.com/DexopT/ThreadMind.git cd ThreadMind - Install Dependencies:
npm install
- Environment Config:
cp .env.local.example .env # Edit .env with your favorite editor - Launch:
npm start
- 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.
- Resource Limits: Configurable in
src/tools/docker.tsto 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.
βββ 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.
