{"slug": "show-hn-goroute-native-go-llm-gateway-for-coding-agents-12mb-ram", "title": "Show HN: GoRoute – Native Go LLM Gateway for Coding Agents (< 12MB RAM)", "summary": "Developer ziuus released GoRoute, a single-binary LLM gateway written in Go that runs in a 5.1MB binary using under 12MB of RAM and serves coding agents such as OpenCode, Claude Code, Cursor, Codex CLI, Aider and Cline at http://127.0.0.1:8128. GoRoute handles OpenAI and Anthropic protocol normalization, Google Antigravity OAuth account rotation, session account affinity for prompt-cache preservation and 55 RTK filters that cut 70-90% of noise, positioning it against Node/Electron proxies the project says consume 600MB to 1.5GB of RAM. The gateway is installable via npm, npx, curl, Homebrew or go install, and a single `goroute setup all` command configures all 18 supported agents.", "body_md": "**Sub-10ms Latency • < 12MB RAM • 35 CLI Agents • A2A Protocol • Zero Node.js Overhead**\n\n[Quickstart](#-quickstart) •\n  [Architecture](#-architecture) •\n  [Supported Agents](#-supported-coding-agents) •\n  [Benchmarks](#-benchmarks) •\n  [Features](#-features) •\n  [Cheatsheet](#-cli-cheatsheet)\n\n**GoRoute** is an ultra-fast, single-binary LLM gateway engineered specifically for developers using autonomous AI coding agents (**OpenCode, Claude Code, Cursor, Codex CLI, Aider, Cline**, etc.).\n\nInstead of running bloated Node/Electron proxies that consume **600MB to 1.5GB of RAM**, GoRoute delivers identical multi-provider pooling, Google Antigravity OAuth rotation, Anthropic-to-OpenAI protocol normalization, and response caching inside a tiny **5.1MB footprint**.\n\n```\n                ┌─────────────────────────────────────────────────────────────┐\n                │                     YOUR CODING AGENTS                      │\n                │  OpenCode • Claude Code • Cursor • Codex CLI • Aider • Roo  │\n                └──────────────────────────────┬──────────────────────────────┘\n                                               │\n                               http://127.0.0.1:8128\n                         (OpenAI /v1 & Anthropic /v1/messages)\n                                               │\n                                               ▼\n┌───────────────────────────────────────────────────────────────────────────────────────────┐\n│                                     ⚡ GOROUTE CORE                                       │\n│                                                                                           │\n│  ┌───────────────────────┐  ┌───────────────────────┐  ┌───────────────────────────────┐  │\n│  │   Dual-Protocol SSE   │  │   55 RTK Filters      │  │    Session Account Affinity   │  │\n│  │  OpenAI ⇆ Anthropic   │  │   70-90% Noise Cut    │  │  Prompt Cache Preservation    │  │\n│  └───────────────────────┘  └───────────────────────┘  └───────────────────────────────┘  │\n│                                                                                           │\n│  ┌─────────────────────────────────────────────────────────────────────────────────────┐  │\n│  │                     Autonomous Token Health Scheduler & Router                      │  │\n│  │         (Cascades across accounts on 429 quota or 503 limits; proactive refresh)    │  │\n│  └─────────────────────────────────────────────────────────────────────────────────────┘  │\n└──────────────────────────────────────────────┬────────────────────────────────────────────┘\n                                               │\n               ┌───────────────────────────────┼───────────────────────────────┐\n               ▼                               ▼                               ▼\n ┌───────────────────────────┐   ┌───────────────────────────┐   ┌───────────────────────────┐\n │ Google Antigravity Pool   │   │  AWS CodeWhisperer (Kiro) │   │  OpenAI / Codex Direct    │\n │ Multi-Account • Sonnet    │   │  Context Auto-Pruning     │   │  OpenAI Compatible API    │\n └───────────────────────────┘   └───────────────────────────┘   └───────────────────────────┘\nnpm install -g goroute\n\n# Or run directly via npx:\nnpx goroute setup opencode\ncurl -fsSL https://raw.githubusercontent.com/ziuus/goroute/main/install.sh | bash\nbrew install ziuus/goroute/goroute\ngo install github.com/ziuus/goroute/cmd/goroute@latest\ngoroute auth login antigravity\n```\n\n*Securely links your Antigravity accounts into GoRoute's encrypted local storage (`~/.goroute/vault.json`).*\n\nAuto-configure your favorite agent with one command:\n\n```\n# Configure OpenCode (writes config + registers provider credentials)\ngoroute setup opencode\n\n# Configure Claude Code\ngoroute setup claude\n\n# Configure OpenAI Codex CLI\ngoroute setup codex\n\n# Configure ALL 18 supported agents in one click\ngoroute setup all\n```\n\nRun GoRoute as a background service:\n\n```\n# Enable Linux background autostart (systemd user unit, ~5MB RAM):\ngoroute autostart enable\n\n# Verify gateway status:\ngoroute status\n```\n\nOr launch any agent with zero configuration using the universal proxy injector:\n\n```\ngoroute run opencode\ngoroute run claude\ngoroute run aider --model openai/claude-3-7-sonnet\n```\n\nTested on Linux x86_64 under 500 concurrent streaming requests:\n\n| Benchmark Metric | Traditional Gateways *(Node/Next.js/Python)* | GoRoute *(Pure Go)* | Efficiency Gain | \n|---|---|---|---|\n| **Idle Memory (RSS)** | `580 MB – 1,450 MB` | **`5.1 MB`** | **99.1% less RAM** | \n| **Memory Under 500 Req Load** | `850 MB – 2.1 GB` | **`16.5 MB`** | **98.0% less RAM** | \n| **Idle CPU Utilization** | `1.5% – 6.0%` background | **`0.0%`** (Sleep until epoll) | **Zero background waste** | \n| **Disk Footprint** | `~180 MB` (`node_modules` ) | **`13 MB`** (Static single binary) | **14x smaller** | \n| **Cold Startup Time** | `3,200 ms` | **`11 ms`** | **290x faster** | \n| **Gateway Port** | `20128` | **`8128`** | **Collision-free** | \n\n`goroute setup` automatically configures paths, headers, authentication keys, and provider manifests for:\n\n| Agent | Command | Target Config File | Features Supported | \n|---|---|---|---|\n| **Claude Code** | `goroute setup claude` | `~/.claude/settings.json` | Anthropic `/v1/messages` protocol + thinking | \n| **OpenCode** | `goroute setup opencode` | `~/.config/opencode/opencode.json` | Full models catalog, `auth.json` registration | \n| **Cursor IDE** | `goroute setup cursor` | `~/.config/Cursor/User/settings.json` | Custom OpenAI Base URL + `/v1/embeddings` | \n| **OpenAI Codex CLI** | `goroute setup codex` | `~/.codex/goroute.config.toml` | Custom profile, auto-compaction | \n| **Cline** | `goroute setup cline` | `~/.cline/data/secrets.json` | Act & Plan modes | \n| **Roo Code** | `goroute setup roo` | `~/.roo/settings-import.json` | Custom OpenAI compatible profile | \n| **OpenClaw** | `goroute setup openclaw` | `~/.openclaw/config.yaml` | Multi-agent execution harness | \n| **Hermes Agent** | `goroute setup hermes` | `~/.hermes/config.json` | In-flight reasoning inspection | \n| **Droid** | `goroute setup droid` | `~/.droid/settings.json` | Autonomous workspace workflows | \n| **Grok-Build** | `goroute setup grok-build` | `~/.grok/build.json` | Native reasoning compiler | \n| **Aider** | `goroute setup aider` | `~/.aider.conf.yml` | OpenAI base URL + git workflow routing | \n| **Kilo Code** | `goroute setup kilo` | `~/.local/share/kilo/auth.json` | Custom gateway key | \n| **Zed Editor** | `goroute setup zed` | `~/.config/zed/settings.json` | Assistant panel routing | \n| **Letta / MemGPT** | `goroute setup letta` | `~/.letta/config.json` | Stateful agent memory gateway | \n| **Warp Terminal** | `goroute setup warp` | `~/.warp/settings.json` | AI terminal command generator | \n| **DeepSeek TUI** | `goroute setup deepseek-tui` | `~/.deepseek/config.toml` | Interactive terminal reasoning | \n| **Charm Crush** | `goroute setup crush` | `~/.config/crush/crush.json` | Custom host setup | \n| **Continue (cn CLI)** | `goroute setup continue` | `~/.continue/config.yaml` | Chat completions + vector embeddings | \n| *+ 17 more tools* | `goroute setup all` | All local tools | 35 CLI agents configured in parallel with auto-backups | \n\n- \n**Universal Multi-Protocol Gateway** :\n  - \n`POST /v1/chat/completions` (OpenAI format + SSE chunks)\n  - \n`POST /v1/messages` (Native Anthropic format +`content_block_delta` SSE streaming)\n  - \n`POST /api/chat` (Native Ollama emulation)\n  - \n`GET /mcp` (Model Context Protocol native SSE server)\n  - \n`GET /.well-known/agent.json` &`POST /api/a2a/tasks` (A2A Protocol v0.3)\n- \n- \n**Zero-Alloc In-Memory Cache** :\n  - Repeated agent queries (e.g. title generation, linters, duplicate prompts) hit the internal cache and return `X-Cache: HIT` with**0ms latency** and**0 upstream tokens** .\n- Repeated agent queries (e.g. title generation, linters, duplicate prompts) hit the internal cache and return \n- \n**DuckDuckGo Web Search & Readability Scraper** :\n  - Built-in `POST /v1/web/fetch` and`GET/POST /v1/search` with zero API keys required. Converts fetched HTML to clean GitHub-flavored Markdown.\n- Built-in \n- \n**Smart Quota Cascade & Multi-Account Pools** :\n  - Dynamically rotates across accounts with configurable strategies: `Priority / Failover` ,`Round-Robin` , and`Fair-Share` .\n  - Automatically isolates accounts on HTTP 429 quota exhaustion or 402 billing limits with proactive token cooldowns.\n- Dynamically rotates across accounts with configurable strategies: \n- \n**Context Pruning & Token Optimization** :\n  - Single-pass $O(N)$ integer pruning algorithm trims duplicate prompt prefixes and keeps multi-turn transcripts within upstream limits without dropping active agent instructions.\n- Single-pass \n\nWe welcome contributors! Check out our [open Good First Issues](https://github.com/ziuus/goroute/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22):\n\n- Adding a new provider adapter takes under 20 lines of pure Go in `pkg/providers/` .\n- Adding a new CLI tool integration is just 1 struct entry in `pkg/clitools/registry.go` .\n- Read [CONTRIBUTING.md](https://github.com/ziuus/goroute/blob/main/CONTRIBUTING.md) to get started in 2 minutes.\n\nGoRoute provides pre-compiled, optimized static binaries for all major platforms:\n\n| Platform | Architecture | Binary Format | Autostart Service | \n|---|---|---|---|\n| **Linux** | `x86_64` ,`arm64` | Native ELF | `systemd` user service | \n| **macOS** | Apple Silicon ( `arm64` ), Intel (`x86_64` ) | Mach-O | `launchd` / CLI | \n| **Windows** | `x64` ,`arm64` | Native `.exe` | Windows Task / CLI | \n| **NPM Wrapper** | Any Node.js 18+ environment | Universal JS runner | Auto-detects platform | \n\n```\n# Gateway Management\ngoroute serve                       # Start gateway server (port 8128)\ngoroute serve --no-dashboard        # Headless mode (< 10MB RAM)\ngoroute autostart enable            # Enable system background service\ngoroute autostart status            # Check service status\ngoroute autostart disable           # Stop & disable service\ngoroute status                      # Health check & model listing\n\n# Agent Setups\ngoroute setup all                   # Configure all 14 coding agents\ngoroute setup <agent>               # Configure a specific agent (e.g. opencode, claude)\ngoroute run <agent> [args...]       # Launch agent with proxy env variables\n\n# Providers & Accounts\ngoroute auth login antigravity      # Interactive PKCE OAuth login\ngoroute auth list                   # List connected provider accounts\ngoroute catalog                     # View 25+ built-in provider presets\n```\n\nMIT © [ziuus](https://github.com/ziuus). Designed for developers who love speed.", "url": "https://wpnews.pro/news/show-hn-goroute-native-go-llm-gateway-for-coding-agents-12mb-ram", "canonical_source": "https://github.com/ziuus/goroute", "published_at": "2026-10-22 11:04:00+00:00", "updated_at": "2026-10-22 11:10:02.626355+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "agent-protocols", "large-language-models"], "entities": ["GoRoute", "ziuus", "OpenCode", "Claude Code", "Cursor", "Codex CLI", "Aider", "Cline"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-goroute-native-go-llm-gateway-for-coding-agents-12mb-ram", "markdown": "https://wpnews.pro/news/show-hn-goroute-native-go-llm-gateway-for-coding-agents-12mb-ram.md", "text": "https://wpnews.pro/news/show-hn-goroute-native-go-llm-gateway-for-coding-agents-12mb-ram.txt", "jsonld": "https://wpnews.pro/news/show-hn-goroute-native-go-llm-gateway-for-coding-agents-12mb-ram.jsonld"}}