A free, open-source, offline-first AI coding workspace for Windows. It combines local Ollama models with OpenCode, persistent conversation memory, MCP tools, VS Code integration, and Aider without requiring a paid AI API.
The goal is simple: install it once, keep your code and conversations on your own drive, and use one dependable launcher for everyday development.
- Build, edit, debug, test, and review software projects.
- Work with websites, desktop apps, command-line tools, games, scripts, and existing repositories.
- Use local filesystem, Git, memory, sequential-thinking, and project-management MCP tools.
- Preserve complete OpenCode chat sessions across restarts.
- Automatically recall the current task, durable preferences, and relevant excerpts from older conversations.
- Run through a terminal, a local browser interface, VS Code, or Aider.
- Use optional browser automation for public web research without adding a paid search API.
Your models, chats, memories, projects, caches, editor profile, and logs stay inside the installation folder. They are deliberately excluded from Git and are never part of the public repository.
The first installation and model downloads require internet access. Normal coding and conversation work can run offline afterward.
- Windows 10 or Windows 11
- Ollama
- Node.js 22.5 or newer
- Python 3.11 or newer
- Git
- VS Code is optional
- A GPU is recommended, but Ollama can fall back to CPU execution
Open PowerShell in the folder where you want the project, then run:
git clone https://github.com/venkey123456789/offline-coding-agent.git
cd offline-coding-agent
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1The installer creates all runtime folders inside the repository, installs the free local tools, starts the workspace-specific Ollama service, downloads the balanced model set, and validates the installation.
To install the tools without downloading models yet:
.\install.ps1 -SkipModelsFor normal use, launch:
bin\agent-safe.cmdThis creates a local project snapshot and resumes the latest conversation. The other useful launchers are:
| Launcher | Purpose |
|---|---|
bin\agent.cmd |
Main offline OpenCode agent |
bin\agent-new.cmd |
Start a clean conversation |
bin\agent-history.cmd |
List saved conversations |
bin\agent-fast.cmd |
Faster, smaller local model profile |
bin\agent-deep.cmd |
Strongest installed local model profile |
bin\agent-review.cmd |
Review-oriented model profile |
bin\agent-web.cmd |
Local browser interface on port 4096 |
bin\agent-online.cmd |
Public-browser automation, enabled explicitly |
bin\vscode-agent.cmd |
Portable VS Code profile and extensions |
bin\aider-local.cmd |
Aider connected to local Ollama |
bin\health.cmd |
Installation and runtime diagnostics |
Memory is not dependent on the model remembering to call a tool. A local OpenCode plugin injects useful memory before every response.
The system keeps three complementary forms of memory:
- OpenCode stores complete sessions and messages in its local database.
state\memory\all-conversations.jsonlkeeps an append-only text mirror of user and assistant messages.state\memory\memory.jsonlstores durable facts such as preferences and project decisions.
The memory plugin retrieves relevant older excerpts, identifies the latest unfinished request, and preserves important context during conversation compaction. Secrets should never be intentionally placed in durable memory.
The default installation uses:
qwen3:14bfor balanced coding and reasoning.qwen2.5-coder:1.5bfor fast coding and autocomplete.nomic-embed-textfor local embeddings.
Optional launchers can pull qwen3-coder:latest or gpt-oss:20b when the machine has enough memory. Model availability and hardware requirements can change, so check Ollama before downloading a larger model.
launchers -> OpenCode -> Ollama local model
-> offline MCP servers
-> persistent-memory plugin
-> local session database
VS Code -> Continue -> Ollama and local MCP servers
Aider -------------> Ollama
Everything generated at runtime remains under models, cache, state, logs, tools, or projects. Those directories are ignored by Git.
- File edits and shell commands require approval by default.
agent-safe.cmdcreates a recoverable snapshot before work begins.- Paid APIs and account-backed cloud adapters are not included.
- Online browser automation is separate from the offline launcher.
- The repository contains source and configuration only, never local chat history or downloaded models.
.\bin\health.cmd
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\validate-stack.ps1
node .\scripts\check-mcp.mjsThis is a practical local coding environment, not a promise that one model can perfectly complete every possible task. Results depend on the selected model, available hardware, project quality, and the instructions provided. The stack is designed to be inspectable, extensible, and fully usable without paid inference services.
Bug reports, documentation improvements, new local integrations, and focused pull requests are welcome. Read CONTRIBUTING.md before submitting changes.
Released under the MIT License.