Skip to content

🤖 Hermes Agent

Nous Research Hermes Agent is an open-source, local agentic loop framework. It is designed to act as an autonomous terminal assistant that can generate custom Python skills, interact with local command-line tools, and connect with relational and vector databases.

For detailed modules, see:


📊 Tool Datasheet

MetricDetails
Tool NameNous Research Hermes Agent
CategoryAutonomous Local Agent Framework
PurposeTo execute cognitive agent tasks, write and run local Python code dynamically, and recall memories from vector databases.
LicenseApache 2.0
IntegrationsOllama (Local), Google Gemini, PostgreSQL/pgvector

🛠️ Capabilities

  1. Dynamic Skill Compilation: Generates and compiles Python scripts inside a local ./skills/ directory to teach itself new capabilities dynamically.
  2. Autonomous Terminal Partner: Can inspect files, execute shell commands, and read system diagnostics to debug code in real time.
  3. Local pgvector Memory: Direct integration with PostgreSQL databases to save context embeddings and perform semantic search.

🧭 Step-by-Step Tutorial & Setup

This tutorial guides you through setting up Hermes Agent locally, configuring it to run on Google Gemini, and writing a custom skill.

1. Environment Setup

Activate your Python environment and clone the Hermes repository:

bash
conda activate ai_dev
cd ~/AI_BOOTCAMP/labs
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
uv pip install -e .

2. Configure Environment Variables

Create a .env file in the root of the cloned repository: Path: ~/AI_BOOTCAMP/labs/hermes-agent/.env

text
### LLM Provider Credentials
LLM_PROVIDER=gemini
GEMINI_API_KEY=your_gemini_api_key_here

### Database memory URL connecting pgvector
MEMORY_DB_URL=postgresql://hermes_admin:YOUR_DB_PASSWORD@127.0.0.1:5432/hermes_vault

3. Write a Custom Skill

Create a Python file inside ./skills/read_system_info.py to give the agent system awareness: Path: ~/AI_BOOTCAMP/labs/hermes-agent/skills/read_system_info.py

python
import os
import psutil

def get_system_load() -> str:
    """Get active CPU and RAM load percentages of the workspace."""
    cpu = psutil.cpu_percent(interval=1)
    ram = psutil.virtual_memory().percent
    return f"System Load - CPU: {cpu}%, RAM: {ram}%"

4. Run the Agent

Initialize the setup wizard and start the Hermes loop:

bash
### Run wizard to select model configurations
hermes setup

### Start interactive persistent session
hermes

Inside the prompt, ask the agent:

text
hermes> Check the current system CPU load
  • What happens: The agent detects the task, imports the custom skill get_system_load, executes the Python logic, and returns the stats.

💡 Sample Ideation to Test

Try these ideas to expand your Hermes Agent integration:

  1. PostgreSQL Memory Bridge: Build a custom skill query_memories(search_term) that executes a cosine-distance similarity vector lookup on your agent_memories PostgreSQL table.
  2. Docker Sandbox Executor: Write a custom skill that wraps code execution inside a gVisor-sandboxed Docker container, protecting the host system from malicious commands.