Hermes Agent is a personal AI assistant that runs as a Telegram bot with full access to your development environment via MCP (Model Context Protocol). It provides natural language access to your codebase, terminal, files, and tools — all through Telegram, with optional bidirectional voice messaging.
This guide covers everything: installation, configuration, endpoint setup, MCP servers modelcontextprotocol/servers, voice support, and troubleshooting.
Hermes Agent is a lightweight AI assistant that integrates with your local system through Telegram. It runs on the github.com/NousResearch/hermes-agent">Hermes Agent framework (built by Kilo.AI) with custom MCP tooling, voice support, and deep project integration.
Key capabilities:
| Component | Technology | Role |
|---|---|---|
| Hermes CLI | Python / Hermes Agent | Local agent runtime, tool orchestration, MCP management |
| Telegram Bot | python-telegram-bot | Message routing, UI, voice I/O |
| Gateway | Kilo Gateway (kilocode) | Model provider routing — supports Kilo.ai, OpenRouter, Claude, local models |
| MCP Servers | Various (Node/Python/Rust) | Tools for filesystem, git, browser, databases, APIs |
| Knowledge Graph | ChromaDB / SQLite | Project context, code semantics, cross-session memory |
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y nodejs node --version # verify ≥ 18
The official one-line installer handles all dependencies (Python venv, Node.js, ffmpeg, ripgrep) automatically:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash source ~/.bashrc # or ~/.zshrc hermes --version # verify installation
Hermes Agent provides an interactive setup wizard that configures everything for you — no manual YAML editing needed. Run:
hermes setup # Full guided setup (bot token, API keys, MCP servers) hermes model # Configure model provider only hermes tools # Select which MCP tools to enable
The wizard walks you through provider selection, API key entry, and connectivity testing. Manual file editing is only needed for advanced customization.
If you prefer manual control or need to install from source:
git clone https://github.com/Kilo-AI/hermes-agent.git ~/.hermes cd ~/.hermes pip install -e .
docker run -d \
--name hermes-agent \
-v ~/.hermes:/app/.hermes \
ℹ️ Prepare config directory: Create ~/.hermes first so the container can mount it:
mkdir -p ~/.hermes
ℹ️ docker-compose recommended: For easier volume and dependency management, use a docker-compose.yml instead of raw docker run.
-v /path/to/your/projects:/projects \
-e HERMES_TELEGRAM_TOKEN="***" \
-e KILOCODE_API_KEY="***" \
kiloai/hermes-agent:latest
/newbotHermes Assistant)hermes_assistant_bot)HERMES_TELEGRAM_TOKENSend this to @BotFather with /setcommands:
/start — Start the agent /help — Show available commands /run — Execute a shell command /read — Read a file /search — Search across files /chat — Direct chat mode /model — Switch AI model /voice — Toggle voice mode
Hermes Agent supports multiple providers via the Kilo Gateway. The default is kilocode/kilo-auto/free (Kilo.AI's free tier).
| Provider | Model ID | Notes |
|---|---|---|
| Kilo Gateway | kilocode/kilo-auto/free | Free tier, auto-routing, local-first |
| OpenRouter | openrouter/anthropic/claude-3.5-sonnet | 580+ models, pay-per-use |
| Anthropic | anthropic/claude-3.5-sonnet | Via OpenRouter or direct API |
| Google Gemini | openrouter/google/gemini-2.5-pro | Via OpenRouter |
| Local Ollama | ollama/llama3.2 | 100% offline, requires local Ollama |
Create the ~/.hermes/.env file with your actual keys:
cat > ~/.hermes/.env << 'EOF' KILOCODE_API_KEY="your-kilo-api-key" OPENROUTER_API_KEY="your-openrouter-key" ANTHROPIC_API_KEY="your-anthropic-key" OPENAI_API_KEY="your-openai-key" TELEGRAM_BOT_TOKEN="your-telegram-bot-token" ELEVENLABS_API_KEY="your-elevenlabs-key" EOF chmod 600 ~/.hermes/.env
chmod 600 restricts file access to your user only. Never commit real keys to version control.
# ~/.hermes/config.yaml
model:
default: kilocode/kilo-auto/free
provider: kilocode
fallback_chain:
- openrouter/anthropic/claude-3.5-sonnet
- ollama/llama3.2
MCP (Model Context Protocol) servers give Hermes access to external tools. They run as separate processes and connect via stdio.
| Server | Purpose | Install |
|---|---|---|
| filesystem | Read/write files, directory ops | npm i -g @modelcontextprotocol/server-filesystem |
| git | Git operations, history, blame | npm i -g @modelcontextprotocol/server-git |
| shell | Execute shell commands | npm i -g @modelcontextprotocol/server-shell |
| sqlite | Database queries | npm i -g @modelcontextprotocol/server-sqlite |
| github | GitHub API: issues, PRs, repos | pip install mcp-github |
| browser | Web scraping, screenshots | npm i -g @executeautomation/playwright-mcp-server |
# ~/.hermes/mcp_config.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
},
"git": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-git", "--repository", "."]
},
"shell": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-shell"]
},
"github": {
"command": "python",
"args": ["-m", "mcp_github", "--token", "ghp_xxxxxxxxxxxx"]
}
}
}
hermes mcp status to check.
ollama pull llama3.2 # In config, set context to ≥ 65536
git config --global user.name "Your Name" git config --global user.email "you@example.com"
~/.hermes/mcp_config.json, configure:
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/USER/projects", "/home/USER/work"]
}
Replace /home/USER/projects with your actual project directories. The server will only access these paths.
Hermes Agent supports bidirectional voice messaging via TTS (text-to-speech) and STT (speech-to-text).
# ~/.hermes/config.yaml — add: voice: tts_engine: "elevenlabs" # or "openai", "coqui", "xtts" stt_engine: "openai-whisper" voice_id: "21m00Tcm4TlvDq8ikWAM" # ElevenLabs elevenlabs.io voice ID sample_rate: 24000
# For ElevenLabs pip install elevenlabs # For local XTTS v2 pip install TTS torch # For OpenAI Whisper (STT) pip install openai-whisper
Once configured, send a voice message in Telegram and Hermes will transcribe it, process it, and reply with a voice message.
The Hermes Agent uses a two-process architecture:
Without the gateway running, the bot will not receive or send messages. Set it up:
hermes gateway setup # Interactive: maps Telegram chats to agents hermes gateway start # Start the gateway
For production, run the gateway as a user systemd service so it survives logout and auto-restarts on failure.
First, enable lingering for your user (allows user services without an active login session):
sudo loginctl enable-linger $USER
Create the gateway service file at ~/.config/systemd/user/hermes-gateway.service:
[Unit] Description=Hermes Messaging Gateway After=network.target [Service] Type=simple User=%i ExecStart=/usr/local/bin/hermes gateway start Restart=always RestartSec=10 EnvironmentFile=/home/%i/.hermes/.env [Install] WantedBy=default.target
Then enable and start it:
systemctl --user daemon-reload systemctl --user enable --now hermes-gateway systemctl --user status hermes-gateway
journalctl --user -u hermes-gateway -f. Agent logs: journalctl --user -u hermes-agent -f.
# Copy systemd service file sudo cp ~/.hermes/hermes-agent.service /etc/systemd/system/ # Reload systemd sudo systemctl daemon-reload # Enable and start sudo systemctl enable hermes-agent sudo systemctl start hermes-agent # Check status sudo systemctl status hermes-agent
# From terminal (foreground) hermes start --verbose # Or as background process hermes start --daemon
systemctl --user restart hermes-gateway from within a session can crash the agent. Always restart manually and wait for confirmation before proceeding.
Before testing via Telegram, verify locally:
hermes --version # Check installation hermes start --verbose # Run in foreground (watch logs) hermes mcp status # Check MCP servers hermes doctor # Full system diagnostics hermes config show # View current configuration
If all checks pass, send a message to your Telegram bot. It should respond within seconds.
Repository: github.com/Kilo-AI/hermes-agent
Documentation: hermes-agent.kilo.ai
hermes update or pip install --upgrade hermes-agent, then systemctl --user restart hermes-agent hermes-gateway
hermes --continue (resume latest), hermes --sessions (list), hermes --session <name> (resume specific)
tar -czf hermes-backup-$(date +%Y%m%d).tar.gz ~/.hermes/ — backs up config, memory, sessions
hermes config set KEY VALUE over manual YAML editing (auto-routes to .env or config.yaml, prevents format errors)
~/.hermes/. Back it up regularly.
~/.hermes/ directory contains secrets — add it to .gitignore if ever versioned.
chmod 600 ~/.hermes/.env restricts read/write to your user only.
The git MCP server needs a configured git identity before committing:
git config --global user.name "Your Name" git config --global user.email "you@example.com"
~/.hermes and necessary project directories.
--network host only if needed; otherwise bridge mode is safer.
python-telegram-bot[webhooks] — install manually if using webhooks.