cd /news/ai-agents/show-hn-memcode-ai-goes-open-source-… · home topics ai-agents article
[ARTICLE · art-89948] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: Memcode AI goes open source with Claude Code inspired coding agent

Memcode AI, a coding agent that maintains a persistent model of a repository in a `.memcode` directory, has been released as open source under the MIT license. The single Go binary features a terminal UI, supports multiple model providers including OpenAI, Anthropic, Gemini, xAI, and local endpoints like Ollama, and includes capabilities such as model policy routing, session history, and self-hosting. The project is available on GitHub and can be installed via curl or Go, with the hosted service at memcode.ai running the same code.

read3 min views1 publishedAug 10, 2026
Show HN: Memcode AI goes open source with Claude Code inspired coding agent
Image: source

The coding agent that remembers your repo.

Most coding agents start every session from zero. memcode keeps a persistent model of your repo in .memcode

: the subsystems, what you worked on last week, which approaches failed and why, and the preferences you have corrected it on. The longer you use it, the less you have to explain.

One Go binary, a full terminal UI, and it runs against whatever models you already have: the hosted memcode gateway, your own API keys, or a local endpoint like Ollama.

Remembers your repo | Version-control-friendly state in .memcode that survives sessions and machines. Searchable session history. Repeated failures distill into lessons that resurface when they matter. Honors MEMCODE.md , AGENTS.md , and CLAUDE.md instructions, and compresses oversized ones once instead of re-reading them forever. | Model policy in the client | Automatic mode routes each call by what the turn needs: cheap models for routine work, strong models for planning, review, high-risk changes, and recovery after its own mistakes. Pin any model with /model . Failures walk catalog-defined fallback chains. See | Bring your own models | Works with no account: point it at any OpenAI-compatible endpoint. Provider-native APIs get full fidelity, the Responses API on api.openai.com, Messages on api.anthropic.com, Gemini and xAI likewise. Standard key env vars are picked up automatically. | Reads the room | Tracks the working mood of the session. When you are correcting it, it stops cutting corners, spends more on the model, and asks before acting. When things are calm it stays out of the way. | A real terminal UI | Multiline editing, slash commands with autocomplete, streaming tool output, interrupt and redirect mid-turn, themes, and a live context meter. | Plans before it builds | /plan researches with parallel scouts, drafts, gets a cross-model review, and turns the approved plan into a binding contract for execution. | Delegates and parallelizes | Spawn read-only explorers or full sub-agents, run detached background jobs, and manage them with /jobs , /tail , /kill . | Table stakes, done properly | MCP client, Agent Skills, hooks ( |

Self-updatingMEMCODE_AUTO_UPDATE=off

keeps it manual.

curl -fsSL https://memcode.ai/install.sh | sh

Or with Go:

go install github.com/memcode-ai/memcode@latest

Or build from source:

git clone https://github.com/memcode-ai/memcode
cd memcode && go build -o memcode .

Then run memcode

in a repo.

MEMCODE_ENDPOINT_URL=http://localhost:11434/v1 memcode      # Ollama, local
MEMCODE_ENDPOINT_URL=https://api.openai.com/v1 memcode      # your OpenAI key (OPENAI_API_KEY)
MEMCODE_ENDPOINT_URL=https://api.anthropic.com memcode      # your Anthropic key (ANTHROPIC_API_KEY)

OPENAI_API_KEY

, ANTHROPIC_API_KEY

, GEMINI_API_KEY

, XAI_API_KEY

, FIREWORKS_API_KEY

, and friends are picked up automatically for their hosts. Named endpoints live in config, and /model

switches models mid-session.

With a memcode account you get one balance across every vendor, a key vault for BYOK, and hosted web search:

memcode login

The whole product is in this repo, gateway included, and the gateway is a single stateless binary:

cd deploy/docker && cp ../../.example.env .env   # set a token + a provider key
docker compose up --build

See docs/self-hosting.md. The hosted service at memcode.ai runs this same code with a private control plane on top (accounts, one balance across vendors, the BYOK vault, team features).

The CLI is the agent: all model selection, escalation, and recovery run client-side; every backend is a plain serving surface speaking one OpenAI-compatible wire (protocol/PROTOCOL.md). The gateway under gateway/

is that serving surface, metered and typed, sharing one provider implementation with the CLI. Cloud-only behavior sits behind one control-plane seam; self-host mode constructs none of it.

MIT. See LICENSE.

── more in #ai-agents 4 stories · sorted by recency
── more on @memcode ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-memcode-ai-g…] indexed:0 read:3min 2026-08-10 ·