Self-host Ogcode
v0.53.1AI coding agent that recalls context instead of replaying it
- Stars
- 145
- Port
- 9595 (Web UI)
ghcr.io/prasenjeet-symon/ogcodeWhat is Ogcode?
Ogcode is a self-hosted AI coding agent that runs as a single Go binary with an embedded web UI. It understands codebases by mapping them before reading, recalls past decisions instead of replaying entire conversation histories, and keeps context windows small to reduce token costs. The agent supports multiple model providers (Anthropic, OpenAI, OpenRouter, Ollama) and can run fully offline with local models. It features three permission modes (Ask, Auto, Yolo), Plan Mode for breaking features into parallel tasks with pull requests, built-in web search, skills for repeatable workflows, MCP server integration, and rich result rendering (Mermaid, LaTeX, Plotly, HTML). Installation options include Docker, Homebrew, winget, Go install, and a curl script. The web UI runs on port 9595 by default. Licensed under AGPL-3.0 with a commercial license option.
Should you self-host Ogcode?
Ogcode scores 45/100 on selfhost.directory (how scoring works) and ranks #66 of 120 in AI Assistant. It has 145 GitHub stars.
It shipped 11 stable releases in the past year. The latest, v0.53.1, came out on 28 October 2026. New versions land roughly every 1 days.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Go.
Its closest alternative on selfhost.directory is DesktopCommanderMCP (73/100, 10 147 stars). It scores higher overall, so compare the two before you pick. See Ogcode vs DesktopCommanderMCP side by side.
Features
- Built-in web search
- Codebase mapping and surgical reads
- Fully offline operation with Ollama
- Local file preview serving
- MCP Server Integration
- Multiple model provider support
- OGX hosted inference planPaid subscription for hosted models; self-hosted version remains free
- Plan Mode with parallel task execution
- Project instructions via AGENTS.md and MEMORY.md
- Remote deployment via SSH tunnel, reverse proxy, or Docker
- Rich result rendering
- Skills System
- Three permission modes (Ask, Auto, Yolo)
- Turn-by-turn recall memory
Ogcode README
FAQ
How is this different from just a bigger context window?
A bigger window still re-sends everything every turn — you pay for it either way, and models get less accurate as the prompt grows. Ogcode brings back only what's relevant so requests stay well under 200K and the bill stays flat.
What does it cost?
Ogcode is free and open source under AGPL-3.0. You pay your model provider for tokens, but Ogcode sends ~70% fewer tokens. With Ollama, it costs nothing.
Can I run it on a server and use it from my laptop?
Yes. It's a normal web server — put it behind nginx or Caddy with a password. Don't expose it to the open internet unprotected since it can run commands on your machine.
Does it work on Windows?
Yes — run the PowerShell install script or use the Docker image. Opening PRs automatically needs the GitHub CLI authenticated.
Can a small, cheap model really keep up?
Far better than in an agent that lets the context balloon. Ogcode keeps each request lean: median request carried 54K tokens and 99% stayed under 180K. Small models answer most accurately when the prompt is short and focused.
If it doesn't re-read everything, does it forget things?
It doesn't drop them — it moves them. What matters is remembered and brought back when relevant. In practice it forgets less than other agents which eventually run out of context window.
Is the 70% token savings number real?
Measured against agents that re-send the whole conversation every turn, across real sessions — about 68% at 50 messages, ~76% at 1,000. The mechanism and numbers are in the README and the code is open source.
Can I really run it fully offline?
Yes. It auto-detects a running Ollama on macOS and Linux. Offline you lose the web search tool and hosted models, but everything else works.
Does my source code leave my machine?
Only in the prompts you send to whichever model provider you chose. There is no Ogcode server, no telemetry endpoint, and no account. Everything lives in a local database. With a local Ollama model, nothing leaves the machine at all.
More in AI Assistant
OllamaUIOllama UI is a self-hosted, open-source web interface for exploring, pulling, and managing Ollama models with chat, tool calling, and Telegram bridge.
Omada-mcpSelf-hosted MCP server giving AI assistants secure, capability-gated access to TP-Link Omada Controller APIs for network automation.
OmniOmni is a self-hosted, open-source AI agent connecting to workplace tools like Google Workspace, Microsoft 365, Slack, and Jira to gather context and execute tasks.
OmniPolyOmniPoly is a self-hosted, open-source web frontend unifying translation (LibreTranslate), grammar checking (LanguageTool), and AI text analysis (Ollama).
Onit SideKickOnit SideKick is a self-hosted AI chat sidebar for macOS that docks to any app, letting you highlight text or load windows as context for local or remote LLMs.
OpenAgentdOpenAgentd is a self-hosted, open-source desktop application that runs a local coding agent, displaying every tool invocation, code change, and token cost as it works.
open-assistant-apiOpen-source, self-hosted AI assistant API compatible with OpenAI Assistants API. Supports RAG, web search, tools, multimodal, streaming — deployable via Docker Compose.
openclaw-coolifySelf-hosted AI agent platform connecting to WhatsApp, Telegram, Discord, Slack, and Teams with multi-agent sandboxing, skill registry, and secure credential management.
openclaw-nerveA self-hosted browser interface for OpenClaw AI agents that combines voice chat, file browsing, task boards, cron jobs, and usage metrics in a single dashboard.
OpenClaw SetupOpenClaw Setup is a self-hosted, open-source web dashboard that automates deploying AI assistants on Telegram, Zalo, and Facebook Messenger using Docker and 9Router.
OpenCode Chat BridgeSelf-hosted open-source bot connecting ACP agents like OpenCode and Ferrum to Matrix, Slack, WhatsApp, Discord, Telegram, and a web widget with permission-based security.
Open CodexOpen Codex is an open-source CLI AI assistant that converts natural language to shell commands using local LLMs via Ollama, running offline on macOS, Linux, and Windows.


0 comments