Autonomous Engineering

CodeMind

The Ultimate Premium Coding AI Chatbot & Autonomous Software Engineering Agent

Designed to execute complex coding instructions inside a secure sandbox workspace, CodeMind can build any software, app, or project with accuracy. It orchestrates a full ReAct loop, analyzing directory files, parsing dependencies, executing terminal runs, and recursively correcting errors until unit tests pass.

codemind-agent.log

[System] Initializing local environment checks...

[OK] Ollama server detected (v0.1.48)

[OK] Model qwen2.5-coder:7b verified

$ user: "Fix the layout bug in index.html"

> [Think] Analyzing file structure... Searching for index.html

> [Tool Call] list_dir(DirectoryPath="src/")

[Tool Response] Found 4 files: index.html, style.css, app.js, api.js

> [Think] Let's read index.html to find class mismatches

> [Tool Call] read_file(FilePath="src/index.html")

> [Plan] Modifying flex grid classes to fix alignments

> [Tool Call] write_file(FilePath="src/index.html", content="...")

> [System] File patched successfully. Initiating verification build...

> [Tool Call] run_command(CommandLine="npm run test")

[OK] All 4 unit tests passed! Self-healing completed.

> Agent: "Task successfully completed. The layout alignments are fixed."

100% Private

Zero Cloud Data Leakage

Self-Healing

Iterative Test Correction

Dynamic Routes

Intelligent Model Resolver

SEO Audit Engine

Concurrent Crawler & Analysis

Architectural Workflow

Client Web UI Obsidian Dark (HTML/JS) FastAPI Backend Session & Auth Layer WS Stream SQLite Session DB codemind.db Agent Tool Executor Read/Write & Terminal LLM Client Manager Dynamic Dispatch Loop Ollama Service qwen2.5-coder:7b (Local) OmniRoute Gateway Claude 3.5 / DeepSeek R1

Core Modules & Mechanics

Unified LLM Dispatcher (`llm_client.py`)

Manages direct completions for both local Ollama APIs and complex routing gateways. Evaluates model capabilities dynamically, streams reasoning parameters in real-time, and handles rates and local memory swapping transparently.

Self-Healing Fallback Engine

If a dynamic model route errors out, times out (10s connection cap), or yields 0 tokens due to VRAM overflow, CodeMind transparently switches targets down the fallback queue (`auto/best-fast` → `qwen2.5-coder:7b` → `llama3.2:1b`), preserving historical session states.

Deep SEO Crawling Engine (`seo_audit.py`)

Includes a multi-threaded web crawler that analyzes tags, heading layouts, images, and weights of static assets. Integrates metadata reports and provides structured refactoring actions directly back into the LLM context.

Startup Diagnostics & Autostart

Performs automatic diagnostic checks on boot (detecting Node.js, NPM, Ollama, and OmniRoute). If the OmniRoute service isn't running, the system silently initializes the gateway service in the background, minimizing friction.

Model Routing Configuration

Configuration Option Target Backend Fallback Chain Ideal Use Case
Let CodeMind decide OmniRoute Gateway `auto/best-fast` → `qwen2.5-coder:7b` → `llama3.2:1b` Complex coding, deep-thinking reasoning and refactoring
OmniRoute Custom Endpoint None (Gateway handled) Custom API proxy routing with custom API keys
qwen2.5-coder:7b Local Ollama None (Fails immediately) 100% offline, privacy-critical, local GPU runs

Understanding Models & Credentials

CodeMind offers a flexible backend architecture that lets you run either entirely local models or connect to cloud API gateways.

Default Out-of-the-Box Setup

Local qwen2.5-coder:7b (Ollama)

This is the default configuration. It requires **zero API keys and zero internet access**. All prompts, file reads, writes, and reasoning steps are processed 100% locally on your machine via Ollama, guaranteeing absolute code privacy.

Optional Choice

OmniRoute Intelligent Gateway

**OmniRoute** is an advanced local routing gateway that dynamically dispatches coding tasks to the best cloud model (e.g., Claude 3.5 Sonnet or DeepSeek R1) depending on the complexity of your request. It is completely optional.

How to get an OmniRoute API Key:
  1. Register or log in to the **OmniRoute platform** to retrieve your unique **API Key** and **Endpoint Base URL**.
  2. Open CodeMind, click **"LLM Settings"** in the sidebar, select **"Let CodeMind decide"** or **"OmniRoute"**, and click **"Edit Credentials..."** to enter them.
  3. For support, hosting assistance, or key management, contact **Subhamoy Bhattacharjee** (Chief Engineer, SB Tech) for priority integration support.

Quick Start Guide

1. Install Ollama and pull local model

ollama pull qwen2.5-coder:7b

2. Install python dependencies

pip install -r requirements.txt

3. Run launcher script

run.bat