AWS Builder Center
Deploying Hermes Agent on AWS: A Quick-Start Guide

Deploying Hermes Agent on AWS: A Quick-Start Guide

In this blog post, I'll walk you through the entire process of deploying Hermes on AWS, breaking it down into simple, step-by-step instructions.

1. Introduction

Hermes Agent is an open-source, self-evolving AI Agent framework from Nous Research. It continuously learns through multi-turn conversations, automatically distills reusable skills, and can even chat with you through instant messaging platforms like WeChat and Telegram.
You might wonder: Why deploy on the cloud instead of running locally?
Three reasons:
  • Hassle-free: No local resource consumption, runs 24/7
  • Secure: API keys stored in a cloud secret management service
  • Scalable: Start with t3.small, upgrade anytime to higher specs
This guide walks you through deploying Hermes Agent on AWS step by step. Even if you're new to cloud services, you'll be up and running in 15-20 minutes at a cost as low as $25/month.



2. Technical Background

What is Hermes Agent?

Hermes Agent is an open-source AI Agent framework with self-evolving capabilities. Unlike traditional agents, it offers these core features:
Persistent Memory System
After each conversation, Hermes automatically saves important information to  MEMORY.md  and  USER.md , which are loaded automatically in the next session. This means it remembers your preferences and project context — the more you use it, the better it understands you.
Skills System
Hermes doesn't just complete tasks — it learns how to complete them. It automatically creates and improves reusable skill documents that can be invoked by other agents. There are currently ~90 built-in skills, with more available from the agentskills.io community.
Single Gateway, Multi-Platform Access
A single Hermes Agent instance can connect to 15+ messaging platforms simultaneously: Telegram, Discord, Slack, WeChat, Signal, Email, Lark, WeCom, and more — no need for separate deployments per platform.

System Requirements

Resource
Minimum
Recommended
CPU
1 core
2 cores
RAM
1 GB
2-4 GB
Disk
500 MB
2+ GB
Python
3.11+
3.11
Node.js
v22
v22

Officially Supported Backends

Hermes Agent supports 6 execution backends:
Backend
Description
Local
Run directly on your machine (used in this guide)
SSH
Connect to a remote machine
Daytona
Serverless, near-zero cost
Singularity
HPC container environment
Modal
Serverless, near-zero cost



3. AWS Deployment Plan

EC2 + Direct Installation

Three reasons:
  1. Lowest cost: t3.small instance + 20 GB EBS, only $25/month
  1. Simple and intuitive: Official one-click script handles all dependencies — no need to manually install Python or Node.js
  1. Flexible and controllable: SSH access for debugging and configuration changes

Resource Breakdown

AWS Resource
Specs
Monthly Cost Estimate
EC2
t3.small (2 vCPU, 2 GB)
~$15
EBS
gp3 20 GB
~$2
S3
Standard storage 5 GB
~$0.15
Secrets Manager
5 secrets (optional)
~$3 (optional)
Data Transfer
50 GB/month
~$5
Total (without Secrets Manager)

~$22/month
Total (with Secrets Manager)

~$25/month



4. Step-by-Step Deployment

Step 0: Prerequisites

Before you begin, make sure you have:
  • ✅ AWS IAM user with EC2 management permissions
  • ✅ SSH key pair (for EC2 login)
  • ✅ Credit card (AWS requires it for pay-as-you-go billing)

Step 1: Configure Security Group

A security group acts as a virtual firewall, controlling which traffic can flow in and out of your EC2 instance.

1.1 Create a Security Group

In the EC2 console, select "Security Groups" from the left sidebar, then click "Create security group".

1.2 Configure Inbound Rules

Type
Port Range
Source
Description
SSH
22
Your IP
Allow only your IP for SSH access
HTTPS
443
0.0.0.0/0
Web access (optional)
Custom TCP
8080
Your IP
Hermes Web Dashboard (optional)

1.3 Configure Outbound Rules

Leave the default — allow all outbound traffic.
Security reminder: Always restrict SSH port 22 to your fixed IP address. Never open it to 0.0.0.0/0.



Step 2: Create IAM Role (Authorize EC2 to Access AWS Services)

To allow your EC2 instance to access Bedrock and Secrets Manager, you need to create an IAM role first.

2.1 Create IAM Role

  1. Search for IAM in the AWS console and navigate to the IAM dashboard
  1. Select "Roles" from the left menu → Click "Create role"
  1. Trusted entity type: Select "AWS service"
  1. Use case: Select "EC2" → Click "Next"
  1. Add permissions: Skip for now (we'll add them next), click "Next"
  1. Role name: Enter  hermes-agent-bedrock-role 
  1. Click "Create role"

2.2 Add Bedrock Permissions

  1. Find the  hermes-agent-bedrock-role  role you just created in the IAM console
  1. Click the role name to enter its details page
  1. Click "Add permissions" → "Create inline policy"
  1. Select the "JSON" tab and enter the following policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream",
"bedrock:ListFoundationModels"
],
"Resource": "*"
}
]
}

  1. Click "Next"
  1. Policy name: Enter  BedrockAccessPolicy 
  1. Click "Create policy"

2.3 Add Secrets Manager Read Permissions (Optional)

⚠️ Only required if you use third-party APIs like OpenRouter/OpenAI. If you only use Bedrock, skip this step.
  1. In the IAM console, go to the  hermes-agent-bedrock-role  role details page
  1. Click "Add permissions" → "Create inline policy"
  1. Select the "JSON" tab and enter the following policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue",
"secretsmanager:DescribeSecret"
],
"Resource": "arn:aws:secretsmanager:*:*:secret:hermes-agent/*"
}
]
}

  1. Click "Next"
  1. Policy name: Enter  SecretsManagerReadPolicy 
  1. Click "Create policy"
Verification: Once the role is created, you'll be able to see it in the "Advanced details" section of the EC2 launch wizard (referenced in Step 3).



Step 3: Create EC2 Instance

3.1 Log in to AWS Console

Go to  https://console.aws.amazon.com  and log in with your account.

3.2 Navigate to EC2 Console

Type EC2 in the top search bar and click to enter the EC2 console.

3.3 Launch a New Instance

Click the "Launch instance" button.

3.4 Configure Instance Parameters

Parameter
Recommended Value
Name
hermes-agent
AMI
Ubuntu Server 24.04 LTS (HVM), SSD Volume Type
Instance type
t3.small (2 vCPU, 2 GB RAM)
Key pair
Select an existing key pair or create a new one
Network settings
Default VPC or your private VPC
Firewall
Select existing security group (see Step 1)
Storage
20 GB gp3 (default)
Advanced details → IAM instance profile
Select hermes-agent-bedrock-role (see Step 2)
Advanced details → User data
Leave empty (Hermes will be installed via the official script later)
Click "Launch instance".
Tip: It takes 1-2 minutes for the instance to start. You can check the status on the EC2 console's "Instances" page.

Step 4: Connect to Your EC2 Instance

4.1 Get the Public IP

On the EC2 console's "Instances" page, find your  hermes-agent  instance and copy its Public IPv4 address.

4.2 Log in via SSH

ssh -i /path/to/your-key.pem ubuntu@<your-EC2-public-IP>

For example:
ssh -i ~/.ssh/hermes-key.pem ubuntu@54.123.45.67

First-time login: If this is your first time connecting to this host, the terminal will ask you to verify the host fingerprint. Type  yes  to confirm.

Step 5: Verify Network Connectivity

Before installing Hermes Agent, confirm that your EC2 instance has internet access to avoid installation failures.

5.1 Check Public IP

Select the  hermes-agent  instance in the EC2 console and check the Public IPv4 address in the details:
  • ✅ Has an address (e.g.,  54.xxx.xxx.xxx ): A public IP is assigned, proceed to the next test
  • ❌ Empty: You need to allocate an Elastic IP (EIP) — see the "Allocate Elastic IP" step below
Note: If the instance has no public IP, you must allocate an EIP to access the internet.

5.2 Allocate and Associate an Elastic IP (if needed)

If the instance has no public IP, follow these steps:
  1. In the EC2 console, select "Elastic IPs" from the left menu
  1. Click "Allocate Elastic IP address"
  1. Select "Amazon's pool of IPv4 addresses", then click "Allocate"
  1. Once allocated, select the IP, click "Actions" → "Associate Elastic IP address"
  1. Select the  hermes-agent  instance and its private IP, then click "Associate"
Cost note: An EIP associated with a running instance is free. An unassociated EIP (while the instance is stopped) costs approximately $0.005/hour.

5.3 Check Route Table (Subnet Internet Gateway)

  1. EC2 console → "Network Interfaces" in the left menu
  1. Find the network interface of the  hermes-agent  instance, note its Subnet ID
  1. Go to the VPC console → "Route Tables"
  1. Filter for the route table associated with this subnet and check for the following route:
Destination
Target (Next Hop)
Status
0.0.0.0/0
igw-xxxxxxxx (Internet Gateway)
✅ Normal — instance can access the internet
No 0.0.0.0/0 route
—
❌ Cannot access the internet
If the internet gateway route is missing:
  1. VPC console → "Internet Gateways" → "Create internet gateway"
  1. Attach the internet gateway to your current VPC
  1. Add a  0.0.0.0/0  route pointing to the internet gateway in the route table

5.4 Test Network Connectivity

After SSH-ing into your EC2 instance, run:
# Test DNS resolution
nslookup mirrors.aliyun.com

# Test network connectivity
ping -c 3 8.8.8.8

# Test HTTPS access
curl -I https://mirrors.aliyun.com

Expected results:
Command
Normal Result
nslookup
Returns the mirror site's IP address
ping
Receives replies, no 100% packet loss
curl -I
Returns HTTP/1.1 200 OK or 302 Found
If  ping  works but  curl  fails: Likely a DNS issue. Try:
# Manually set DNS
sudo echo "nameserver 8.8.8.8" >> /etc/resolv.conf

If there's no network at all: Go back to Steps 5.2 and 5.3 to check the EIP and route table.



Step 6: Install Hermes Agent (Official One-Click Script)

Hermes Agent provides an official one-click installation script that automatically handles all dependencies — no need to manually install Python or Node.js.

6.1 Run the Official Install Script

After SSH-ing into your EC2 instance, run:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

The script automatically performs the following:
  • Installs  uv  (high-performance Python package manager)
  • Installs Python 3.11 (via uv, no sudo needed)
  • Installs Node.js v22 (for browser automation and WeChat bridging)
  • Installs  ripgrep  (high-speed file search)
  • Installs  ffmpeg  (TTS audio format conversion)
  • Clones the Hermes Agent repository
  • Creates a virtual environment
  • Sets up the global  hermes  command
Installation time: Approximately 2-5 minutes (depending on network speed).



6.2 Verify Installation

# Reload shell configuration (to activate the hermes command)
source ~/.bashrc

# Check if the hermes command is available
which hermes
# Should output: /home/ubuntu/.local/bin/hermes or ~/.local/bin/hermes

# Check version
hermes --version

✅ Verification successful:  hermes --version  outputs a version number with no errors.
❌ If  hermes  command is not found:
# Manually reload configuration
source ~/.bashrc

# If that doesn't work, check if installation succeeded
ls ~/.hermes/hermes-agent/
# If the directory exists, create a symlink manually
sudo ln -sf ~/.hermes/hermes-agent/scripts/hermes.sh /usr/local/bin/hermes




6.3 Run Diagnostics (Optional but Recommended)

hermes doctor

This command checks all dependencies and tells you if anything is missing.
Expected output:
✅ Python 3.11.x found
✅ Node.js v22.x found
✅ ripgrep found
✅ ffmpeg found
✅ Hermes Agent installed successfully




6.4 Start Hermes and Test

hermes

The first run will launch an interactive setup wizard. Follow the prompts to select your LLM Provider and model.
Success indicator: You enter the Hermes conversation interface and can type messages to receive AI responses.
Tip: Type  /exit  or press  Ctrl+C  to exit the conversation.



Step 7: Configure Secrets Manager (Optional)

⚠️ Only required if you use third-party APIs like OpenRouter/OpenAI. If you only use Bedrock, skip this step.
To securely manage API keys, we use AWS Secrets Manager.

7.1 Create Secrets

Search for Secrets Manager in the AWS console, then click "Store a new secret".
Select "Other type of secret" and add the following keys (based on the services you need):
Key Name
Example Value
OPENAI_API_KEY
sk-xxxxxxxxxxxxxxxx
OPENROUTER_API_KEY
sk-or-v1-xxxxxxxx
WECHAT_SESSION_DIR
/opt/data/wechat
ANTHROPIC_API_KEY
sk-ant-xxxxxxxx
Click "Next", set the secret name to  hermes-agent/api-keys , then click "Store".



5. Configuration and Usage

Hermes Agent supports multiple LLM Provider configurations, including AWS Bedrock, OpenRouter, OpenAI, and more. Below are the detailed configuration steps with screenshots:

Run the  hermes  command to enter Quick Setup



Select AWS Bedrock as the LLM Provider



Configure Model Region



Select Gateway: WeChat



Configure WeChat Parameters



Verify the Model is Working



Verify WeChat Integration





6. Troubleshooting Guide (Real-World Debugging Experience)

The following are typical issues encountered during actual deployment, along with their solutions.

Issue 1: Missing boto3 (Bedrock Provider Error)

Error message:
⚠️ API call failed (attempt 1/3): ImportError
🔌 Provider: bedrock Model: deepseek.v3.2
🌐 Endpoint: https://bedrock-runtime.us-east-1.amazonaws.com
📝 Error: The 'boto3' package is required for the AWS Bedrock provider.
Cause: Hermes Agent requires the  boto3  package to use Bedrock, but it's not installed in the current Python environment.
Solution:
Navigate to the  ~/.hermes/hermes-agent  directory and install dependencies using  uv sync :
cd ~/.hermes/hermes-agent
uv sync --extra bedrock



Issue 2: PEP 668 Externally-Managed Environment Error

Error message:
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install python3-xyz
Cause: Ubuntu's PEP 668 protection mechanism prevents pip from polluting the system Python. Never use  --break-system-packages .
Solution (choose one):
Method 1: Use  pip install --user  (simplest)
pip install --user boto3
Method 2: Use  uv sync  (recommended for source installs)
cd ~/.hermes/hermes-agent
uv sync --extra bedrock
Method 3: Create a venv first
python3 -m venv ~/.hermes/venv
source ~/.hermes/venv/bin/activate
pip install boto3



Issue 3:  which python  Returns Empty

Error message:
ubuntu@ip:~$ which python
ubuntu@ip:~$
Cause: Ubuntu typically only has  python3 , not  python  (this is normal).
Solution:
# Use python3 instead
python3 --version

# Or create a symlink
sudo ln -s /usr/bin/python3 /usr/bin/python



Issue 4:  uv tool install boto3  Fails

Error message:
uv tool install boto3
error: Failed to install entrypoints for `boto3`
Cause:  uv tool install  is designed for packages with executable entry points (like  black ,  ruff ).  boto3  is a pure library with no executable entry point, so it fails. Even if it succeeded, each uv tool runs in an isolated environment that Hermes wouldn't use.
Correct approach: Install boto3 into Hermes's own environment:
cd ~/.hermes/hermes-agent
uv sync --extra bedrock



Issue 5:  hermes-agent  Is Not on PyPI

Error message:
uv tool install --force --with boto3 hermes-agent
× No solution found when resolving dependencies:
╰─▶ Because hermes-agent was not found in the package registry...
Cause: Hermes Agent is a GitHub open-source project and is not available on PyPI. You can't install it via  pip install hermes-agent .
Correct installation (from source):
# 1. Clone the repository
git clone https://github.com/NousResearch/hermes-agent.git ~/.hermes/hermes-agent

# 2. Enter the directory and install via uv
cd ~/.hermes/hermes-agent
uv sync --extra bedrock



Issue 6:  uv sync  Succeeds but  hermes  Still Reports Missing boto3

Error message:
uv sync --extra bedrock
# Shows success

hermes
# Still reports missing boto3
Root cause:  uv sync  installs dependencies into  ~/.hermes/hermes-agent/.venv , but the  hermes  command points to the old environment ( ~/.hermes/hermes-agent/venv  or the system Python). The two environments are isolated.
Diagnosis:
# Check where the hermes command points
cat ~/.local/bin/hermes
If the output looks like:
#!/usr/bin/env bash
unset PYTHONPATH
unset PYTHONHOME
exec "/home/ubuntu/.hermes/hermes-agent/venv/bin/hermes" "$@"
Note the path is  venv  (no dot), but  uv sync  creates  .venv  (hidden directory with a dot) — that's the problem.
Solution: Modify the  ~/.local/bin/hermes  script
# Method 1: Update the script to point to .venv (simplest)
cat > ~/.local/bin/hermes << 'EOF'
#!/usr/bin/env bash
unset PYTHONPATH
unset PYTHONHOME
exec "/home/ubuntu/.hermes/hermes-agent/.venv/bin/hermes" "$@"
EOF

chmod +x ~/.local/bin/hermes
# Method 2: Use uv run (more robust, recommended)
cat > ~/.local/bin/hermes << 'EOF'
#!/usr/bin/env bash
unset PYTHONPATH
unset PYTHONHOME
cd "/home/ubuntu/.hermes/hermes-agent"
exec uv run hermes "$@"
EOF

chmod +x ~/.local/bin/hermes
Verification:
which hermes
hermes --version
hermes



Debugging Experience Summary

Issue
Key Point
Correct Solution
Missing boto3
Required for Bedrock
uv sync --extra bedrock
PEP 668 error
Don't use --break-system-packages
Use uv sync or pip install --user
which python empty
Ubuntu only has python3
Use python3 or create a symlink
uv tool install boto3 fails
boto3 is a pure library, no entry point
Install into Hermes's own environment
hermes-agent not on PyPI
It's a GitHub project
Clone and install from source
uv sync succeeds but Hermes still errors
Script points to old environment
Modify the ~/.local/bin/hermes script





Related Resources

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article