Memcode

Memcode is an open-source terminal-based AI coding agent built in Go by the memcode-ai team. It provides a terminal user interface (TUI) and command-line harness designed to orchestrate agentic coding tasks, manage background jobs, and interact directly with a developer's local codebase. Day-to-day interactions occur within a terminal interface featuring interactive model selection, plan-mode tracking, and tool execution. Memcode integrates with external LLM providers including Gemini and DeepSeek (such as DeepSeek V4) alongside standard model routing. It includes native support for the Model Context Protocol (MCP) to connect external tool servers, sandboxed tracing, and automated diff application. Memcode distinguishes itself through its background execution architecture and memory features. It tracks background agent processes with live heartbeat telemetry, inspectable launch trees, and artifact tracking (`memcode artifacts`). It also incorporates persistent knowledge features such as lesson distillation and workspace-level execution safeguards. Memcode is hosted openly on GitHub. As a Go-based project, it operates as a self-contained binary with local configuration management and direct provider API integrations.

Tags: ai agent, cli, code assistant, coding agent, developer tools, OpenSource

Visit Memcode

Key features

  • Interactive TUI & CLI — Terminal interface featuring interactive model switching (/model), plan-mode task tracking, and live agent status views. - Background agent execution — Manages multi-agent tasks in the background with heartbeat telemetry, token accounting, and a live TUI process tree. - Artifact management — Dedicated CLI commands (memcode artifacts list/open/delete) and slash commands to inspect and manage generated outputs. - Model Context Protocol (MCP) support — Connects to external MCP servers with scoped headers, host-level isolation, and user-level authorization controls. - Lesson distillation & memory — Synthesizes lessons from sessions to improve context retention across recurring coding workflows. - Extensible model routing — Native support for multiple reasoning and coding LLM providers, including DeepSeek V4 and Gemini.

Use cases

Use Case: Background Task Execution and Orchestration Developers can offload long-running refactoring or research jobs to background agents while continuing to work in the terminal. Memcode tracks execution status, token consumption, and agent heartbeats in a dedicated live panel.

Use Case: Extensible Tooling via MCP Engineers can attach specialized Model Context Protocol servers to provide the agent access to custom APIs, local databases, or domain-specific tools, while enforcing host-scoped permissions and sandbox safety checks.

Use Case: Artifact and Code Generation Review When running multi-step tasks that produce separate patch sets or files, developers can use the artifact subcommands to inspect, open, and review generated outputs prior to applying changes to the repository.

Who it is for

Memcode is aimed at software engineers and CLI-centric developers who want a Go-powered terminal coding assistant capable of managing background jobs, MCP tools, and multi-model workflows. It is not intended for non-technical users or developers seeking a closed-loop, GUI-only IDE extension.

Install guide

Installation To build and install Memcode from source using Go (standard Go installation method): bash git clone https://github.com/memcode-ai/memcode.git cd memcode go build -o memcode ./cmd/memcode sudo mv memcode /usr/local/bin/

First Run Configure your model provider credentials and launch the interface: bash # Set your required provider API key (e.g., DeepSeek or Google Gemini) export DEEPSEEK_API_KEY="your-api-key-here" # Launch the interactive terminal UI memcode

Example Session Launch Memcode to inspect artifacts or select models within your terminal session: bash # Switch models inside the TUI /model # Inspect and manage generated artifacts via CLI memcode artifacts list

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • Plandex — Plandex is an open-source terminal-based AI coding agent designed to handle complex, multi-file engineering tasks in large codebases. Created by…
  • OpenCode — OpenCode is an open-source AI coding agent developed by Anomaly that operates across terminal environments, desktop applications, and IDE extensions.…
  • OpenHands — OpenHands (formerly OpenDevin) is an open-source autonomous AI software development agent and orchestration platform. It provides an extensible runtime environment…
  • Subtask — Subtask is an open-source CLI agent harness and orchestration tool developed by zippoxer in Go. It is built to coordinate…
  • EchoCoding — EchoCoding is an open-source agent harness and audio-augmented developer tooling layer created by launsion-boop. Designed to run alongside AI coding…
  • pi-reflect — pi-reflect is an open-source agent harness and self-improvement extension for pi coding agents, developed by jo-inc. It inspects agent session…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories