الملفات الشخصية: تشغيل أكثر من وكيل
Profiles: Running Multiple Agents
ما هذه الصفحة، وماذا تحتوي.
الملفات الشخصية: أن تحتفظ بأكثر من «شخصية» لوكيلك، لكل واحدة إعداداتها وذاكرتها. وكيل للعمل ووكيل للدراسة لا يختلط أحدهما بالآخر، ولا تتسرّب معلومة من هنا إلى هناك. الصفحة فيها تحذير من المصدر، و12 دقيقة قراءة. انتبه: تأكد من الملف الذي تعمل عليه قبل تنفيذ أمر حسّاس. الخلط بينها سهل.
نتائج مأخوذة من هذه الصفحة، لا من قالب.
- تعرف ما الملفات الشخصية ولماذا قد تحتاجه.
- تنفّذ
hermes updateوhermes profile listوتفهم ما يحدث بعدها. - تضبط
HERMES_HOMEفي المكان الصحيح. - تتجنّب الخطأ الذي يحذّر منه المصدر.
كما تظهر تمامًا داخل Hermes.
hermes updatehermes profile listhermes profile create workhermes chathermes toolshermes backuphermes profilehermes uninstall
HERMES_HOMEHERMES_REAL_HOME
انتقل مباشرة إلى ما تحتاجه.
بلا اختصار أو حذف.
النص أدناه منقول من المصدر الرسمي بالإنجليزية حتى تبقى الأوامر والأسماء دقيقة كما هي. قبل كل قسم شرح عربي يوضّح ما بداخله.
Run multiple independent Hermes agents on the same machine — each with its own config, API keys, memory, sessions, skills, and gateway state.
What are profiles?
فيه تحذير مهم. اقرأه قبل أن تنفّذ أي شيء من هذا القسم. نصّ التحذير من المصدر مذكور أسفل هذا الشرح.
A profile is a separate Hermes home directory. Each profile gets its own directory containing its own config.yaml, .env, SOUL.md, memories, sessions, skills, cron jobs, and state database. Profiles let you run separate agents for different purposes — a coding assistant, a personal bot, a research agent — without mixing up Hermes state.
When you create a profile, it automatically becomes its own command. Create a profile called coder and you immediately have coder chat, coder setup, coder gateway start, etc.
Quick start
خطوات عملية بالترتيب. نفّذ خطوة وتأكد أنها نجحت قبل الانتقال للتالية. الأوامر هنا: hermes profile create coder.
hermes profile create coder # creates profile + "coder" command alias
coder setup # configure API keys and model
coder chat # start chattingThat's it. coder is now its own Hermes profile with its own config, memory, and state.
Creating a profile
أوامر تكتبها في الطرفية. افهم ما يفعله الأمر قبل نسخه. الأوامر هنا: hermes profile create work، hermes backup.
Blank profile
hermes profile create mybotCreates a fresh profile with bundled skills seeded. Run mybot setup to configure API keys, model, and gateway tokens.
If you plan to use this profile as a kanban worker (or want the kanban orchestrator to route work to it), pass --description "<role>" at create time so the orchestrator knows what it's good at:
hermes profile create researcher --description "Reads source code and external docs, writes findings."You can also set or auto-generate the description later with hermes profile describe — see the Kanban guide for the full routing model.
Clone config only (--clone)
hermes profile create work --cloneCopies your current profile's config.yaml, .env, SOUL.md, and skills into the new profile. Same API keys, model, and capabilities, but fresh sessions and memory. Edit ~/.hermes/profiles/work/.env for different API keys, or ~/.hermes/profiles/work/SOUL.md for a different personality.
Clone everything (--clone-all)
hermes profile create backup --clone-allCopies everything — config, API keys, personality, all memories, skills, cron jobs, plugins. A complete working snapshot. Per-profile history is excluded (session history, state.db, backups/, state-snapshots/, checkpoints/) — these belong to the source profile and can reach tens of GB. For a full backup including history, use hermes profile export or hermes backup instead.
Clone from a specific profile
hermes profile create work --clone-from coder--clone-from <source> selects the source profile directly and implies a config/skills/SOUL clone. Combine it with --clone-all when you want a full copy of that source profile:
hermes profile create work-backup --clone-from coder --clone-allUsing profiles
خطوات عملية بالترتيب. نفّذ خطوة وتأكد أنها نجحت قبل الانتقال للتالية. الأوامر هنا: hermes chat، hermes tools.
Command aliases
Every profile automatically gets a command alias at ~/.local/bin/<name>:
coder chat # chat with the coder agent
coder setup # configure coder's settings
coder gateway start # start coder's gateway
coder doctor # check coder's health
coder skills list # list coder's skills
coder config set model.default anthropic/claude-sonnet-4The alias works with every hermes subcommand — it's just hermes -p <name> under the hood.
The -p flag
You can also target a profile explicitly with any command:
hermes -p coder chat
hermes --profile=coder doctor
hermes chat -p coder -q "hello" # works in any positionSticky default (hermes profile use)
hermes profile use coder
hermes chat # now targets coder
hermes tools # configures coder's tools
hermes profile use default # switch backSets a default so plain hermes commands target that profile. Like kubectl config use-context.
Knowing where you are
The CLI always shows which profile is active:
- Prompt:
coder ❯instead of❯ - Banner: Shows
Profile: coderon startup hermes profile: Shows current profile name, path, model, gateway status
Profiles vs workspaces vs sandboxing
إعدادات تضبطها مرة وتنساها. غيّر واحدًا في كل مرة حتى تعرف أثر كل تغيير.
Profiles are often confused with workspaces or sandboxes, but they are different things:
- A profile gives Hermes its own state directory:
config.yaml,.env,SOUL.md, sessions, memory, logs, cron jobs, and gateway state. - A workspace or working directory is where terminal commands start. That is controlled separately by
terminal.cwd. - A sandbox is what limits filesystem access. Profiles do not sandbox the agent.
On the default local terminal backend, the agent still has the same filesystem access as your user account. A profile does not stop it from accessing folders outside the profile directory.
If you want a profile to start in a specific project folder, set an explicit absolute terminal.cwd in that profile's config.yaml:
terminal:
backend: local
cwd: /absolute/path/to/projectUsing cwd: "." on the local backend means "the directory Hermes was launched from", not "the profile directory".
Also note:
SOUL.mdcan guide the model, but it does not enforce a workspace boundary.- Changes to
SOUL.mdtake effect cleanly on a new session. Existing sessions may still be using the old prompt state. - Asking the model "what directory are you in?" is not a reliable isolation test. If you need a predictable starting directory for tools, set
terminal.cwdexplicitly.
Running gateways
شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه. تذكير: أن تحتفظ بأكثر من «شخصية» لوكيلك، لكل واحدة إعداداتها وذاكرتها.
Each profile runs its own gateway as a separate process with its own bot token:
coder gateway start # starts coder's gateway
assistant gateway start # starts assistant's gateway (separate process)Different bot tokens
Each profile has its own .env file. Configure a different Telegram/Discord/Slack bot token in each:
# Edit coder's tokens
nano ~/.hermes/profiles/coder/.env
# Edit assistant's tokens
nano ~/.hermes/profiles/assistant/.envSafety: token locks
If two profiles accidentally use the same bot token, the second gateway will be blocked with a clear error naming the conflicting profile. Supported for Telegram, Discord, Slack, WhatsApp, and Signal.
Persistent services
coder gateway install # creates hermes-gateway-coder systemd/launchd service
assistant gateway install # creates hermes-gateway-assistant serviceEach profile gets its own service name. They run independently.
Configuring profiles
أوامر تكتبها في الطرفية. افهم ما يفعله الأمر قبل نسخه. الأوامر هنا: hermes profile use.
Each profile has its own:
config.yaml— model, provider, toolsets, all settings.env— API keys, bot tokensSOUL.md— personality and instructions
coder config set model.default anthropic/claude-sonnet-4
echo "You are a focused coding assistant." > ~/.hermes/profiles/coder/SOUL.mdIf you want this profile to work in a specific project by default, also set its own terminal.cwd:
coder config set terminal.cwd /absolute/path/to/projectFrom the dashboard
The web dashboard
is a machine-level surface that can manage any profile's config, API
keys, skills, MCPs, and model via the profile switcher in its sidebar — no
per-profile dashboard needed. coder dashboard routes to the machine
dashboard with the coder profile preselected. The dashboard's Chat tab
also follows the switcher, spawning a conversation under the selected
profile's home.
Note: "Set as active" on the dashboard's Profiles page is the sticky
default for future CLI/gateway runs (same as hermes profile use) —
to edit a profile from the dashboard, use the switcher instead.
Updating
أوامر تكتبها في الطرفية. افهم ما يفعله الأمر قبل نسخه. الأوامر هنا: hermes update.
hermes update pulls code once (shared) and syncs new bundled skills to all profiles automatically:
hermes update
# → Code updated (12 commits)
# → Skills synced: default (up to date), coder (+2 new), assistant (+2 new)User-modified skills are never overwritten.
Managing profiles
خطوات عملية بالترتيب. نفّذ خطوة وتأكد أنها نجحت قبل الانتقال للتالية. الأوامر هنا: hermes profile list، hermes profile show coder.
hermes profile list # show all profiles with status
hermes profile show coder # detailed info for one profile
hermes profile rename coder dev-bot # rename (updates alias + service)
hermes profile export coder # pack into coder.tar.gz (shareable; keys stripped)
hermes profile import coder.tar.gz # install an archive as a new profileIn chat, the same two live as /export and /import — and in the desktop app as ⌘K → Export/Import profile…. See Sharing a profile ↗.
Naming the default profile
The default profile's internal ID is always default — it can't be truly
renamed because ~/.hermes is the installation root. Renaming it instead
sets a display name, which UI surfaces show in place of the bare ID:
hermes profile rename default Harumesu # Unicode fine: 小助手The display name appears in hermes profile list/show, the /profile
chat command, the dashboard, and the desktop app (including the Bot Mode
roster). It is presentation-only: -p default, service names, cron jobs,
and every other reference keep using the canonical default ID. It is
stored as display_name in ~/.hermes/profile.yaml; remove that line to
revert. Named profiles can carry a display_name too (it survives a real
rename), but rename for them still renames the profile itself.
Deleting a profile
أوامر تكتبها في الطرفية. افهم ما يفعله الأمر قبل نسخه. الأوامر هنا: hermes uninstall، hermes profile delete coder.
hermes profile delete coderThis stops the gateway, removes the systemd/launchd service, removes the command alias, and deletes all profile data. You'll be asked to type the profile name to confirm.
Use --yes to skip confirmation: hermes profile delete coder --yes
Tab completion
أوامر تكتبها في الطرفية. افهم ما يفعله الأمر قبل نسخه. الأوامر هنا: hermes completion zsh، hermes completion bash.
# Bash
eval "$(hermes completion bash)"
# Zsh
eval "$(hermes completion zsh)"Add the line to your ~/.bashrc or ~/.zshrc for persistent completion. Completes profile names after -p, profile subcommands, and top-level commands.
How it works
إعدادات تضبطها مرة وتنساها. غيّر واحدًا في كل مرة حتى تعرف أثر كل تغيير. تضبط HERMES_HOME، HERMES_REAL_HOME خارج المحادثة، في بيئة التشغيل.
Profiles use the HERMES_HOME environment variable. When you run coder chat, the wrapper script sets HERMES_HOME=~/.hermes/profiles/coder before launching hermes. Since 119+ files in the codebase resolve paths via get_hermes_home(), Hermes state automatically scopes to the profile's directory — config, sessions, memory, skills, state database, gateway PID, logs, and cron jobs.
This is separate from terminal working directory. Tool execution starts from terminal.cwd (or the launch directory when cwd: "." on the local backend), not automatically from HERMES_HOME.
On host installs, tool subprocesses keep your real OS-user HOME by default so
existing CLI credentials under ~ keep working across profiles. Profile data is
isolated by HERMES_HOME, not by changing HOME. Container backends still use
{HERMES_HOME}/home for persistent tool state, and host users who need strict
per-profile tool config can opt in with terminal.home_mode: profile.
This means two things that are easy to mix up:
HERMES_HOMEis the profile boundary. It controls Hermes config,.env, memory, sessions, skills, logs, cron jobs, gateway state, and other Hermes data.HOMEis the operating-system/user home that external CLIs expect. On host installs, Hermes keeps it as the real user home by default so tools likegit,ssh,gh,az,npm, Claude Code, and Codex find the same credentials they use in your normal shell.
The tradeoff is that host profiles share normal user-level CLI state by default.
If you need separate CLI identities per profile, set `terminal.home_mode:
profile in that profile's config.yaml`. In that mode Hermes launches tool
subprocesses with HOME={HERMES_HOME}/home; you then need to initialize or link
the profile-specific ~/.ssh, ~/.gitconfig, ~/.config/gh, cloud CLI auth,
Claude/Codex auth, npm state, and similar files inside that profile home.
Hermes also exposes HERMES_REAL_HOME to subprocesses so scripts can still find
the actual account home when home_mode: profile is active.
The default profile is simply ~/.hermes itself. No migration needed — existing installs work identically.
Sharing a profile
أوامر تكتبها في الطرفية. افهم ما يفعله الأمر قبل نسخه. الأوامر هنا: hermes profile install github، hermes profile update research-bot.
A profile you built on one machine can go to another — your own workstation, a teammate's laptop, or the community. Two paths:
Send a file. /export packs the profile into one .tar.gz — skills, memory, persona, crons, plugins, settings, and (from the desktop) your theme and layout. API keys are stripped. The recipient runs /import.
# In chat, run /export, hand over the file, and they run /import on it
hermes profile export coder
hermes profile import ./coder.tar.gz --name coderPublish a distribution. Package the profile as a git repository so recipients install it with one command and pull versioned updates later. Carries the SOUL, config, skills, cron jobs, and MCP connections; credentials, memories, and sessions stay per-machine.
# Install a whole agent from a git repo
hermes profile install github.com/you/research-bot --alias
# Update later when the author ships a new version (keeps your memories + .env)
hermes profile update research-botUse an export file for a one-time handoff or a move; use a distribution for an agent you'll keep shipping. See Profile Distributions: Share a Whole Agent for both — the comparison table, authoring, publishing, update semantics, and the security model.
5 أسئلة إجاباتها كلها في هذه الصفحة.
كل خيار اسم حقيقي من توثيق Hermes. حتى الخيارات الخاطئة حقيقية، لكنها من صفحات أخرى.