User GuideAPI ReferenceAI Applications

Hermes Agent

Hermes Agent is an autonomous agent system built by Nous Research, a renowned open-source AI collective. Featuring cross-session persistent memory and a self-improving learning loop, it can autonomously write and build up dedicated skills based on task requirements. Connecting to the OpenRely API links its cognitive core directly to world-leading foundation models.

✨ AI One-Click Setup

Copy the prompt below and send it to your terminal AI assistant to automatically complete environment checks and configuration:

AI 配置提示词 (Prompt)
点击卡片任意位置复制
Please refer to the OpenRely official documentation (https://openrely.ai/en/docs/apps/hermes-agent) to help me configure Hermes Agent on this machine:
1. Key Preparation:If I have not provided an API key yet, please first remind me to go to the OpenRely Console (https://api.openrely.ai/keys) to create a dedicated Token.
2. Environment Setup:Clone the official repository or install hermes-agent via pip/uv, ensuring a Python 3.10+ environment is ready.
3. Configure Endpoint:In the configuration file or environment variables, set the base endpoint OPENAI_BASE_URL to https://api.openrely.ai/v1, and OPENAI_API_KEY to my OpenRely key; set the model to a general reasoning model (such as gpt or claude, refer to https://api.openrely.ai/pricing for supported models).
4. Verify Readiness:Run hermes --version to check readiness, and prompt me to run hermes chat to start an autonomous session.

🔑 Prerequisites


🚀 Steps

Install and Initialize Hermes Agent

Hermes Agent is built on a Python environment. It is recommended to use pip or the modern package manager uv for quick installation:

# 推荐通过 pip 安装官方 CLI
pip install hermes-agent

# 或者克隆官方源码安装
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
pip install -e .

Configure OpenRely Service Endpoint and API Key

Hermes Agent natively supports standard OpenAI-compatible protocols. You can quickly connect to OpenRely via environment variables or a configuration file:

Export the configuration parameters in your terminal session:

export OPENAI_BASE_URL="https://api.openrely.ai/v1"
export OPENAI_API_KEY="sk-your-openrely-api-key"
export HERMES_MODEL="claude"

[!TIP] For long-term effect, you can append the commands above to ~/.zshrc or ~/.bashrc.

Create or edit ~/.hermes/config.yaml in your user home directory:

provider: openai
api_base: "https://api.openrely.ai/v1"
api_key: "sk-your-openrely-api-key"
model: "gpt" # 或 claude、deepseek 等,具体标识前往定价中心查询
memory:
  enabled: true
  storage: local

Start an Interactive Terminal Session

Run hermes chat to start the interactive agent with persistent memory:

hermes chat

Upon entering for the first time, send it a complex comprehensive task, for example:

> 帮我分析当前项目中的性能瓶颈,并编写一个自动化测试脚本沉淀为你的长期技能

Hermes Agent will perform contextual analysis using its long-term memory store and attempt to write a dedicated Skill to save into the local skill pool.


💡 Core Features

Feature ModuleDescription
Self-Improving SkillsWhen executing complex workflows, the agent can autonomously write reusable Python skill scripts and archive them persistently
Long-Term MemoryAutomatically extracts key facts, code architectures, and personal preferences from conversations, preventing context loss across sessions
Multi-Channel Gateway SupportBuilt-in gateway service that makes it easy to attach the same Agent to Telegram, Discord, or private enterprise groups
Model-Agnostic DesignDeeply compatible with the standard OpenAI protocol; seamlessly switch to any top-tier foundation model globally under the OpenRely ecosystem

❓ FAQ

Encountering other invocation errors or billing questions? Please refer to the complete FAQ and Troubleshooting Guide.

Was this page helpful?

Hermes Agent | OpenRely Docs