TL;DR: Hermes Agent is an open-source self-learning AI Agent that gets smarter the more you use it. With OKX Agent Trade Kit, you can use natural language to have the AI monitor the market, place orders, and manage positions. No coding required—a laptop is all you need.

AI Agents Are Different from Chatbots

Let me clarify a concept that many people get confused about.

ChatGPT, Claude, and similar tools are chatbots—you ask a question, they answer, and that’s the end. They don’t do things on their own, don’t remember what you said last week, and don’t learn from failures.

An AI Agent is different. It’s a system that can act autonomously:

  • Memory — Remembers your preferences, past actions, and mistakes
  • Tools — Can execute terminal commands, read/write files, call APIs, search the web
  • Scheduling — Once configured, it’ll scan the market automatically at 3 AM
  • Learning — Every successful operation gets saved as a reusable “Skill”

That’s why using an Agent for trading makes so much sense—the market runs 24/7, and you can’t watch it around the clock, but an Agent can. Plus, it won’t chase highs or panic sell due to emotions.


Hermes Agent: An AI That Evolves Itself

Hermes Agent is an open-source Agent framework released by Nous Research (mid-2025, still actively updated). What sets it apart from other Agent tools is its closed learning loop:

  1. Execute — Complete the task you assigned using tools
  2. Reflect — Analyze what worked and what went wrong
  3. Record — Save successful workflows as Skills (reusable abilities)
  4. Next time is faster — When facing similar tasks, it pulls from learned Skills

Sounds abstract, let me give you a concrete example:

The first time you tell Hermes “Check BTC’s current price and funding rate, remind me if funding rate exceeds 0.1%,” it’ll figure things out—look up commands, try APIs, piece together results. But after completing it, the entire workflow gets saved as a Skill automatically. Next time you say the same thing, it completes instantly.

The longer you use it, the smarter it gets. That’s not marketing talk—it’s the core architectural design.


Step 1: Install Hermes Agent

Linux / macOS / WSL2

One line does it:

1
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

The installer auto-detects your system and sets up all required dependencies (Python, Node.js, ripgrep, etc.). The only prerequisite is having git installed.

Verify the installation:

1
hermes --version

If you see a version number, you’re good to go.

Windows Users

Method A: Native PowerShell (Early Beta)

1
2
# Run PowerShell as Administrator
irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1 | iex

Native Windows support is still in early beta—works, but not as stable as Linux/macOS. If you hit issues, switch to Method B.

Method B: WSL2 (Recommended)

1
2
3
4
5
# First install WSL2 (PowerShell as Administrator)
wsl --install

# After entering WSL2, run the Linux install command
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

Android (Termux)

Yep, you can even run it on your phone. After installing Termux, the same curl command works.


Step 2: Give Your Agent a Brain — Configure the LLM

Hermes Agent is just a framework—you get to choose its brain. It supports 200+ models via OpenRouter or local Ollama.

OpenRouter is a model marketplace—one API Key gives you access to hundreds of models.

1. Sign up for OpenRouter

Go to openrouter.ai and grab your API Key (format: sk-or-...).

2. Interactive Setup

1
hermes model

It’ll list all supported providers. Pick OpenRouter, then choose your model.

3. Set the API Key

1
hermes config set OPENROUTER_API_KEY sk-or-xxxxxxxxxxxxxxxx

That’s it. Three commands, brain installed.

Method B: Local Ollama (Free but Requires Hardware)

If you have a decent GPU (at least 8GB VRAM), you can run models locally—completely free:

1
2
3
4
5
6
7
8
9
# First install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Download a model (Hermes 3 or Qwen 2.5 recommended)
ollama pull hermes3:70b

# Back to Hermes Agent setup
hermes model
# Select Ollama and point to your local model

How to Pick a Model?

One hard requirement: The model must have at least 64K context window. Below that, the Agent loses context during multi-step tasks—basically, not enough brainpower.

NeedRecommended ModelNotes
Budget-friendlyLlama 3.1 70BAffordable on OpenRouter, solid performance
Best reasoningClaude Sonnet 4Top pick for complex trading analysis
Completely freeHermes 3 (Ollama)Requires local GPU
Balanced choiceQwen 2.5 72BGreat value, strong Chinese capabilities

Configure a Fallback Model

What if the main model goes down? Hermes supports automatic failover:

Add to ~/.hermes/config.yaml:

1
2
3
fallback_model:
  provider: openrouter
  model: anthropic/claude-sonnet-4-5

When rate limits, server errors, or connection issues hit the main model, Hermes automatically switches to the fallback—your conversation keeps going without interruption.


Step 3: Explore the Tool Ecosystem

Now that the brain is set up, let’s check out what “hands and feet” the Agent has.

Built-in Tools

1
hermes tools

This command lists all available tools and lets you choose which ones to enable. Hermes comes with 40+ built-in tools:

  • File operations — Read/write files, search content
  • Terminal — Execute bash commands
  • Web search — Get info in real-time
  • Code analysis — Understand source code

MCP: The Standard Protocol for Connecting External Services

MCP (Model Context Protocol) is the standard interface for AI Agents to connect to external tools. Think of it like USB—as long as the device supports USB, you can plug it in and use it.

Hermes has native MCP support, meaning any service that provides an MCP Server can be connected directly to Hermes. The OKX integration we’ll do later uses exactly this MCP approach.

Skills: Reusable Abilities for Agents

This is Hermes’s killer feature. When an Agent completes a complex task (usually involves 5+ tool calls), it automatically organizes the successful workflow into a Skill—a structured skill document.

Next time it faces something similar, no need to figure it out from scratch—just pull the existing Skill.

You can also manually install Skills from the community or official sources. The OKX trading Skill pack we’ll install uses this exact mechanism.


What’s Next: Complete Walkthrough from Installation to Automated Trading

The first three steps gave you a thinking, remembering Agent. The next four steps are where the magic happens—connect to the OKX exchange, place your first AI trade, set up automated scheduling, and let the Agent learn on its own.

We’ve compiled the complete walkthrough + our team’s real-world experience into a free PDF guide, including:

  • OKX Integration Full Walkthrough: Account setup → Secure API Key configuration → CLI installation → Demo mode verification
  • AI Trading Conversation Examples: Complete dialogue demos for placing orders, checking positions, analyzing the market
  • Cron Automated Scheduling: Ready-to-copy market scanning + auto-position-opening commands
  • Self-Learning System Setup: Actual configuration for Skills, Memory, and Soul files
  • Our Team’s 3-Month Risk Management Parameters: Specific values for single-trade risk, daily loss limits, leverage, and layered take-profit/stop-loss with explanations
  • Pitfalls We Hit: Trusting AI too much, no daily loss limits, going live from Demo too soon… we’ve already stepped in these pitfalls for you

Free: AI Auto-Trading Guide + Our Team's Risk Parameters (PDF)

OKX setup, AI trading examples, Cron scheduling commands, plus our team's 3-month battle-tested risk parameters and lessons learned.


Before You Start: Safety Considerations

Automated trading is convenient, but it can bite back. Whether you’re using AI for trading or not, these principles apply:

API Key Security

  • Never enable withdrawal permissions — AI only needs read and trade permissions
  • Set up IP whitelisting — Only allow your host’s IP to use the API
  • Use sub-accounts — Keep your main account funds separate from the AI account
  • Rotate regularly — Change your API Key at least every 90 days

Capital Management

  • Only invest what you can afford to lose — AI isn’t a money printer
  • Set daily loss limits — Stop when you hit the limit, come back tomorrow
  • Diversify risk — Don’t put all your capital into one strategy

The Right Way to Go from Demo to Real

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Run Demo for 2 weeks
Stable win rate above 50%?
Yes → Small real money test (10% of account funds)
Run for 2 weeks, results match expectations?
Yes → Gradually increase (but single-trade risk still ≤ 2%)
No → Back to Demo, adjust strategy

Never go live with any strategy that hasn’t been verified in Demo. Never.


Common Errors and Troubleshooting

Error 1: hermes: command not found

Cause: Shell environment wasn’t reloaded after installation Fix:

1
2
3
source ~/.bashrc   # bash users
source ~/.zshrc    # zsh users (macOS default)
# Or just open a new terminal window

Error 2: Model requires at least 64K context

Cause: Selected model’s context window is too small Fix: Switch to a larger model. Use hermes model to reselect—check the context size.

Error 3: OKX API key invalid

Cause: API Key is wrong, or Demo/Live mode doesn’t match Fix:

1
2
3
4
5
# Reconfigure
okx config init

# Check the config file
cat ~/.okx/config.toml

Make sure demo = true matches the Demo API Key, and demo = false matches the Live API Key. They’re different keys.

Error 4: Skill not found: okx

Cause: OKX Skills weren’t properly installed to Hermes’s Skills directory Fix:

1
2
3
4
5
6
7
# Reinstall
hermes skills install skills-sh/okx/agent-skills/okx-cex-market
hermes skills install skills-sh/okx/agent-skills/okx-cex-trade
hermes skills install skills-sh/okx/agent-skills/okx-cex-portfolio

# Verify installed Skills
hermes tools

Error 5: Rate limit exceeded

Cause: LLM API calls too frequent, got rate limited Fix: That’s exactly what the Fallback Provider is for. Set up a fallback model in ~/.hermes/config.yaml, and it’ll auto-switch when the main model hits rate limits.


Further Reading


Wrap-up

The Hermes Agent + OKX combo turns “AI automated trading” from a project that used to require deep programming expertise into something anyone can follow a tutorial and run.

But the real value isn’t at the moment you finish installation—it’s in the continued use. Every market scan, every trade, every success or failure feeds your Agent, making it understand the market and your style better.

A month later, your Hermes isn’t the fresh Agent it once was. It remembers which funding rate reversal strategies work best for which coins, remembers you prefer conservative position management, remembers the pitfall you hit on SOL last time.

That’s the power of self-learning—it keeps getting stronger while you rest.


Author: Judy AI Lab | 2025 AI Engineering Practical Series Questions? Leave a comment or email miranttie@gmail.com