⚠️ CUSTOM FORK FOR LAM-CYBERLABThis repository is a heavily modified version of Hermes Agent by Ahlfs. It is specifically designed to be fully compatible as the backend intelligence engine for LAM-Cyberlab. See the Second Brain Edition section below for details on custom features.
The self-improving AI agent built by Nous Research. It's the only agent with a built-in learning loop — it creates skills from experience, improves them during use, nudges itself to persist knowledge, searches its own past conversations, and builds a deepening model of who you are across sessions. Run it on a $5 VPS, a GPU cluster, or serverless infrastructure that costs nearly nothing when idle. It's not tied to your laptop — talk to it from Telegram while it works on a cloud VM.
Use any model you want — Nous Portal, OpenRouter, OpenAI, your own endpoint, and many others. Switch with hermes model — no code changes, no lock-in.
| A real terminal interface | Full TUI with multiline editing, slash-command autocomplete, conversation history, interrupt-and-redirect, and streaming tool output. |
| Lives where you do | Telegram, Discord, Slack, WhatsApp, Signal, and CLI — all from a single gateway process. Voice memo transcription, cross-platform conversation continuity. |
| A closed learning loop | Agent-curated memory with periodic nudges. Autonomous skill creation after complex tasks. Skills self-improve during use. FTS5 session search with LLM summarization for cross-session recall. Honcho dialectic user modeling. Compatible with the agentskills.io open standard. |
| Scheduled automations | Built-in cron scheduler with delivery to any platform. Daily reports, nightly backups, weekly audits — all in natural language, running unattended. |
| Delegates and parallelizes | Spawn isolated subagents for parallel workstreams. Write Python scripts that call tools via RPC, collapsing multi-step pipelines into zero-context-cost turns. |
| Runs anywhere, not just your laptop | Six terminal backends — local, Docker, SSH, Singularity, Modal, and Daytona. Daytona and Modal offer serverless persistence — your agent's environment hibernates when idle and wakes on demand, costing nearly nothing between sessions. Run it on a $5 VPS or a GPU cluster. |
| Research-ready | Batch trajectory generation, trajectory compression for training the next generation of tool-calling models. |
This is a custom fork of Hermes Agent modified and maintained by Ahlfs, featuring an autonomous Second Brain pipeline and automated GitHub skills backups.
- Automated Second Brain Pipeline
- Audio Transcription: Drops an
.mp3into01-Audioand Hermes automatically transcribes it using Whisper. - Document Parsing: Parses
.pdfand performs OCR on images dropped into02-Documents. - Wiki Generation: Synthesizes transcripts and documents into interlinked Wikipedia-style markdown files in
04-Wiki. - Git Backup: Automatically commits and pushes new knowledge to a private GitHub repository.
- Full Source Cleanup Cascade: Safely deletes the raw source files (
.mp3,.pdf, etc.) from01-Audioand02-Documentsonly after the final knowledge has been successfully backed up to GitHub, keeping your vault lean.
- Audio Transcription: Drops an
- Automated Skills Backup
- Backs up your custom skills to a separate private GitHub repo via a scheduled cron job (default: every 24h).
- Dynamic Swarm Router (Intent-Based Routing)
- Automatically intercepts and routes incoming messages to the most capable specialist sub-agent (
builder,researcher,writer). - Uses zero-latency keyword classification to infer user intent, providing a frictionless swarm experience without manual profile switching.
- Automatically intercepts and routes incoming messages to the most capable specialist sub-agent (
- LAM-Cyberlab Native Integration
- Real-time Streaming: Full support for progressive token streaming via SSE/WebSockets (
stream_events.py), making it a zero-friction, plug-and-play intelligence backend for the LAM-Cyberlab UI. - Closed-Loop Learning: Synergizes flawlessly with the native Self-Healing Skill Generator. When faced with complex tasks from the Cyberlab UI, the agent can autonomously write, test, and save its own new
.mdskills for future use.
- Real-time Streaming: Full support for progressive token streaming via SSE/WebSockets (
- Dynamic OS Memory Injection
- Automatically detects your operating system, installed tools (Docker, PHP, Node, etc.), and
sudocapabilities during setup. - Injects these hardware/OS facts directly into the Agent's permanent memory (
MEMORY.md), completely eliminating AI hallucinations regarding your environment specifications.
- Automatically detects your operating system, installed tools (Docker, PHP, Node, etc.), and
Follow these steps to install the LAM-Cyberlab compatible version of Hermes Agent.
⚠️ WINDOWS USERS: This project heavily relies on Linux packages (likeapt install ffmpeg) and Bash scripts. Git Bash or native PowerShell will not work for the Second Brain pipeline. You must install and use WSL2 (Windows Subsystem for Linux) to follow these steps.
Before you begin, make sure you have the following installed on your system:
| Requirement | Required? | Purpose | Install |
|---|---|---|---|
| Git | ✅ Required | Clone repos, backup system | Install Guide |
| Python 3.10+ | ✅ Required | Run Second Brain scripts | Install Guide |
| curl | ✅ Required | Download Hermes installer | Pre-installed on most systems |
| FFmpeg | ✅ Required | Audio transcription (Whisper) | Install Guide |
| Tesseract OCR | ✅ Required | Image/PDF text extraction | Install Guide |
| Obsidian | ⭐ Optional | Visual markdown viewer for your Second Brain | Download |
| GitHub Account + SSH Key | ⭐ Optional | Automated cloud backup | Guide |
Note: You do not need Obsidian installed to use the Second Brain pipeline. The "Vault" is simply a folder of
.mdfiles on your disk. Any text editor (VS Code, Notepad, etc.) can read them. Obsidian is recommended for the best browsing experience with interlinked notes and graph view.
The Second Brain pipeline requires ffmpeg (for audio), tesseract-ocr (for images), and cron (for automated background backups). Run the command appropriate for your system:
Ubuntu / Debian / WSL2 (Default):
sudo apt update && sudo apt install ffmpeg tesseract-ocr cron -y
sudo systemctl enable --now cronmacOS (via Homebrew):
brew install ffmpeg tesseract
# cron is usually pre-installed on macOSFedora / RHEL / AlmaLinux:
sudo dnf install ffmpeg tesseract cronie -y
sudo systemctl enable --now crondArch Linux:
sudo pacman -S ffmpeg tesseract cronie
sudo systemctl enable --now cronieFirst, use the official installer to set up the necessary runtimes (Node.js, uv, PATH wrapper), then replace the source code with this custom repository.
Linux / macOS / WSL2:
# Install the base environment
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
# Replace official repo with the Ahlfs custom fork
rm -rf ~/.hermes/hermes-agent
git clone https://github.com/ahlfs/hermes-agent.git ~/.hermes/hermes-agent
# Re-sync dependencies
cd ~/.hermes/hermes-agent
~/.hermes/bin/uv venv venv
~/.hermes/bin/uv pip install --python venv -e ".[all]"Windows Native: Run
iex (irm https://hermes-agent.nousresearch.com/install.ps1)in PowerShell, then delete%LOCALAPPDATA%\hermes\hermes-agentandgit clone https://github.com/ahlfs/hermes-agent.gitin its place.
Run the setup script to create an isolated virtual environment specifically for the Second Brain tools:
cd ~/.hermes/hermes-agent
bash scripts/second-brain/setup-venv.sh✨ NEW (Plug-and-Play): This script will now automatically initialize your Agent's persistent memory (
MEMORY.mdandUSER.md) with highly-optimized Second Brain workflow rules AND dynamically inject your exact system environment specs (OS, Docker, PHP, sudo status) so the AI instantly understands your machine!
If you want to enable the Auto-Backup system (synced to cloud/GitHub) to secure your custom skills and knowledge base, open your ~/.hermes/.env file and add the following settings:
# Directory of your Obsidian Vault (Second Brain)
OBSIDIAN_VAULT_DIR=/home/user/obsidian/memo
# GitHub Backup Settings
GITHUB_USERNAME=your_github_username
GITHUB_REPO_SKILLS=hermes-skills
GITHUB_REPO_SECONDBRAIN=second-brainTo allow the agent to automatically push backups in the background:
- Create 2 empty Private repositories on GitHub (e.g.,
second-brainandhermes-skills). - Generate an SSH key on your VPS:
ssh-keygen -t ed25519 -C "your_email@example.com" - Display the public key with
cat ~/.ssh/id_ed25519.puband add it to your GitHub account (Settings > SSH and GPG keys > New SSH key).
Let Hermes automatically build the empty folder structures and initialize the Git repositories. Run the sync scripts manually for the first time:
cd ~/.hermes/hermes-agent
bash scripts/second-brain/sync-second-brain.sh
bash scripts/second-brain/sync-skills.sh(After this completes, you will find your 01-Audio, 02-Documents, etc. folders ready in the Vault, and your custom skills will be synced).
To make your VPS automatically sync and backup your Second Brain (every 12 hours), Custom Skills (every 24 hours), and execute Daily Reflection & Journaling (daily at 00:05) in the background, simply run the installation script:
cd ~/.hermes/hermes-agent
bash scripts/second-brain/install-cron.shReload your shell and start the agent:
source ~/.bashrc # reload shell (or: source ~/.zshrc)
hermes # start chatting!To provide your agent with new knowledge (meeting recordings, books, research papers, etc.), simply place the raw files into your designated Obsidian Vault directory (OBSIDIAN_VAULT_DIR):
- Audio Files (
.mp3,.m4a,.wav): Move them into the01-Audio/folder. - Documents & Images (
.pdf,.png,.jpg): Move them into the02-Documents/folder.
What happens next?
- The agent automatically detects new files and runs the ingestion pipeline in the background. You can also force this manually by telling the agent: "Learn from my new files in the vault."
- Audio is transcribed via Whisper; Documents and Images are parsed and OCR-ed.
- The extracted information is synthesized into Wikipedia-style interconnected
.mdpages in your04-Wiki/folder. - Auto-Cleanup: Once the knowledge has been successfully converted into Wiki pages and safely backed up to your GitHub repository, the agent's Full Source Cleanup Cascade kicks in. It will automatically delete the large raw source files (
.mp3,.pdf, etc.) from your01-Audioand02-Documentsfolders to keep your server lightweight.
If your antivirus (Bitdefender, Windows Defender, etc.) quarantines uv.exe from the Hermes bin folder (%LOCALAPPDATA%\hermes\bin\uv.exe), this is a false positive. The file is Astral's uv — the Rust Python package manager Hermes bundles to manage its Python environment. ML-based antivirus engines commonly flag unsigned Rust binaries that download and install packages.
To verify your copy is authentic:
# Install GitHub CLI if needed
winget install --id GitHub.cli
# Login to GitHub
gh auth login
# Run verification
$uv = "$env:LOCALAPPDATA\hermes\bin\uv.exe"
$ver = (& $uv --version).Split(' ')[1]
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$zip = "$env:TEMP\uv.zip"
Invoke-WebRequest "https://github.com/astral-sh/uv/releases/download/$ver/uv-x86_64-pc-windows-msvc.zip" -OutFile $zip -UseBasicParsing
gh attestation verify $zip --repo astral-sh/uv
Expand-Archive $zip "$env:TEMP\uv_x" -Force
(Get-FileHash "$env:TEMP\uv_x\uv.exe").Hash -eq (Get-FileHash $uv).HashIf attestation says "Verification succeeded" and the last line prints True, you're good.
To whitelist Hermes:
- Windows Defender: Run PowerShell as Admin →
Add-MpPreference -ExclusionPath "$env:LOCALAPPDATA\hermes\bin" - Bitdefender: Add an exception in the Bitdefender console (Protection > Antivirus > Settings > Manage Exceptions)
- Whitelist the folder, not the file hash — Hermes updates
uvand the hash changes every version
For more context, see the upstream Astral reports: astral-sh/uv#13553, astral-sh/uv#15011, astral-sh/uv#10079.
hermes # Interactive CLI — start a conversation
hermes model # Choose your LLM provider and model
hermes tools # Configure which tools are enabled
hermes config set # Set individual config values
hermes config get # Print individual config values
hermes gateway # Start the messaging gateway (Telegram, Discord, etc.)
hermes setup # Run the full setup wizard (configures everything at once)
hermes claw migrate # Migrate from OpenClaw (if coming from OpenClaw)
hermes update # Update to the latest version
hermes doctor # Diagnose any issuesHermes works with whatever provider you want — that's not changing. But if you'd rather not collect five separate API keys for the model, web search, image generation, TTS, and a cloud browser, Nous Portal covers all of them under one subscription:
- 300+ models — pick any of them with
/model <name> - Tool Gateway — web search (Firecrawl), image generation (FAL), text-to-speech (OpenAI), cloud browser (Browser Use), all routed through your sub. No extra accounts.
One command from a fresh install:
hermes setup --portalThat logs you in via OAuth, sets Nous as your provider, and turns on the Tool Gateway. Check what's wired up any time with hermes portal info. Full details on the Tool Gateway docs page.
You can still bring your own keys per-tool whenever you want — the gateway is per-backend, not all-or-nothing.
Hermes has two entry points: start the terminal UI with hermes, or run the gateway and talk to it from Telegram, Discord, Slack, WhatsApp, Signal, or Email. Once you're in a conversation, many slash commands are shared across both interfaces.
| Action | CLI | Messaging platforms |
|---|---|---|
| Start chatting | hermes |
Run hermes gateway setup + hermes gateway start, then send the bot a message |
| Start fresh conversation | /new or /reset |
/new or /reset |
| Change model | /model [provider:model] |
/model [provider:model] |
| Set a personality | /personality [name] |
/personality [name] |
| Retry or undo the last turn | /retry, /undo |
/retry, /undo |
| Compress context / check usage | /compress, /usage, /insights [--days N] |
/compress, /usage, /insights [days] |
| Browse skills | /skills or /<skill-name> |
/<skill-name> |
| Interrupt current work | Ctrl+C or send a new message |
/stop or send a new message |
| Platform-specific status | /platforms |
/status, /sethome |
For the full command lists, see the CLI guide and the Messaging Gateway guide.
All documentation lives at hermes-agent.nousresearch.com/docs:
If you're coming from OpenClaw, Hermes can automatically import your settings, memories, skills, and API keys.
During first-time setup: The setup wizard (hermes setup) automatically detects ~/.openclaw and offers to migrate before configuration begins.
Anytime after install:
hermes claw migrate # Interactive migration (full preset)
hermes claw migrate --dry-run # Preview what would be migrated
hermes claw migrate --preset user-data # Migrate without secrets
hermes claw migrate --overwrite # Overwrite existing conflictsWhat gets imported:
- SOUL.md — persona file
- Memories — MEMORY.md and USER.md entries
- Skills — user-created skills →
~/.hermes/skills/openclaw-imports/ - Command allowlist — approval patterns
- Messaging settings — platform configs, allowed users, working directory
- API keys — allowlisted secrets (Telegram, OpenRouter, OpenAI, Anthropic, ElevenLabs)
- TTS assets — workspace audio files
- Workspace instructions — AGENTS.md (with
--workspace-target)
See hermes claw migrate --help for all options, or use the openclaw-migration skill for an interactive agent-guided migration with dry-run previews.
We welcome contributions! See the Contributing Guide for development setup, code style, and PR process.
Quick start for contributors — use the standard installer, then work from the
full git checkout it creates at $HERMES_HOME/hermes-agent (usually
~/.hermes/hermes-agent). This matches the layout used by hermes update, the
managed venv, lazy dependencies, gateway, and docs tooling.
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
cd "${HERMES_HOME:-$HOME/.hermes}/hermes-agent"
uv pip install -e ".[all,dev]"
scripts/run_tests.shManual clone fallback (for throwaway clones/CI where you intentionally do not want the managed install layout):
Create the venv outside the cloned source tree — a venv inside the directory the agent operates from can be wiped by a relative-path command the agent runs against its own checkout, destroying the running runtime mid-session.
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv ~/.hermes/venvs/hermes-dev --python 3.11
source ~/.hermes/venvs/hermes-dev/bin/activate
uv pip install -e ".[all,dev]"
scripts/run_tests.sh- 💬 Discord
- 📚 Skills Hub
- 🐛 Issues
- 🔌 computer-use-linux — Linux desktop-control MCP server for Hermes and other MCP hosts, with AT-SPI accessibility trees, Wayland/X11 input, screenshots, and compositor window targeting.
- 🔌 HermesClaw — Community WeChat bridge: Run Hermes Agent and OpenClaw on the same WeChat account.
MIT — see LICENSE.
Built by Nous Research.

