Skip to main content

Deploy Hermes Agent on GMI AgentBox (GitHub)

Deploy a locally running Hermes Agent to the cloud using GMI AgentBox, straight from GitHub, fully automated. Docker is handled entirely by GitHub Actions.
Prerequisites:

Overview

Step 1: Fork the Repo and Push AgentBox Files

Navigate to your local Hermes Agent directory:
Fork the upstream NousResearch repo (runs on GitHub servers, nothing heavy to upload):
Connect your local code to your fork and push. Run these commands in order:
What each command does:
  • git remote add myfork saves your fork’s address as a bookmark called myfork. Nothing uploads yet.
  • git add stages only the AgentBox deploy files and publish workflow.
  • git commit saves a snapshot of those changes locally.
  • git pull --rebase pulls any updates from your fork first so your push goes through cleanly.
  • git push myfork main sends your code to GitHub. Your code is now live on your fork.
⚠️ REQUIRED: .github/workflows/agentbox-publish.yml This workflow file must exist in your repo before pushing. If it does not exist yet, create it at .github/workflows/agentbox-publish.yml with the following content:
The GITHUB_TOKEN secret is auto-injected by GitHub. You do not need to create it.
⚠️ REQUIRED: deploy/agentbox/Dockerfile.agentbox Create this file in your repo before pushing. Your workflow calls it directly to build the AgentBox layer on top of your base image. Run this in your terminal to create it:
Paste this content and save:
The BASE_IMAGE value is injected automatically by the workflow. You do not need to hardcode anything.

Step 2: GitHub Actions Builds and Publishes the Image

  1. Open your fork on GitHub and click the Actions tab
  2. If prompted, click “I understand my workflows, enable them” (forks have Actions paused by default)
  3. Select “Publish AgentBox image” in the left sidebar
  4. Click Run workflow then Run
GitHub builds the base image, layers on the AgentBox config, and pushes both to GitHub Packages with two tags: :base and :latest. Your image will be available at:
Note: The first build takes 5-10 minutes. Subsequent builds are faster due to Docker layer caching.

Step 3: Make the Image Public on GitHub Packages

New packages are private by default. AgentBox pulls your image directly from this URL, so visibility must be set to public before registering.
  1. Go to your GitHub profile
  2. Click Packages and select hermes-agentbox
  3. Go to Package settings, then Change visibility, then Public
    ⚠️ If you prefer to keep the image private, skip this step and instead set Enable Credentials: ON in the AgentBox registration form, then provide a GitHub Personal Access Token (PAT) with read:packages scope.

Step 4: Register and Configure on GMI AgentBox

Go to console.gmicloud.ai, then AgentBox, then Register. Fill in the form:

Environment Variables

GMI AgentBox auto-injects the following. Leave these out of the form:
  • GMI_MAAS_API_KEY
  • GMI_MAAS_BASE_URL
Add the following custom variables: Click Register.

Save Your AgentBox API Key

After registering, AgentBox generates a unique API key for your agent. Save this immediately. It is shown only once and is separate from your GMI Cloud inference API key.

Step 5: Run Your Instance and Test in Discord

Via dashboard:
Click your registered agent, then Create Instance, confirm settings, then Launch.
Via CLI:
Instance creation takes approximately 1–2 minutes. Once running, open your Discord server and send a message in the configured channel. Hermes Agent will respond in real time, powered by DeepSeek-V4-Pro via GMI Cloud.