EdgeMind V1.0.3
Resource-Aware Agentic Coding Assistant for Local AI Software Engineering
"Building autonomous software engineering agents that run entirely on local consumer hardware."
๐ Problem Statement & Motivation
Modern AI coding assistants heavily rely on expensive cloud infrastructure, exposing proprietary code bases to third-party servers, incurring high latency, and requiring constant internet connectivity. Conversely, running autonomous coding agents locally on consumer hardware presents distinct challenges: limited system RAM, constrained compute, dynamic local model availability, and potential hallucinations or syntax errors.
EdgeMind resolves these challenges by combining:
- Edge AI & Local Inference: Powered by local Ollama LLMs with zero data leaving your machine.
- Intent-Driven Dual Routing: Distinguishes execution requests from conversational discussions and follow-ups.
- Agentic LangGraph Workflows: Multi-step graph orchestration with autonomous file discovery, structured planning, disk inspection, and retry recovery.
- Resource-Aware Dynamic Model Router: Automatically detects installed local models and matches tasks to available models without forcing unnecessary multi-GB downloads.
- Hardened Multi-Layer Verification: AST syntax parsing, atomic disk writes, path security boundaries, and automatic backup preservation.
โจ Core Features
- ๐ง Context-Aware Intent Routing: Automatically classifies queries into
EXECUTION(graph workflow),FOLLOW_UP(read-only change explanation), orCONVERSATIONAL(pair-programming mode). - โก Real-Time Activity Event Streaming: Live progress events (
โ Understanding request...,โ Found bad.java,โ Analyze โ Edit,โ Syntax valid) streamed directly to the CLI interface. - ๐ค Intelligent Local Model Manager: Auto-discovers installed Ollama models (
qwen2.5-coder,codellama,deepseek-coder,phi3,llama3), using available models without mandatory downloads. - ๐ ๏ธ Autonomous Code Creation & Modification: Intelligently infers whether to create new files (e.g.
bad.javaโbad.py) or modify existing source files in-place. - ๐ก๏ธ Hardened Verification & Safety: Disk-level post-write inspection, AST syntax validation, path traversal protection, and automatic backup directory isolation (
.edgemind/backups/). - ๐๏ธ Enriched SQLite Session Memory: Persists execution requests, plans, diffs, analysis findings, and verification results across interactive turns in
~/.edgemind/edgemind.db.
๐๏ธ System Architecture
๐ค Model & Ollama Architecture
EdgeMind uses a resource-aware model manager and router (app/models/model_router.py) that categorizes installed local Ollama models:
- Coding Workloads (
edit,modify,create,debug,deployment): Dynamically routes to installed coding models matchingcoder,code,starcoder,deepseek-coder,codellama, orqwen2.5-coder. Fallback default:qwen2.5-coder:3b. - Conversational & Planning Workloads (
planner,search,explain,conversational,follow_up): Dynamically routes to installed general models matchingphi3,llama3,mistral,gemma, orqwen. Fallback default:phi3:mini. - First-Run Resource Awareness: Evaluates available system RAM via
psutil. If no model is installed, recommends resource-appropriate fallbacks (qwen2.5-coder:3bfor $\ge 4\text{ GB RAM}$) and prompts before pulling.
๐๏ธ Dual-Layer Memory Architecture
- Short-Term Session Context (
SessionState): Tracks working directory, active file, active model, turn history, and pronoun references (it,that,this file) in-memory. - Persistent SQLite Memory (
task_history): Stored at~/.edgemind/edgemind.db. Records:- Project absolute path & query string
- Executed plan JSON & tool task names
- Source/target file paths & operation mode (
createvsmodify) - Truncated result output & generated unified diffs
- Execution success and verification status
๐ ๏ธ Intelligent Code Editing & Safety Mechanisms
- Edit Preview Generation:
EditingService.prepare_edit()generates modified code, parses AST/delimiters, and computes unified diffs before disk write. - Atomic File Writing:
FileManager.write_file()writes generated content to a temporary file in the target directory and replaces the destination atomically (Path.replace()), preserving file permission flags. - Security Path Traversal Boundary:
validate_project_path()rejects file operations outside project root boundaries or in forbidden directories (.git,.venv,node_modules). - Backup Isolation: Automatically copies modified files into
.edgemind/backups/, preserving relative directory hierarchy for instant rollback support.
โ๏ธ Installation & Setup
Option 1: Install via PyPI
pip install edgemind
To upgrade an existing installation:
pip install -U edgemind
Launch the interactive CLI shell:
edgemind
Option 2: Install from Source
git clone https://github.com/Akhilesh-Venkiteswaran/EdgeMind.git
cd EdgeMind
python3 -m venv venv
source venv/bin/activate
pip install -e .
๐ Prerequisites & Model Setup
- Install Ollama: Download from https://ollama.com and ensure
ollamais in your systemPATH. - Start Ollama Daemon:
ollama serve - Pull Recommended Local Model:
ollama pull qwen2.5-coder:3b
๐ก Usage Examples
Interactive CLI Shell
Launch the shell:
edgemind
Example 1: Code Conversion (File Creation)
EdgeMind > Convert bad.java to Python
โ Understanding request...
โ Identifying source file...
โ Found bad.java
โ Determining requested operation...
โ Analyze โ Edit
โ Creating execution plan...
โ 2 tasks planned
โ Generating Python implementation...
โ Generated bad.py
โ Validating generated code...
โ Python syntax valid
โ Reviewing changes...
โ Source preserved
Files Status:
Created : bad.py (NEW FILE)
Modified : None
Preserved: bad.java (UNTOUCHED)
Validation & Review:
โ Source file preserved: /path/to/bad.java
โ Target file created: /path/to/bad.py
โ Syntax validation passed: Validation Passed
Example 2: Follow-Up Questions
EdgeMind > What did you change?
โ Understanding request...
โ Loading previous execution context...
โ Found 1 significant change.
โ Reviewing the changes made...
EdgeMind:
I converted bad.java into bad.py:
- Transformed Java class structure into idiomatic Python functions.
- Converted standard I/O calls to native print statements.
- Added type hints and docstrings.
No additional files were modified.
Example 3: Single-Shot Subcommands
# Analyze project structure and resources
edgemind analyze .
# Explain a specific source file
edgemind explain app/models/model_router.py
# Analyze an error log or traceback
edgemind debug tests/sample_error.txt
# Generate Dockerfile
edgemind generate-docker .
# Generate requirements.txt
edgemind generate-requirements .
# Generate docker-compose.yml
edgemind generate-compose .
๐ Project Structure
EdgeMind/
โโโ app/
โ โโโ cli/ # Interactive shell, banner, commands, main Typer CLI
โ โโโ editing/ # Editing service, file manager, modifier, validator, diffs
โ โโโ events/ # Real-time activity streaming event system
โ โโโ graph/ # LangGraph nodes, planner V2, state schema, workflow compilation
โ โโโ memory/ # SQLite database schema, connections, memory manager
โ โโโ models/ # Model manager, resource-aware router, Ollama client
โ โโโ resources/ # System resource monitor (psutil CPU/RAM)
โ โโโ routing/ # Intent router & conversational/follow-up handlers
โ โโโ scripts/ # Graph export utilities
โ โโโ setup/ # Prerequisites check & setup wizard
โ โโโ tools/ # Autonomous file discovery, scanner, analyzer, generators
โโโ tests/ # Unit, adversarial, agentic, and integration test suite
โโโ .github/workflows/ # CI/CD and automated PyPI release workflows
โโโ ARCHITECTURE.md # Detailed system architecture blueprint
โโโ FUNCTION_REFERENCE.md# Complete technical function and class reference
โโโ WORKFLOWS.md # Workflow sequence diagrams and call-flow documentation
โโโ pyproject.toml # Package configuration & PyPI release metadata
๐งช Development & Testing
Running Tests
Execute deterministic unit tests (no active Ollama server required):
pytest -m "not ollama" -v
Execute live Ollama integration tests:
pytest -m ollama -v
Execute complete test suite (all 40+ tests):
pytest -v
๐ฆ Building Package & PyPI Release Infrastructure
EdgeMind utilizes standard Python setuptools packaging defined in pyproject.toml.
Building Package Distribution
pip install build twine
python -m build
PyPI Automated Release Workflow
Automated releases are managed via GitHub Actions (.github/workflows/release.yml) using PyPI Trusted Publishing. Pushing a tag formatted v*.*.* automatically triggers build and publication to PyPI.
โ ๏ธ Current Limitations
- Local Model Dependency: Requires an installed local Ollama binary and at least one LLM model.
- Single-File Edit Scopes: Active code modification step operates on one primary file per step; complex multi-file refactoring runs sequentially across graph steps.
- Language Syntax Checking: AST-based syntax checking is fully deterministic for Python and JSON; structural delimiter checks are enforced for Java, C++, JS, and TS (with
node -cinvoked if Node.js is installed).
๐บ๏ธ Future Roadmap
- ๐ ๏ธ Multi-File Simultaneous Refactoring: Enhanced graph nodes for concurrent multi-file edit previewing.
- ๐งช Automated Test Execution Node: Native execution node for running
pytestinside isolated sandbox containers. - ๐ Model Benchmarking Subsystem: Automated benchmark suite evaluating local LLM accuracy across code edit tasks.
๐ License
MIT License. Free for open-source and commercial use.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edgemind-1.0.3.tar.gz.
File metadata
- Download URL: edgemind-1.0.3.tar.gz
- Upload date:
- Size: 57.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c6b4b92b5b37133b9c73a0f3db0f4e18ec81bbefdd8209b1f6ec18082431e59
|
|
| MD5 |
8cf3e95738696e779be3791c005be09c
|
|
| BLAKE2b-256 |
d052d54a33e9cead7bb3d139ee8efadce1a606b0b55d0168ceb6e11210a7b57b
|
Provenance
The following attestation bundles were made for edgemind-1.0.3.tar.gz:
Publisher:
release.yml on DarkFoot101/EdgeMind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edgemind-1.0.3.tar.gz -
Subject digest:
9c6b4b92b5b37133b9c73a0f3db0f4e18ec81bbefdd8209b1f6ec18082431e59 - Sigstore transparency entry: 2560001552
- Sigstore integration time:
-
Permalink:
DarkFoot101/EdgeMind@02d9d3e346e88afea5575c72afe572aa9f0ba6a3 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/DarkFoot101
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@02d9d3e346e88afea5575c72afe572aa9f0ba6a3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file edgemind-1.0.3-py3-none-any.whl.
File metadata
- Download URL: edgemind-1.0.3-py3-none-any.whl
- Upload date:
- Size: 56.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
128d0eeafe455276aaac8fa066824115ca2e7c7641bd90c689c8fdeab25db309
|
|
| MD5 |
e70cc36ff5eda683e636ca8d055dd035
|
|
| BLAKE2b-256 |
dbb37049e454ab0f9703e36606a666c5b503b9048ea02ec028fbbca2a5cd99d0
|
Provenance
The following attestation bundles were made for edgemind-1.0.3-py3-none-any.whl:
Publisher:
release.yml on DarkFoot101/EdgeMind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
edgemind-1.0.3-py3-none-any.whl -
Subject digest:
128d0eeafe455276aaac8fa066824115ca2e7c7641bd90c689c8fdeab25db309 - Sigstore transparency entry: 2560001592
- Sigstore integration time:
-
Permalink:
DarkFoot101/EdgeMind@02d9d3e346e88afea5575c72afe572aa9f0ba6a3 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/DarkFoot101
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@02d9d3e346e88afea5575c72afe572aa9f0ba6a3 -
Trigger Event:
push
-
Statement type: