Skip to content

Latest commit

Β 

History

74 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hermes-CodeSpace

A GitHub Codespaces-ready dev container template pre-configured with Hermes AI coding agent, free LLM routers, and local AI infrastructure β€” ready to code in seconds.

MIT License Dev Container Hermes Agent PI Agent ModelRelay OmniRoute Ollama Mnemon

Fork this repo before Open in GitHub Codespaces


Overview

Hermes-CodeSpace is a zero-config GitHub Codespaces template that spins up a fully-featured AI development environment in seconds. It ships with:

Component Purpose Port
Hermes Agent AI coding agent with memory, skills, and multi-step task execution 9119 (Dashboard)
Hermes VS Code Extension Full IDE integration β€” chat, inline suggestions, terminal access β€”
Claude Code Anthropic's CLI agent β€” preconfigured with Omniroute β€”
Cline VS Code coding agent β€” preconfigured with Omniroute β€”
ModelRelay OpenAI-compatible local router β€” benchmarks free coding models and routes to the best provider 7352
OmniRoute OpenAI-compatible local router with MCP support β€” benchmarks free models and routes to the best provider 20128
Mnemon Persistent memory layer for AI agents (no token limits) β€”
Ollama Local LLM inference server for nomic-embed-text to support Mnemon 11434

Why Hermes-CodeSpace?

Problem Solution
GitHub Copilot free monthly trial expires Free forever β€” runs on free tier models via OmniRoute/ModelRelay
Vendor lock-in Multi-provider routing β€” auto-routes to best free model (DeepSeek, Nemotron, etc.)
Context loss between sessions Mnemon memory β€” persistent, unlimited memory across sessions
Context switching between tools Unified IDE β€” Hermes, Claude Code, and Cline all in VS Code
Local hardware limits Cloud-native β€” runs in GitHub Codespaces (free tier: 60 hrs/mo)

Quick Start

Option 1: Use as Template (Recommended)

  1. Click "Use this template" β†’ "Create a new repository"
  2. Name your repo β†’ Create
  3. Open your new repo β†’ Code β†’ Codespaces β†’ Create codespace on main
  4. Wait 5–10 minutes for initial setup (first time only)
  5. Start coding with Hermes/Claude/Cline !

Option 2: Fork & Go Private

  1. Fork this repository
  2. Make it private (Settings β†’ Danger Zone β†’ "Change visibility" β†’ Private)
  3. Leave fork network (Settings β†’ Danger Zone β†’ "Leave fork network")
  4. Open in Codespaces β†’ Start coding privately

Tip: To pull future updates from upstream after going private:

cd .devcontainer && make update-deps
git diff .devcontainer/    # Review changes
git add -A && git commit -m "Update .devcontainer from upstream"

What Happens on First Launch

The postCreateCommand runs once during container creation (~5–10 min):

Step Description
1️⃣ Install system deps: zsh, ripgrep, tailscale
2️⃣ Install Ollama + pull nomic-embed-text embedding model
3️⃣ Install Hermes Agent (v2026.7.7.2) with ACP protocol
4️⃣ Install ModelRelay (global npm) + start on port 7352
5️⃣ Install OmniRoute (v3.8.48)
6️⃣ Configure OmniRoute: disable login, create auto-fastest combo with 8 free models
7️⃣ Configure Hermes: auto-fastest model, OmniRoute provider, ModelRelay fallback, memory enabled (Mnemon), approvals off
8️⃣ Install Mnemon memory CLI + integrate with Hermes & Claude Code
9️⃣ Install Cline + Claude Code CLI + VS Code extensions
πŸ”Ÿ Pre-configure VS Code settings for Claude Code (Omniroute endpoint)

The postStartCommand runs on every codespace start (~30 sec):

  • Starts ModelRelay, OmniRoute, Ollama
  • Starts Hermes Gateway (port 9119) + Dashboard (port 9119)
  • Runs health self-check

Verified Ports

After startup, check the PORTS panel (VS Code bottom panel) for:

Port Service Access
7352 ModelRelay API http://localhost:7352/v1
20128 OmniRoute API http://localhost:20128/v1
9119 Hermes Gateway + Dashboard http://localhost:9119
11434 Ollama API http://localhost:11434

Dashboard tip: Open port 9119 β†’ Hermes Dashboard shows agent status, sessions, and model routing.


Using the Agents

Hermes Agent (Terminal)

hermes                    # Interactive chat
hermes "refactor foo.ts"  # One-shot task

Hermes VS Code Extension

  • Cmd/Ctrl + Shift + P β†’ "Hermes: Chat"
  • Inline suggestions via ACP protocol
  • Terminal integration via hermes command

Claude Code CLI

claude                    # Interactive (uses ModelRelay @ localhost:7352)
claude -p "fix bug"       # One-shot

Cline (VS Code Extension)

  • Click Cline icon in sidebar β†’ Chat with free models via Omniroute

Memory & Persistence (Mnemon)

Hermes-CodeSpace's Agents integrates Mnemon for persistent, unlimited memory that are across session and agents. Hermes auto-uses Mnemon when memory.provider=mnemon (configured by default). Claude Code also gets Mnemon via mnemon setup --yes --global --target claude-code.

Example

# Get Claude to remember something
claude -p "remember my name is fart-man"  

# Get Hermes to recall
hermes chat -q "what is my name"

Configuration

Hermes Config (~/.hermes/config.yaml)

model:
  default: auto-fastest
  provider: omniroute
providers:
  omniroute:
    base_url: http://localhost:20128/v1
    api_key: no-key-needed
  modelrelay:
    base_url: http://localhost:7352/v1
    api_key: no-key-needed
fallback_providers:
  provider: modelrelay
  model: auto-fastest
memory:
  memory_enabled: true
  user_profile_enabled: true
  provider: mnemon
approvals:
  mode: off
agent:
  max_turns: 120

OmniRoute Models (Pre-configured auto-fastest Combo)

Model Provider
oc/deepseek-v4-flash-free OpenCode
oc/big-pickle OpenCode
opencode-zen/deepseek-v4-flash-free OpenCode-Zen
opencode-zen/hy3-free OpenCode-Zen
opencode-zen/mimo-v2.5-free OpenCode-Zen
opencode-zen/north-mini-code-free OpenCode-Zen
opencode-zen/nemotron-3-ultra-free OpenCode-Zen
opencode-zen/big-pickle OpenCode-Zen

Strategy: auto β€” benchmarks all models, routes to fastest healthy one.

Add Your Own Models (API Keys)

# Via OmniRoute dashboard (port 20128)
open http://localhost:20128

# Or via CLI
omniroute provider add openrouter --api-key sk-or-xxx
omniroute model add openrouter/anthropic/claude-3.5-sonnet
omniroute combo add my-combo --strategy auto --models openrouter/anthropic/claude-3.5-sonnet,oc/deepseek-v4-flash-free
hermes config set model.default my-combo

Updating from Upstream

After forking and going private:

cd .devcontainer && make update-deps
# Review changes
git diff .devcontainer/
# Commit if satisfied
git add -A && git commit -m "Update .devcontainer from upstream"

What make update-deps does:

  • Clones upstream to temp directory
  • rsyncs .devcontainer/ (excludes hidden files like .git/, .env)
  • Preserves your custom files

Local Development Alternative

Prefer running locally? See hermes-webtop β€” Docker-based setup for your own machine with the same stack + Linux WebTop


Troubleshooting

View Setup Logs

code /tmp/hermes-codespace.log    # Full setup log
tail -f /tmp/hermes-codespace.log # Follow live

Service Logs

tail -f /tmp/modelrelay.log
tail -f /tmp/omniroute.log
tail -f /tmp/ollama.log
tail -f ~/.hermes/logs/gateway.log
tail -f ~/.hermes/logs/dashboard.log

Health Check

.devcontainer/self-check.sh
# Outputs JSON report to /tmp/health-report.json
# Exit codes: 0=OK, 1=warnings, 2=critical failures

Common Issues

Issue Fix
Ports not showing Wait 1–2 min; check post-start-cmd.sh logs
OmniRoute no models omniroute combo list β†’ ensure auto-fastest exists
Hermes "model not found" hermes config get model.default β†’ should be auto-fastest
Mnemon not working mnemon --version β†’ should show 0.1.17
Disk full Run .devcontainer/free-disk.sh

Reset Everything (Nuclear)

# In codespace terminal
rm -rf ~/.hermes ~/.mnemon ~/.omniroute ~/.ollama
# Then rebuild codespace (Codespaces β†’ ... β†’ Rebuild)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      GitHub Codespace                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  VS Code + Extensions                                           β”‚
β”‚  β”œβ”€ Hermes Extension (ACP)                                      β”‚
β”‚  β”œβ”€ Claude Code Extension                                       β”‚
β”‚  └─ Cline Extension                                             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Terminal Agents                                                β”‚
β”‚  β”œβ”€ hermes (CLI + Gateway + Dashboard)                          β”‚
β”‚  β”œβ”€ claude (CLI via Omniroute)                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Model Routers (OpenAI-compatible)                              β”‚
β”‚  β”œβ”€ OmniRoute  :20128  β†’ 8 free models (auto-fastest)           β”‚
β”‚  β”œβ”€ ModelRelay :7352   β†’ fallback router                        β”‚
β”‚  └─ Ollama     :11434  β†’ local embeddings (nomic-embed-text)    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Memory Layer                                                   β”‚
β”‚  └─ Mnemon (SQLite, no token limits, persists across sessions)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

File Structure

hermes-codespace/
β”œβ”€β”€ README.md                    # This file
β”œβ”€β”€ LICENSE                      # MIT License
β”œβ”€β”€ .devcontainer/
β”‚   β”œβ”€β”€ devcontainer.json        # Dev Container spec
β”‚   β”œβ”€β”€ post-create-cmd.sh       # One-time setup (runs on create)
β”‚   β”œβ”€β”€ post-start-cmd.sh        # Runs on every start
β”‚   β”œβ”€β”€ start-hermes.sh          # Service startup orchestrator
β”‚   β”œβ”€β”€ self-check.sh            # Health check (ports, models, disk, memory)
β”‚   β”œβ”€β”€ Makefile                 # update-deps target
β”‚   β”œβ”€β”€ free-disk.sh             # Cleanup script
β”‚   β”œβ”€β”€ skill-memory-automation.md  # Hermes memory skill
β”‚   β”œβ”€β”€ cline-globalState.json   # Cline preset config
β”‚   β”œβ”€β”€ cline-secrets.json       # Cline preset secrets
β”‚   β”œβ”€β”€ claude-term-settings.json # Claude Code settings
β”‚   β”œβ”€β”€ .claude.json             # Claude Code global config
β”‚   β”œβ”€β”€ CLAUDE.md                # Claude Code instructions
β”‚   β”œβ”€β”€ .hermes.md               # Hermes user memory template
β”‚   └── screen-shot.png          # Dashboard screenshot
└── .github/
    └── dependabot.yml           # Dependabot config for devcontainer deps

Contributing

  1. Fork β†’ Create feature branch
  2. Test in Codespace (make update-deps to sync)
  3. Run ./self-check.sh before committing
  4. PR with clear description

License

MIT β€” see LICENSE


Credits

Built on amazing open-source projects:


Star ⭐ this repo if it saves you time!
Issues & PRs welcome.

About

Template for Hermes Coding Assistance in CodeSpace

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages