MCPcopy Index your code
hub / github.com/eli-labz/Godcoder

github.com/eli-labz/Godcoder @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
4,470 symbols 12,081 edges 702 files 743 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

⚡ Godcoder

A local-first, open-source AI coding agent for your desktop.

Bring your own LLM key. Your code never leaves your machine.

License: MIT Built with Rust Tauri 2 Stars Forks

Download · Features · Architecture · Contribute


🚀 What is Godcoder?

Godcoder is a local-first, fully open-source AI coding agent that runs as a native desktop app. Unlike cloud-based tools, your source code never transits a vendor backend — API requests go straight from your machine to whichever model provider you configure.

It goes beyond editing code: Godcoder can build and continuously improve its own agent harness (Harness mode) and self-train to drive the Open Cowork desktop app, even executing human-action tasks — clicking, typing, opening apps, sending email, e-signing — through GUI/OS automation (CoWork mode). Both modes run a self-optimizing loop that compounds lessons over time, so the agent gets measurably better with use.

Your Machine ──► Model Provider (OpenAI / Anthropic / Any OpenAI-compatible API)
     ▲
     │  (no middleman, no cloud backend, no data lock-in)
     │
  Your Code

Reimagined from the ground up. The original 2024 autonomous-dev pipeline is frozen under v1/ — preserved, not maintained.


🧬 The Agent Builds Its Own Harness — Live

Godcoder doesn't just use a harness. It writes one, improves it, and optimizes it — autonomously, in real time.

This is the defining capability that sets Godcoder apart. Activate Harness mode and the agent takes over its own agent loop: it scaffolds a live sandbox, engineers its own tools and workflows, runs improvement cycles, measures what works, and compounds that knowledge — all without you writing a single prompt.

┌─────────────────────────────────────────────────────────────┐
│              HARNESS MODE  —  Real-Time Self-Build          │
│                                                             │
│  START                                                      │
│    │                                                        │
│    ▼                                                        │
│  🏗️  Scaffold  →  creates harness-build/ sandbox            │
│    │                                                        │
│    ▼                                                        │
│  🗺️  Route     →  selects the highest-value next change     │
│    │                                                        │
│    ▼                                                        │
│  📋  Plan      →  designs the improvement                   │
│    │                                                        │
│    ▼                                                        │
│  ⚙️  Execute   →  writes, edits, runs code                  │
│    │                                                        │
│    ▼                                                        │
│  ✅  Evaluate  →  verifies with the project's own checks    │
│    │                                                        │
│    ▼                                                        │
│  📝  Log       →  records outcome in persistent memory      │
│    │                                                        │
│    ▼                                                        │
│  🔁  Optimize  →  biases future iterations toward success   │
│    │                                                        │
│    └──────────────────────────────► repeat                  │
└─────────────────────────────────────────────────────────────┘

How it works: - Pick Harness in the new-session composer and press start — no prompt to type, no folder to choose. - The agent instantly creates a dedicated harness-build/ workspace, opens it in your file explorer, and confines all new work there — reading the rest of the repo for reference but never rewriting it. - Each iteration makes one decisive, verifiable change: keep it if it's an improvement, discard it otherwise. - Results are stored in a persistent memory store (via the ResearchSwarm bridge) so lessons from past runs rank and steer future iterations — the harness compounds knowledge over time. - Like Freestyle mode, every tool call is auto-approved after the first confirmation.

The loop is powered by the self-optimizing-harness default skill and a ResearchSwarm bridge exposing route / log / recall / optimize over a persistent memory store.


✨ What Godcoder Can Do

Feature Description
🧬 Real-Time Self-Built Harness The agent scaffolds, writes, and optimizes its own agent harness live — no human prompting required
🧠 Ask / Plan / Coding / Freestyle / Harness / CoWork Modes From answering questions to fully autonomous coding — self-building its own harness, and self-training to drive the Open Cowork desktop app
📝 In-place File Editing Edit files, review diffs, rewind to checkpoints, continue from previous turns
🖥️ Interactive Terminal Built-in terminal, file explorer, and session history
🔌 Any LLM Provider Plug in OpenAI, Anthropic, or any OpenAI-compatible endpoint — no proxy needed
🛠️ MCP Server Support Extend the toolset with MCP servers over stdio, streamable HTTP, or SSE
🎙️ Voice API Integration Configure TTS, STT, and Voice-to-Voice from Settings — stored locally
🔍 Graph-Aware Code Search Optional Context Engine: semantic + structural search over large codebases
🔒 Tool Approval Controls Deliberate execution with subagents, skills, and approval gates
👥 Self-training CoWork One-click CoWork mode learns to drive Open Cowork and executes human-action tasks (GUI/OS automation)

👥 Self-training CoWork (drives Open Cowork)

CoWork mode turns Godcoder loose on the Open Cowork desktop app (third_party/open-cowork-main) — learning to operate its Skills (PPTX/DOCX/XLSX/PDF), MCP connectors, and computer-use surface, and getting better at it over time. Pick CoWork in the new-session composer next to Harness. You can add a prompt describing the objective you want it to accomplish — or just press start to let it self-train. Either way it sets up a contained cowork-build/ sandbox, opens it in your file explorer, and confines its new work there while reading Open Cowork only for reference.

What sets CoWork apart: it doesn't just plan — it executes human-action tasks. For any step a person would do at a keyboard or screen (clicking, typing, opening apps, filling forms, sending email, e-signing, joining meetings), CoWork gets an actuation plan via the bridge's act command and carries it out through Open Cowork's computer-use / GUI automation (or OS scripting), verifying each step with a screenshot. Only steps that truly need a physical body (drive, lift, repair, in-person signature) are handed back to you.

route → plan → execute (incl. GUI/OS actuation) → verify → log → optimize → repeat

The loop is backed by the cowork-trainer default skill, the same ResearchSwarm bridge (now also exposing act), and a digital-cognitive- labor classifier that splits each task into digital, actuatable, and physical segments. Outcomes are logged under cowork:-prefixed tags so coworking lessons compound. Like Freestyle and Harness, every tool call is auto-approved (you confirm the first time), and a Clear button in the session header resets the conversation and context whenever you want a fresh start.


🏗️ Architecture

Godcoder is built on a pure-Rust agent core with the desktop app as a thin adapter on top:

apps/desktop/           Tauri 2 + React desktop app (thin adapter)
crates/
  agent/                Rust agent core — the harness (loop, tools, modes, subagents)
  git-ops/              Checkpoint / diff / restore over the working tree
services/
  context-engine/       Optional Go indexing service (tree-sitter → Qdrant + FalkorDB + BM25)
third_party/
  ResearchSwarm-master/  Self-optimizing memory + bridge (Harness & CoWork modes)
  open-cowork-main/      Open Cowork desktop app — CoWork mode's training target
v1/                     Legacy 2024 codegen pipeline — frozen

See ARCHITECTURE.md for a deep-dive on how these fit together.


🔥 Two Ways to Run

Mode 1 — Core Agent (Zero backend required)

Add an LLM key and you're immediately productive:

  • ✅ In-place file edits
  • ✅ Ask / Plan / Coding modes
  • ✅ Checkpoint & rewind
  • ✅ Diff review
  • ✅ Interactive terminal & file explorer

Mode 2 — Core Agent + Context Engine

Flip on the Context Engine (Settings → Context engine) for graph-aware, repo-scale retrieval powered by:

  • tree-sitter → syntax-aware parsing
  • Qdrant → vector similarity search
  • FalkorDB → call-graph traversal
  • BM25 → lexical search

The agent's codebase_search and codebase_graph tools query it automatically. See services/context-engine/README.md.


🛠️ Getting Started

Prebuilt binaries are coming. For now, build from source — it's straightforward.

Prerequisites

Run the App

cd apps/desktop
npm install

# Development
npm run tauri:dev

# Production build
npm run tauri:build

Windows shortcut: Double-click launch-godcoder.bat in the repo root — it sets up Cargo on PATH, refreshes stale Tauri build caches (important if the repo moved drives, e.g. D: -> E:), and starts the app automatically.

Rust preflight note (Windows): The launcher now validates rustc -vV before starting Tauri. If Rust is in a broken state, it exits early with remediation steps instead of triggering a Tauri CLI panic. Use:

powershell rustup toolchain uninstall stable-x86_64-pc-windows-msvc rustup toolchain install stable-x86_64-pc-windows-msvc --profile default rustup default stable-x86_64-pc-windows-msvc

Windows brute-force integration path (optional): Run launch-godcoder-bruteforce.bat to first force-install and validate third_party/ResearchSwarm-master and third_party/loop-engineering-main, then hand off to the normal launcher unchanged.

During brute-force bootstrap on Windows, loop-sync is treated as required validation. Some vendored loop-engineering source builds (loop-init, loop-cost) can emit platform-specific warnings (EPERM rename / chmod) and are treated as optional so bootstrap can still complete.

On first launch: Open Settings → add an LLM provider (base_url + api_key + model) → create a session → pick a folder and mode → start coding.

(Optional) Run the Context Engine

cd services/context-engine
cp .env.example .env   # set SUPERCODER_OPENAI_API_KEY (server-side embedding key)
docker compose up -d --build

Then enable Settings → Context engine in the app. Full instructions: services/context-engine/README.md.

Benchmark Harness (Headless, Reproducible)

Run the same Rust agent core headlessly across tasks/models with reproducible per-task sandboxes:

# 1) Build bench-runner
cargo build --release --locked -p bench-runner

# 2) Export provider key
export SUPERCODER_LLM_API_KEY="..."

# 3) Run reproducible benchmark harness
python3 tools/benchmark_harness.py \
  --repo . \
  --bench-runner target/release/bench-runner \
  --tasks benchmarks/tasks.sample.jsonl \
  --models "qwen2.5-coder:7b-instruct,gpt-4o-mini" \
  --provider openai

To validate graph-retrieval localization (Context Engine OFF vs ON per task):

python3 tools/benchmark_harness.py \
  --repo . \
  --bench-runner target/release/bench-runner \
  --tasks benchmarks/tasks.sample.jsonl \
  --models "qwen2.5-coder:7b-instruct" \
  --provider openai \
  --context-engine-url http://localhost:8106 \
  --validate-graph-localization

This emits runs.jsonl, summary.json, and summary.md under benchmark-results/.

Releases & Installers

Desktop installers and prebuilt binaries are now produced by CI through .github/workflows/release.yml (release publish and v* tag push paths), including a static bench-runner release artifact.


🗺️ Roadmap

  • [x] Prebuilt releases & installers — CI pipeline for binaries
  • [x] Benchmark harness — headless runner over the same agent core, with reproducible per-task sandboxes to measure the harness across models and validate graph-retrieval localization
  • [x] Broader provider support — model discovery now supports OpenAI/Anthropic plus OpenAI-compatible/Ollama endpoint shapes
  • [x] Ask / Plan / Coding modes
  • [x] Self-optimizing Harness mode — agent builds and improves its own harness in real time
  • [x] Checkpoint & rewind
  • [x] MCP server support
  • [x] Voice API integration
  • [x] Context Engine (local, graph-aware semantic search)

🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md to get started.

  • 🐛 Found a bug? [Open an issue](https://git

Extension points exported contracts — how you extend this code

RetrieverService (Interface)
RetrieverService is the pluggable interface for context retrieval strategies. [6 implementers]
services/context-engine/services/retriever_service.go
ResetDBStepExecutor (Interface)
(no doc) [16 implementers]
v1/app/workflow_executors/step_executors/reset_db_step_executor.go
ApprovalHandler (Interface)
(no doc) [6 implementers]
crates/agent/src/approval.rs
EventEmitter (Interface)
Abstracts Tauri event emission (`app.emit()`). Returns `Result` so callers can log on failure instead of silent `let _ = [2 …
apps/desktop/src-tauri/src/agent_bridge/traits.rs
WorkspaceService (Interface)
(no doc) [4 implementers]
v1/workspace-service/app/services/workspace_service.go
Window (Interface)
(no doc)
v1/gui/global.d.ts
Reviewer (Interface)
Reviewer abstracts the LLM-powered code review backend. Implementations exist for different model providers (Anthropic, [3 …
services/context-engine/services/reviewer.go
ServerStartTestExecutor (Interface)
(no doc) [16 implementers]
v1/app/workflow_executors/step_executors/server_start_test_executor.go

Core symbols most depended-on inside this repo

Error
called by 848
services/context-engine/services/terminal_error.go
get
called by 218
crates/agent/src/tool/mod.rs
Error
called by 193
services/context-engine/internal/pkg/clients/gorm/gorm_logger.go
write
called by 184
crates/git-ops/src/checkpoint.rs
String
called by 183
v1/app/workflow_executors/step_executors/steps/step_names.go
is_empty
called by 175
crates/agent/src/skills/registry.rs
Info
called by 169
services/context-engine/internal/pkg/clients/gorm/gorm_logger.go
String
called by 141
services/context-engine/services/impl/gatekeeper.go

Shape

Function 2,064
Method 1,390
Struct 420
Interface 334
Class 212
Enum 35
TypeAlias 15

Languages

Go45%
Rust36%
TypeScript19%
Python1%

Modules by API surface

apps/desktop/src-tauri/src/agent_bridge/commands.rs132 symbols
crates/agent/src/agent/loop_.rs122 symbols
crates/context-sync/src/streamer.rs80 symbols
apps/desktop/src/services/agentTauriService.ts70 symbols
apps/desktop/src-tauri/src/agent_bridge/db.rs64 symbols
services/context-engine/services/coder_integration_client.go53 symbols
crates/agent/src/tool/edit.rs48 symbols
crates/agent/src/tool/mod.rs44 symbols
apps/desktop/src/types/agent.ts44 symbols
services/context-engine/config/indexer.go43 symbols
crates/agent/src/llm/anthropic.rs42 symbols
apps/desktop/src/types/agentContract.ts42 symbols

Datastores touched

supercoderDatabase · 1 repos
ai-developerDatabase · 1 repos
mydbDatabase · 1 repos

For agents

$ claude mcp add Godcoder \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact