Framework reference.
This tab is your βlook it up when you need itβ reference. Everything about how OpenClaw and Hermes actually work, structured so you can jump to the specific thing you're troubleshooting. The top half is pure reference material. The bottom half is common tasks with ready-to-use Claude Code prompts.
Read this after you've built something. Skip it during first-time setup β Tab 2 has everything you need for that.
Part 1: Reference Material
OpenClaw
Language: Node.js / TypeScript
Requires: Node.js 24+ (check package.json engines field β not Node 20)
Package manager: pnpm
Main config: ~/.openclaw/openclaw.json
Workspace: ~/.openclaw/workspace/
Process manager: systemd (system-level, not user-level β see Tab 5 Incident 7)
File structure
~/.openclaw/
βββ openclaw.json β main config (channels, models, plugins)
βββ .env β secrets (API keys, bot tokens)
βββ workspace/
β βββ SOUL.md β agent personality, values, voice
β βββ USER.md β info about the human
β βββ IDENTITY.md β agent's name, type, vibe, emoji
β βββ AGENTS.md β operational manual, hard rules, memory system
β βββ BOOTSTRAP.md β first-run script (auto-deletes after first conversation)
β βββ HEARTBEAT.md β periodic check tasks
β βββ TOOLS.md β environment-specific notes
β βββ context/ β additional reference documents
β βββ memory/ β daily memory files (agent-managed)
βββ devices/
βββ paired.json β Telegram device pairing stateTemplate loading order (every session)
- SOUL.md β βWho am I?β
- USER.md β βWho am I helping?β
- memory/YYYY-MM-DD.md β today + yesterday's daily notes
- MEMORY.md β long-term curated memory (main session only, not in group chats)
What goes where
| Content | File | Why |
|---|---|---|
| Agent personality, role, voice, portfolio of responsibilities | SOUL.md | Defines the agent's character |
| Information about the user β name, preferences, context | USER.md | Tells the agent who it's serving |
| Agent's display name, emoji, vibe | IDENTITY.md | Metadata for display and routing |
| Hard rules, decision authority, memory system instructions | AGENTS.md | Operational manual |
| Domain knowledge, engagement context | context/ directory | Loaded on demand, referenced by path |
Key gotchas
- workspace/ is the directory that matters. Files at the root
~/.openclaw/are NOT loaded as templates. Only files inworkspace/are. - BOOTSTRAP.md auto-deletes. If it exists, the agent follows it on first conversation, then deletes it. Don't put anything in BOOTSTRAP.md you want to persist.
- AGENTS.md defaults are good. The default AGENTS.md has solid operational guidance. Merge your rules into it rather than replacing it entirely.
- Device pairing is fragile during rapid restarts. See Tab 5 Incident 11.
- MEMORY.md only loads in main session (DMs). In group chats, MEMORY.md is NOT loaded β security feature to prevent personal context leaking.
Telegram configuration
{
"channels": {
"telegram": {
"enabled": true,
"token": { "source": "env", "provider": "default", "id": "TELEGRAM_BOT_TOKEN" },
"dmPolicy": "allowlist",
"allowFrom": ["YOUR_TELEGRAM_USER_ID"],
"groupPolicy": "allowlist",
"groupAllowFrom": ["tg:YOUR_TELEGRAM_USER_ID"],
"groups": {
"-YOUR_GROUP_CHAT_ID": {
"requireMention": false
}
}
}
}
}systemd service (system-level)
[Unit]
Description=OpenClaw Agent
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=openclaw
Group=openclaw
SupplementaryGroups=agents
WorkingDirectory=/home/openclaw
EnvironmentFile=/etc/agent-board/shared.env
EnvironmentFile=/home/openclaw/.openclaw/.env
ExecStart=/home/openclaw/.npm-global/bin/openclaw gateway start
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.targetKey: SupplementaryGroups=agents allows the service to read files owned by root:agents (like the shared API key file).
Hermes
Language: Python
Requires: Python 3.10+
Main config: ~/.hermes/config.yaml + ~/.hermes/.env
Identity: ~/.hermes/SOUL.md (single file)
Memory: ~/.hermes/memories/ (agent-managed)
API server: Built-in, OpenAI-compatible, default port 8090
File structure
~/.hermes/
βββ config.yaml β main config
βββ .env β secrets
βββ SOUL.md β personality + role + hard rules (all in one file)
βββ memories/
β βββ USER.md β what the agent learns about the user (seed it, agent updates)
β βββ MEMORY.md β agent's personal notes
βββ context/ β additional reference documentsTemplate loading order
- SOUL.md β injected as slot #1 in the system prompt. Everything about who the agent is.
- memories/USER.md β what the agent knows about the user. Seeded by you, updated by the agent over time.
What goes where
| Content | File | Why |
|---|---|---|
| Everything β personality, role, hard rules, decision authority, voice | SOUL.md | Hermes has one identity file; everything goes here |
| Seed information about the user (~200 words) | memories/USER.md | Agent builds on this over time |
| Domain knowledge, engagement context | context/ directory | Referenced by path from SOUL.md |
- SOUL.md must be a standalone file, NOT a symlink. Writes to a symlink can modify the master copy.
- Default base_url points to OpenRouter. Clear
base_urlin config.yaml if using Anthropic directly. See Tab 5 Incident 5. - memories/USER.md is agent-managed. You seed it, the agent updates it as it learns. Don't be alarmed when the content changes.
- tool_progress default shows everything. Set
display.tool_progress: off(notnoneorfalse). See Tab 5 Incident 9. - DISCORD_AUTO_THREAD defaults to true. Set
DISCORD_AUTO_THREAD=falsefor inline replies. See Tab 5 Incident 8.
Key .env settings for Hermes
# Required
ANTHROPIC_API_KEY=sk-ant-...
TELEGRAM_BOT_TOKEN=...
# Optional: Discord
DISCORD_BOT_TOKEN=...
DISCORD_ALLOWED_USERS=YOUR_DISCORD_USER_ID
DISCORD_ALLOW_BOTS=all
DISCORD_AUTO_THREAD=false
DISCORD_FREE_RESPONSE_CHANNELS=YOUR_CHANNEL_ID
DISCORD_REQUIRE_MENTION=trueKey config.yaml settings
display:
tool_progress: off
# Clear this if using Anthropic directly (default points to OpenRouter)
# base_url: ""systemd service (system-level)
[Unit]
Description=Hermes Agent
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=hermes
Group=hermes
SupplementaryGroups=agents
WorkingDirectory=/home/hermes
EnvironmentFile=/etc/agent-board/shared.env
EnvironmentFile=/home/hermes/.hermes/.env
ExecStart=/home/hermes/.hermes/venv/bin/python -m hermes_agent
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.targetCross-framework patterns
Shared secrets
If you're running multiple agents, share the Anthropic API key via a common file rather than duplicating it:
/etc/agent-board/shared.env β owned by root:agents, mode 640
ANTHROPIC_API_KEY=sk-ant-...All agent systemd services load this via EnvironmentFile=. The SupplementaryGroups=agents directive gives each service read access.
Shared context files
Both frameworks can share reference documents via a common directory:
/etc/agent-board/identity/context/ β owned by root:agents, mode 640
domain-knowledge.md
project-context.md
operating-principles.mdSymlink this directory into each agent's workspace. Reference in SOUL.md or workspace files as context/filename.md.
Telegram β platform limitation
Bots cannot see each other's messages on Telegram. This is a platform-level restriction. Both bots can see user messages in a group, but the bots are invisible to each other. See Tab 5 Incident 6.
Use Discord if you need bot-to-bot collaboration. Discord allows bots to see each other's messages when allowBots is enabled.
Part 2: Common Tasks (with Claude Code prompts)
The most common changes you'll make to a running agent board. Each task has a ready-to-use prompt you can copy into Claude Code.
Task 1: Update identity files
Use this when your priorities change, your context shifts, or you want to refine how the agent behaves.
Task 2: Add Discord to an existing OpenClaw setup
Use this when you've been running Telegram-only and want to add Discord as a second channel.
Task 3: Reset a broken Telegram device pairing
Use this when your OpenClaw bot has stopped responding and the logs show a βpairing requiredβ loop.
Task 4: Debug an agent that isn't responding
Use this when either agent has gone quiet and you don't know why.
Task 5: Add a new context document for a project
Use this when you're starting new work and want the agent to have relevant background.
Task 6: Quick diagnostic commands
Fast sanity checks you can run yourself when something feels off β no Claude Code needed.
# Is the agent running?
sudo systemctl status openclaw
# Read recent logs
sudo journalctl -u openclaw --since "5 minutes ago" --no-pager | tail -30
# Restart the agent
sudo systemctl restart openclaw
# Test API key directly
source /etc/agent-board/shared.env && curl -s https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "content-type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{"model":"claude-sonnet-4-6","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}'
# Check workspace files exist
ls -la /home/openclaw/.openclaw/workspace/
# Check context symlink
ls -la /home/openclaw/.openclaw/workspace/context/
# Check device pairing state
sudo -u openclaw cat /home/openclaw/.openclaw/devices/paired.json | python3 -m json.tool