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:
- Hermes Agent running locally (see setup guide →)
- GitHub account with
ghCLI authenticated (gh auth login) - GMI Cloud account → console.gmicloud.ai
- A Discord bot token (create one →)
Overview
Step 1: Fork the Repo and Push AgentBox Files
Navigate to your local Hermes Agent directory:What each command does:
git remote add myforksaves your fork’s address as a bookmark calledmyfork. Nothing uploads yet.git addstages only the AgentBox deploy files and publish workflow.git commitsaves a snapshot of those changes locally.git pull --rebasepulls any updates from your fork first so your push goes through cleanly.git push myfork mainsends your code to GitHub. Your code is now live on your fork.
⚠️ REQUIRED:.github/workflows/agentbox-publish.ymlThis workflow file must exist in your repo before pushing. If it does not exist yet, create it at.github/workflows/agentbox-publish.ymlwith the following content:TheGITHUB_TOKENsecret is auto-injected by GitHub. You do not need to create it.
⚠️ REQUIRED:deploy/agentbox/Dockerfile.agentboxCreate 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
- Open your fork on GitHub and click the Actions tab
- If prompted, click “I understand my workflows, enable them” (forks have Actions paused by default)
- Select “Publish AgentBox image” in the left sidebar
- Click Run workflow then Run
: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.- Go to your GitHub profile
- Click Packages and select hermes-agentbox
- 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:packagesscope.
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_KEYGMI_MAAS_BASE_URL
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: