Hermes Agent | Thiết lập multi-agent với tính năng Profiles

  Apr 24, 2026      2m      0   
 

Thay vì dùng một agent cho tất cả mọi việc, bạn có thể tách vai trò: coding assistant, content writer, devops bot... Hermes Agent hỗ trợ điều này qua tính năng Profiles — mỗi profile là một agent hoàn toàn độc lập.

Hermes Agent | Thiết lập multi-agent với tính năng Profiles

Multi Agent ─ Vì sao?

Mỗi Hermes Agent có một "linh hồn" riêng — SOUL.md định nghĩa tính cách, vai trò và cách agent ứng xử. Kết hợp với bộ nhớ (memory), phiên làm việc (session), skill tự tạo và biến môi trường độc lập, mỗi agent sẽ hoạt động tốt nhất khi được chuyên biệt hóa cho một lĩnh vực cụ thể.

Thực tế cho thấy, một agent chuyên sâu luôn hiệu quả hơn một agent "biết tuốt". Giống như trong một công ty có sự phân công rõ ràng — CEO, CTO, Tech Lead, Frontend Developer, Backend Developer — mỗi người đảm nhận đúng vai trò của mình:

Vai trò agentChuyên môn
Coding assistantViết code, review, debug, refactor
DevOps botQuản lý server, deploy, monitor
Content writerViết bài, tóm tắt, dịch thuật
Research agentTìm kiếm, tổng hợp thông tin
Social media botLên lịch đăng bài, phân tích engagement

Trong Hermes Agent, tính năng Profiles cho phép bạn chạy nhiều agent độc lập trên cùng một máy — mỗi profile là một agent riêng biệt với thư mục home, cấu hình, bộ nhớ và skill của riêng nó.

Thiết lập Profile trong Hermes Agent

Một profile là một thư mục home độc lập của Hermes Agent. Mỗi profile có riêng: config.yaml, .env, SOUL.md, bộ nhớ, lịch sử phiên, skill, cron job và trạng thái gateway. Khi tạo profile coder, bạn ngay lập tức có một lệnh coder riêng với đầy đủ subcommand như :

  • coder chat
  • coder setup
  • coder gateway start

Tạo profile mới

Tạo profile trống (bắt đầu từ đầu):

hermes profile create coder

Clone cấu hình từ profile hiện tại (dùng chung API key và model, nhưng bộ nhớ và phiên làm việc hoàn toàn mới):

hermes profile create work --clone

Clone toàn bộ từ profile hiện tại (sao chép đầy đủ: cấu hình, bộ nhớ, phiên, skill, cron job — hữu ích để backup hoặc fork agent đã có ngữ cảnh) hoặc một profile cụ thể:

# clone từ profile hiện tại
hermes profile create backup --clone-all

# clone từ profile "coder"
hermes profile create work --clone --clone-from coder

Thiết lập và sử dụng profile

Sau khi tạo, cấu hình API key và model cho profile:

coder setup

Bắt đầu chat với agent trong profile đó:

coder chat

Nếu muốn chỉ định profile mà không dùng alias, dùng flag -p:

hermes -p coder chat

Để đặt profile mặc định cho tất cả lệnh hermes:

hermes profile use coder
hermes chat              # bây giờ mặc định nhắm vào profile "coder"
hermes profile use default   # chuyển về profile gốc

Cấu hình riêng cho từng profile

Mỗi profile có thể dùng model khác nhau, SOUL.md riêng và thư mục làm việc mặc định:

# Đặt model riêng cho profile coder
coder config set model.model anthropic/claude-sonnet-4

# Viết SOUL.md riêng — định nghĩa tính cách và vai trò
echo "You are a focused coding assistant. Prioritize clean, tested code." > ~/.hermes/profiles/coder/SOUL.md

# Đặt thư mục làm việc mặc định khi agent chạy lệnh terminal
coder config set terminal.cwd /absolute/path/to/project

Chạy gateway độc lập cho từng profile

Mỗi profile có thể chạy bot Telegram (hoặc Discord, Slack…) riêng biệt với bot token khác nhau:

# Cấu hình bot token riêng cho từng profile
nano ~/.hermes/profiles/coder/.env
nano ~/.hermes/profiles/assistant/.env

# Khởi động gateway của từng profile như một tiến trình độc lập
coder gateway start
assistant gateway start

Nếu muốn chạy dưới dạng service hệ thống (systemd/launchd), cài đặt từng profile như một service riêng:

coder gateway install
assistant gateway install

Quản lý profile

hermes profile list                        # danh sách tất cả profile
hermes profile show coder                  # thông tin chi tiết của một profile "coder"
hermes profile rename coder dev-bot        # đổi tên (cập nhật alias và service tự động) profile "coder" thành "dev-bot"
hermes profile export coder                # xuất profile "coder" ra file coder.tar.gz để backup
hermes profile import coder.tar.gz         # nhập từ file archive để restore profile "coder"
hermes profile delete coder                # xóa profile "coder" cùng các dịch vụ liên quan (dừng gateway, xóa service, xóa dữ liệu)

Tham khảo thêm tài liệu: https://hermes-agent.nousresearch.com/docs/user-guide/profiles


Hãy tham gia group Khám phá Hermes Agent: https://www.facebook.com/groups/hermes.agent.vn để cùng trao đổi và học hỏi.

Danh sách bài viết series Hermes Agent:

Tham gia ngay group trên Facebook để cùng thảo luận với đồng bọn nhé:

Khám phá Hermes Agent