AWS Builder Center

Deploying Hermes Agent on AWS: Self-Improving Autonomous AI with Persistent Memory

Discover how to deploy Nous Research’s open-source Hermes Agent on AWS using Amazon EC2 and Amazon Bedrock for persistent, self-improving AI agent workflows.

Deploying Hermes Agent on AWS: Self-Improving Autonomous AI with Persistent Memory Most AI assistants reset their context every time you clear a chat window. Hermes Agent, built by Nous Research, takes a fundamentally different architectural approach: it is an open-source, self-hosted autonomous agent that maintains cross-session memory, writes its own reusable skills from experience, and connects across platforms like Slack, Discord, and Telegram. In this guide, we will explore what makes Hermes Agent distinct and walk through deploying it on AWS using Amazon EC2 integrated with Amazon Bedrock. Core Capabilities of Hermes Agent Hermes Agent is designed to live on your infrastructure without telemetry or vendor lock-in: * Persistent Memory: Retains project contexts, user preferences, and problem-solving history across reboots. * Autonomous Skill Generation: When Hermes solves a novel problem, it can synthesize the solution into a structured skill file for future use. * Isolated Execution Environments: Executes tools and terminal scripts in sandboxed environments (Docker, SSH, or local sub-processes). * Multi-Channel Gateway: Integrates directly with communication tools like Slack, Discord, Telegram, Signal, and WhatsApp through a single gateway. * Vendor-Agnostic Model Support: Connects out of the box with model endpoints, including AWS Bedrock, Anthropic, OpenAI, and local LLMs. Architecture Overview on AWS A standard self-hosted deployment on AWS consists of: * Amazon EC2 (Ubuntu 24.04 LTS): Hosts the Hermes Agent runtime, Docker daemon, and gateway services. * Amazon Route 53: Provides DNS routing and facilitates automated Let's Encrypt SSL management. * Amazon Bedrock: Serves as the high-performance foundation model provider via IAM-authenticated API calls. * AWS Systems Manager / Parameter Store: Securely manages channel tokens and webhook secrets. Step-by-Step Deployment Guide Step 1: Launch and Configure an Amazon EC2 Instance * Launch a t3.large or c6i.large instance running Ubuntu 24.04 LTS. * Attach an IAM role to the instance with AmazonBedrockFullAccess (or scoped permissions for bedrock:InvokeModel). * Ensure the EC2 Security Group allows: * Inbound: 22 (SSH), 80 (HTTP), 443 (HTTPS) * Outbound: All traffic (0.0.0.0/0) Step 2: Install the Hermes Agent Runtime Connect to your EC2 instance via SSH or AWS Systems Manager Session Manager: # Update base system and install dependencies sudo apt update && sudo apt upgrade -y sudo apt install -y docker.io docker-compose curl git
# Install Hermes Agent via the official installer curl -fsSL  https://hermes-agent.nousresearch.com/install.sh  | bash
Step 3: Configure Model Endpoints with Amazon Bedrock Hermes Agent allows dynamic model configuration via its CLI: # Run Hermes model configuration sudo docker exec -it hermes hermes model
Select AWS Bedrock as your provider, select your region (e.g., us-east-1), and choose your foundation model of choice (such as Claude 3.5 Sonnet or Llama 3 models on Bedrock). Step 4: Map DNS and Secure with SSL * In Amazon Route 53, create an A Record pointing your subdomain (e.g., agent.yourdomain.com) to the EC2 Public IPv4 address. * Access your domain in a browser. Hermes Agent will automatically provision an SSL certificate via Let's Encrypt and prompt for your administrator credentials. Testing Cross-Session Memory & Skill Creation Once in the web dashboard: * Assign a Complex Task: Ask Hermes to scrape a dataset, clean it, and format it into JSON. * Review Self-Generated Skills: Check the Files, Models, and Skills tab in the dashboard. Hermes writes the methodology to its persistent storage. * Trigger via Messaging: Connect a Slack or Discord webhook in the Channels tab to issue instructions on the go.
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