Hello! I am Yokoi, the CEO of moze Inc.
I run "moze," a new-generation game studio in the era of Metaverse × AI, where we specialize in developing original content for Roblox and supporting corporate entry into Roblox.
For me, asking AI to do work has become quite natural. I use AI in my daily tasks, such as research, document creation, and operating slides and spreadsheets.
However, when actually using it, I sometimes feel it is a bit cumbersome. I have to open the AI in a browser every time, explain the project prerequisites, and provide relevant Notion pages or documents. Even though AI is convenient, the preparation required to ask AI to do work feels a bit heavy each time.
What if the AI were permanently stationed in the Slack or Discord you use every day?
It would be in the project chat, ready to be spoken to on the spot whenever needed. It would keep running even after you close your PC. It would act based on the flow of project conversations without needing to be explained from scratch every time.
Based on this idea, I created an environment this time to run the Hermes Agent constantly on a server and operate it as an AI employee that can be used from Slack/Discord. When I actually tried running it, it felt less like a simple bot integration and more like the AI was truly "present" in the project chat.
In this article, I will cover not just connecting AI to chat, but also creating profiles for each project, Slack/Discord integration, constant operation, Notion integration, setting management via GitHub private repositories, and safety measures to prevent sensitive information from entering Git.
The intended readers are those who can handle terminal operations a little but are just starting with SSH connections or VPS operation. I will explain things so that you can understand "where, what command, and why you are typing it" as much as possible.
Why build AI on a server and have it stationed in chat?

The point of this article is to place the AI agent on a server rather than your own PC.
Codex and Claude Code are already quite practical as aids for development work, research, and document creation. AI agents running on your local PC also have great appeal.
However, if you want the AI to work through the night, you need to keep the AI agent running somewhere.
There is an option to keep the AI agent running constantly on your local PC, and of course, you can run it on cloud services like AWS. This time, I chose a VPS as the operation location.
The reason is that when considering it for company business use, I felt that running it constantly on a server is easier to manage than keeping a home PC running for long periods. Considering unexpected PC shutdowns, hardware load, security, and ease of management during business trips, placing it on a VPS suited my purpose better.
Also, since many VPS services can be used with a fixed monthly plan, I thought it would be easier to suppress unexpected expenses compared to cloud services like AWS, which are often pay-as-you-go.
This time, I contracted a VPS that can be used for a flat fee of about 2,000 yen per month and built the AI agent there. I think it is cheaper than buying a new PC. And if you keep it stationed in Slack or Discord, you can make requests directly from the project chat even when you are out or in the middle of the night.
Also, the advantage of having it stationed in chat is how it handles context.
Without having to explain "this project has this background and is currently in this state" every time, you can make it easier to refer to past history by combining conversation history, memory, session_search, and Slack/Discord history retrieval tools.
What I want to create this time is not just a chat bot, but an AI employee that keeps working 24 hours a day.
The AI employee referred to here does not mean replacing human employees. It refers to an AI agent that resides in project chats and channels, assisting with information organization, status checks, document updates, research, and even providing advice for project success.
What we will build in this article
Ultimately, we will create the following environment.
[ユーザー] ──> Slack / Discord
↕ Socket Mode / WebSocket接続
Hermes Gateway(VPSで常時稼働)
↕
Hermes Agent(project-x profile)
↑
[管理者のMac] ── SSH接続で設定・管理Furthermore, we will enable Hermes Agent to access the following external services and files.
Hermes Agent ↓ Notion API GitHub private repo VPS filesystem terminal tools skills
The completed state is as follows.
Hermes Agent is running on XServer VPS
Can connect to the VPS from a Mac via SSH
Hermes Agent is authenticated via OpenAI Codex OAuth
A project-x profile for the project has been created
Can talk to Hermes Agent from Slack/Discord
Hermes Gateway is running continuously even after SSH disconnection
External service keys such as Notion API can be handled safely in .env
Important files such as skills and config can be managed in a GitHub private repo
Secret information and history such as .env, auth.json, sessions, and logs are not included in Git
Pre-commit / pre-push hooks can prevent the inclusion of secret information to some extent
Restoration procedures are documented in RESTORE.md
Hermes Agent can also be authenticated using methods other than OpenAI Codex OAuth, and those models can be utilized. It can also be used by connecting to model APIs.
When actually using it, you can make requests on Slack or Discord as follows.
@AI社員 このチャンネルで1日に会話したことや意思決定したことをまとめて
@AI社員 これまでのミーティング議事録や先週のチャットを振り返って、今週やるべきことを整理して
@AI社員 毎朝9時に進捗確認チャットを送って
For example, if you send "Read this Notion page and organize what to do this week" on Slack, the goal is for the Hermes Agent on the VPS to run with the project-x profile, read the information using the Notion API, and reply in the chat.
This article is based on the procedures actually built as of June 2026. Since the specifications of Hermes Agent, Slack/Discord, and VPS may change, please check each official document before starting work.
Official links to check before starting
This article explains the process based on steps I actually tested, but the specifications of each service may change. I recommend checking the following before you begin to ensure you have the latest information.
Hermes Agent: NousResearch/hermes-agent
Hermes Messaging Gateway: Messaging Gateway | Hermes Agent
Hermes Persistent Memory: Persistent Memory | Hermes Agent
XServer VPS: XServer VPS
XServer VPS SSH connection method: SSH connection method | XServer VPS
Slack Socket Mode: Socket Mode | Slack
Slack OAuth scopes: Permission scopes | Slack
Discord Developer Docs: Discord Developer Documentation
Discord Message Content Intent: Message Content Intent FAQ
GitHub Deploy keys: Managing deploy keys - GitHub Docs
systemd linger: loginctl - freedesktop.org
Secret scan options: Gitleaks
What is Hermes Agent?
Hermes Agent is an AI agent that runs in the terminal or on chat platforms.
It can read files, execute commands, access information from the Web or Notion, and register recurring tasks as needed.
Another major feature is that it does not end with a single chat session, but can continuously accumulate knowledge through memory and skills.
In the official README, Hermes Agent is described as an AI agent that creates and improves skills from experience, searches past conversations, and deepens user understanding across sessions. Additionally, the official Persistent Memory documentation introduces a mechanism where important facts are kept in MEMORY.md or USER.md, while past sessions can be searched using session_search.
Other features include the following:
Use the Gateway function to access it from Slack, Discord, Telegram, LINE, WhatsApp, Signal, Microsoft Teams, Matrix, email, SMS, browsers, and more
Choose models from OpenAI, OpenRouter, and others
Use tools to perform file operations and terminal commands
Separate settings, memory, and skills for each profile
Retain important premises and user settings as memory
Search past conversation history with session_search
Accumulate reusable procedures and knowledge as skills, and improve based on experience
Execute periodic tasks with cron
In this article, we will run this Hermes Agent constantly on a VPS so that it can be used as an AI employee for your projects.
Why I chose Hermes Agent
The reason I chose Hermes Agent this time is that its architecture is well-suited for an AI employee running constantly on a VPS.
In particular, the ability to combine Slack/Discord Gateway, profiles, skills, memory, and tool execution is significant.
If you just want to connect an AI to a chat, other bot implementations can do that. However, considering the need to separate profiles for each project, cultivate dedicated skills and memory, and delegate tasks ranging from file operations to status checks via chat, the Hermes Agent architecture fit my purpose.
Also, if you can have the same Hermes profile appear on both Slack and Discord, you can talk to an AI employee that shares the same memory regardless of the platform. This makes it easier to receive consistent support even if you use multiple communication tools for your project.
Overall Architecture
The elements involved this time are as follows.
Since tables cannot be inserted in note, I have also pasted the Markdown notation below.
| 要素 | 役割 | | --- | --- | | Mac | 手元の作業端末。SSHでVPSに接続する | | XServer VPS | Hermes Agentを24時間稼働させるサーバー | | Hermes Agent | AIエージェント本体 | | project-x profile | プロジェクト専用のHermes設定。config、skills、memory、.envなどを分ける | | Hermes Gateway | Slack/DiscordなどのチャットとHermes Agentをつなぐ入口 | | Slack/Discord Bot | チャット上でAI社員として見えるアカウント | | GitHub private repo | Hermesの重要ファイルをバージョン管理する場所 | | .env | APIキーやトークンなどの秘密情報を置く場所。Gitには入れない |
This time, we will install and run Hermes Agent directly on a VPS.
There is also the option of using Docker. By using Docker, you can encapsulate the Hermes Agent execution environment within a container, making it harder to pollute the server's main environment and easier to avoid dependency conflicts with other systems.
On the other hand, for this project, I decided to install Hermes Agent directly on the VPS without using Docker for the following reasons.
I want to make the steps easy to understand even for SSH beginners
I want to get it up and running as easily as possible first
I don't plan to run any other systems on this VPS that might conflict with Hermes Agent
I intend to operate it as a dedicated server primarily for Hermes Agent
It is easier to straightforwardly understand the systemd user service and ~/.hermes configuration
Therefore, this article will proceed with the policy of "simply installing directly onto the VPS."
However, if you plan to run multiple web apps, databases, n8n, Dify, etc., on the same VPS in the future, or if you want to strictly isolate environments, a Docker configuration is also a very viable option.
Why use XServer VPS?
For this project, I will use XServer VPS as the place to run Hermes Agent 24/7.
The reason is that it is easy to use among domestic VPS providers and offers a good balance between price and specs.
I chose the 6GB memory plan for about 2,000 yen per month. This is sufficient for running the Hermes Agent itself, the Gateway, light tool execution, and cron jobs.
Also, the ability to choose Ubuntu and the abundance of AI-related app images are attractive features.
Please note that VPS pricing and plans are subject to change. Always check the official website for the latest information before signing up.
Also, the steps should not change significantly if you use a VPS other than XServer, as long as you can connect via SSH.
Why use Ubuntu?
I will choose Ubuntu as the OS.
The reason is that there is a lot of information available regarding AI agents, Python, Node.js, Docker, and systemd, making it easier to resolve issues when they arise.
Developer tools like Hermes Agent and Codex CLI often have documentation based on Ubuntu or Debian-based Linux, and it is also convenient to be able to install necessary packages using apt.
If you are unsure, I believe choosing Ubuntu LTS will result in the fewest problems.
Preparing for SSH connection
First, I will enable SSH connection from my Mac to the XServer VPS.
SSH is a mechanism for securely logging into a remote server from your local PC. It might feel a bit intimidating at first, but once you get used to it, you can use it with the feeling of simply opening a remote terminal.
The official XServer VPS manualprovides the following guidance as preparation before SSH connection.
Check the IP address on the top page of the VPS panel
Open the 'Packet Filter Settings' in the VPS panel
Turn the packet filter ON
Add a filter rule for SSH connection
The IP address confirmed here is the value that goes into your-vps-ip below.
For the initial connection, the username is basically root. If you have created a different user yourself, use that username.
Connect from the Mac side as follows.
ssh root@your-vps-ip
If you have not set up an SSH Key, log in with the root password you set when creating the VPS server. If you have set up an SSH Key, use the corresponding private key to log in.
From this point on, it is important not to confuse whether you are typing commands on the 'Mac side' or the 'VPS side'.
Once you have logged in as root, you will create a working user in the next chapter. It is safer to perform daily tasks as that working user rather than as root.
Initial VPS Setup
Once you have logged into the VPS, first perform the basic initial setup.
Since you are logged in as root at first, execute the following on the VPS side.
First, update the packages.
apt update apt upgrade -y
Next, create a user to use for daily tasks.
adduser your-user usermod -aG sudo your-user
Enter the username you want to use for your-user.
Perform daily tasks and the continuous operation of Hermes Gateway as this working user, not as root.
The reasons are as follows.
It eliminates the need to run with root privileges, reducing the risk of destructive commands being executed
It makes it easier to consolidate profile settings in the working user's ~/.hermes
If you are using SSH key login as root, you can copy the root public key settings to the working user so that you can also log in via SSH key as that user.
mkdir -p /home/your-user/.ssh cp /root/.ssh/authorized_keys /home/your-user/.ssh/authorized_keys chown -R your-user:your-user /home/your-user/.ssh chmod 700 /home/your-user/.ssh chmod 600 /home/your-user/.ssh/authorized_keys
Once you have done this, check from a separate terminal on your Mac if you can connect as the working user.
ssh your-user@your-vps-ip
Once connected, proceed with the subsequent tasks using this working user.
Also, since it is tedious to enter the IP address and username every time, it is convenient to create an alias in ~/.ssh/config on your Mac.
Host xserver-vps HostName your-vps-ip User your-user IdentityFile ~/.ssh/id_ed25519
From now on, you can connect using the following.
ssh xserver-vps
Install the necessary packages.
sudo apt install -y curl git build-essential python3 python3-venv python3-pip ufw fail2ban tmux nano
Enable UFW as a firewall.
sudo ufw allow OpenSSH sudo ufw enable sudo ufw status
Also enable fail2ban as a countermeasure against unauthorized logins.
sudo systemctl enable fail2ban sudo systemctl start fail2ban sudo systemctl status fail2ban
As a precaution, after changing settings related to SSH or UFW, it is safer to verify that you can reconnect from a separate terminal before disconnecting your current SSH session.
Installing Hermes Agent
Next, install Hermes Agent on the VPS.
Execute the following on the VPS side.
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
If you want to check the contents before executing, save it as install.sh first, check the script contents, and then execute it. The command is as follows.
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh -o install.sh less install.sh bash install.sh
After installation, apply the PATH.
source ~/.bashrc
Check the version and status.
hermes --version hermes doctor
Since the installation method may change in the future, please also check the official Hermes Agent documentation when performing the actual work.
Authenticating Hermes with OpenAI Codex OAuth
In this guide, we will use OpenAI Codex OAuth for Hermes Agent model authentication.
Execute the following on the VPS side.
hermes auth add openai-codex
Follow the displayed instructions to authenticate via your browser. To authenticate, you must enable the setting "Enable device code authentication for Codex."
You can configure this by logging into ChatGPT in your browser and going to Settings > Security.
After authentication, select the model you want to use.
hermes model
Finally, verify the connection via the CLI.
hermes chat -q "こんにちは。日本語で一言返してください。"
If you receive a response, the Hermes Agent itself is running.
Note that OAuth authentication information is saved in auth.json. Since this is sensitive information, never include it in Git when managing your project on GitHub later.
Creating a project-x profile
From here, we will create an AI employee dedicated to the project.
Hermes Agent has a profile feature. By separating profiles, you can isolate config, skills, memory, .env, and more for each specific use case.
In this example, we will create a project-x profile.
Execute this on the VPS side.
hermes profile create project-x
Check the list of profiles.
hermes profile list
To start Hermes with the project-x profile, do the following.
hermes --profile project-x
For a one-time execution, use the following.
hermes --profile project-x chat -q "あなたはproject-x用のAI社員です。日本語で一言返してください。"
By separating profiles, you can isolate AI memory, skills, settings, and external service keys for each project.
For example, in actual operation, you can separate them as follows:
project-game
project-marketing
project-research
project-client-a
It feels like raising an AI employee for each project.
Verify operation with project-x profile
Check if it is running with the project-x profile.
Execute it on the VPS side.
hermes --profile project-x config path hermes --profile project-x config env-path hermes --profile project-x doctor
Finally, execute the chat by specifying the profile.
hermes --profile project-x chat -q "project-x profileで動いているか確認してください。"
Once you have verified it works, switch the current profile to project-x so you don't have to add --profile project-x every time in the future.
hermes profile use project-x
From now on, the hermes command will use the project-x profile without needing to specify it.
From here on, the Hermes used for Slack/Discord integration is also intended to be linked to this project-x profile.
Prepare a Slack/Discord Bot
Next, prepare a Bot on the Slack/Discord side.
In the case of Slack, create an App from the Slack API management screen and configure Bot Token Scopes, Socket Mode, Event Subscriptions, etc.
At a minimum, the following settings are required.
Create a Slack App
Set Bot Token Scopes
If reading channel history, set the history reading scopes corresponding to the target channel type
Enable Socket Mode
Create an App-Level Token
Set Event Subscriptions
Invite the Bot to a channel
For Discord, create an Application and a Bot in the Discord Developer Portal.
The necessary steps are as follows:
Create an Application in the Discord Developer Portal
Create a Bot
Obtain a Token
Grant permissions to read target channels, such as View Channel / Read Message History
Enable Message Content Intent
Invite to the Discord server with the necessary permissions
The UI for Slack/Discord management screens may change. This article covers the general flow, but you can also proceed by consulting the Hermes Agent itself during setup—for example, by providing it with screenshots or text from the screen if you find yourself asking, 'I can't find the XX item on the Slack management screen right now, what should I do?'
Configure Hermes Gateway
Hermes Gateway is a mechanism that connects chats like Slack/Discord to the Hermes Agent.
The Gateway receives messages from Slack/Discord and passes them to the Hermes Agent.
First, configure the Gateway using the project-x profile.
Execute this on the VPS side.
hermes gateway setup
When prompted for a Slack or Discord token, enter the token obtained from the management screen.
Once configured, first start it in the foreground to verify it works.
hermes gateway run
Try sending a message from Slack/Discord as follows.
こんにちは。疎通テストです。
If using it in a channel, invite the Bot to the channel and mention it as follows. Please change '@AI Employee' to the username you have set, as appropriate.
@AI社員 こんにちは。疎通テストです。※「@AI社員」の箇所は、適宜設定したユーザー名などに変える
If you receive a reply, the Gateway connection is successful.
It is recommended to check it first in a DM or a test channel only.
Keep the Gateway running 24/7
If you are running gateway run in the foreground, it may stop when you disconnect from SSH.
To make it an AI employee that works 24/7, you need to keep the Gateway running at all times.
Execute this on the VPS side.
hermes gateway install hermes gateway start hermes gateway status
Verify that it continues to run after disconnecting from SSH
To confirm it is running 24/7, check if the Gateway remains active even after you disconnect from SSH.
With systemd user services, you may need to enable linger to keep the user service running after an SSH disconnection.
Execute the following on the VPS side.
sudo loginctl enable-linger your-user
Restart the Gateway.
hermes gateway restart hermes gateway status
First, disconnect from SSH on your Mac.
exit
In that state, try sending the following from Slack/Discord.
@AI社員 SSHを切っても動いていますか?
If you receive a reply, the AI employee is running 24/7 on the server.
Reconnect as needed to check the status.
ssh xserver-vps hermes gateway status
Once you have reached this point, you can talk to the Hermes Agent from Slack/Discord, and the Gateway will continue to run even if you disconnect from SSH.
Thoughts on having it reside in Slack/Discord
Honestly, at first, I thought it was just a simple bot integration.
Being able to talk to an AI from Slack or Discord. It seemed convenient, but I thought it might essentially just be changing the location where you open the AI from a browser to a chat window.
That was what I thought, but the moment I actually had it reside in Slack, my impression changed.
Instead of opening the AI in a browser to ask questions, it feels like the AI is "present" in the project chat.
This difference is much greater than I expected.
Instead of opening a separate screen to ask an AI to perform a task, you can talk to the AI directly within your regular project conversations.
While full-scale operation is still ahead, I have identified the basic usage patterns, such as project comprehension, 24/7 operation, reading Notion, and verifying work on the server.
What was particularly interesting was when I had the same Hermes profile appear in both Slack and Discord. Since they use the same profile, the content discussed in Slack and the content discussed in Discord are not fragmented. It feels like the same AI employee is present in both spaces.
The AI in Slack and the AI in Discord do not act as different people, but as a single member with the same memory. This sensation was much closer to a human than simple bot integration.
Of course, that is precisely why permission management is important. Giving a terminal or file tool to an AI that resides in a chat also means granting it quite powerful permissions.
Since convenience and risk increase simultaneously, I will implement security settings next.
Implementing security settings
Being able to request tasks from the server-side AI via chat is convenient, but it is also very powerful.
In particular, enabling the terminal tool or file tool allows for command execution and file editing on the VPS via chat. While this is convenient, it is dangerous if configured incorrectly.
First, I will make the handling of secret information and personal information safer.
Execute on the VPS side.
hermes config set security.redact_secrets true hermes config set privacy.redact_pii true
Also check the approval mode.
hermes config set approvals.mode manual
Alternatively, if you want to automatically approve low-risk items and only confirm high-risk ones, use the following.
hermes config set approvals.mode smart
You can also turn off approvals completely as shown below, but I do not recommend it at first.
hermes config set approvals.mode off
approvals.mode off is convenient, but it increases the risk of dangerous commands being executed via chat. It is safer to operate with manual or smart at least initially.
In addition, the following are also important.
Limit who can use it with an allowlist
Keep Slack/Discord Bot permissions to a minimum
Understand the risks when enabling terminal/file tools
Do not paste secret information into the chat
Do not include tokens or API keys in screenshots
Add external service keys like the Notion API to .env
Place external service keys, such as the Notion API, into .env.
In this case, we will add them to the .env file for the project-x profile.
Execute this on the VPS side.
nano ~/.hermes/profiles/project-x/.env
For example, if you are using a Notion API key, add it as follows.
NOTION_API_KEY=your_notion_api_key
After saving, restart the Gateway.
hermes gateway restart
Verify connectivity from Slack/Discord.
@AI社員 このNotionページを読めるか確認してください: your_notion_page_url
A dedicated tool is required to read past Slack/Discord history
One thing I got stuck on with Slack/Discord integration was handling past messages and attachments.
Even if you grant the bot permission to view channels or read history, that alone does not mean Hermes can search through arbitrary past messages.
Permissions on the chat service side and the tools actually available to a Hermes conversation session are separate things.
For example, in Discord, you need to grant the bot the Read Message History permission. This is a prerequisite for the bot to be able to read history via the Discord API.
However, that alone does not put Hermes in a state where it can paginate and search through arbitrary past messages when asked to "find a past PDF in this channel."
You must enable the Discord history retrieval tool on the Hermes side and make it callable from the conversation session.
In this case, by enabling fetch_messages in Discord, it became possible to retrieve recent messages from specified Discord channels or threads.
fetch_messages uses the Discord API's message retrieval to obtain information such as the following:
Message ID
Author
Body text
Post Date and Time
Attachment Information
Reaction Information
For example, if you want to find a PDF posted to Discord in the past, you can search by retrieving the most recent 100 messages, checking the attachment filenames and URLs, and if not found, retrieving the previous 100 messages, and so on.
The same thing happened with Slack.
Even if the Slack Bot token itself is in a state where it can read the history of the target channel, if the Slack history search tool is not exposed to the Hermes side, the AI cannot actively search the channel's past history.
In this build, I asked Hermes Agent to add a history search tool for Slack, enabling the following operations.
Get Slack Channel List
Get Channel Information
Get Channel History
Search Messages in Channel
Search Attachment Metadata
Download File by Slack File ID
I have confirmed that it is actually possible to retrieve the history of the target channel via the Slack API and search for messages regarding documents within the channel.
However, for both Slack and Discord, this is not exactly the same full-text search as the search bar in each app. It is a function that retrieves messages within the scope the Bot can see via API and searches while paginating as necessary.
For safe operation, it is best to limit the target channels at first and enable only the minimum necessary read-only tools, such as history retrieval and message search. If you allow file downloads or wide-range history retrieval, you need to configure it while being aware of the scope of information that can be retrieved.
Manage important Hermes files in a GitHub private repo
Hermes settings on the VPS will grow as you operate it.
In particular, you would be in trouble if you lost skills, config, README, or RESTORE. Therefore, manage them with version control in a GitHub private repo.
What I actually used this time was the method of creating an SSH key on the VPS and registering that public key as a Deploy key for the GitHub private repo.
With this method, you can SSH from your VPS to that repo and push changes. Since you don't need to store your GitHub Personal Access Token on the VPS, it is easier to restrict access rights to only the configuration management repo.
However, you should not put everything into Git.
Files like .env and auth.json contain sensitive information. sessions and logs may contain conversation history or personal information. These should not be managed by Git.
For example, name your repo as follows.
hermes-vps-config
Execute this on the VPS side.
cd ~/.hermes git init git branch -M main
Next, create an SSH key for GitHub connection on the VPS.
ssh-keygen -t ed25519 -C "hermes-vps-config" -f ~/.ssh/hermes-vps-config_ed25519
Check the public key.
cat ~/.ssh/hermes-vps-config_ed25519.pub
On the GitHub side, add this public key to Deploy keys in the Settings of your private repo.
If you want to push from the VPS, turn on 'Allow write access' when registering the Deploy key. If you only need read access, you can leave it off.
Once you have created a private repo on GitHub and registered the Deploy key, add the remote.
git remote add origin git@github.com:your-github-org/hermes-vps-config.git
Specify that you want to use the private key for the Deploy key you just created when connecting to GitHub from this repo.
git config core.sshCommand "ssh -i ~/.ssh/hermes-vps-config_ed25519 -o IdentitiesOnly=yes"
Also, set the Git username and email address to commit in this repo on the VPS.
git config user.name "Your Name" git config user.email "you@example.com"
I am not using --global here, as I am setting it only for this repo. This makes it easier to use different names or email addresses for each repo if you might use Git for multiple purposes on the VPS.
What you should and should not put in Git
The purpose of Git management is to 'make it easier to restore and review Hermes,' not to 'save every state.'
Examples of what you can put in Git.
Since you cannot insert tables in note, I have also pasted the Markdown notation below.
| ファイル/ディレクトリ | 理由 | | --- | --- | | README.md | repoの目的や運用方針を書く | | RESTORE.md | 復元手順を書く | | .gitignore | 秘密情報やruntime stateを除外する | | .install_method | インストール方法の記録 | | SOUL.md | Hermesの人格・方針設定。内容に機密情報がない場合のみ | | config.yaml | 安全な範囲の設定 | | profiles/project-x/config.yaml | project-x profileの設定。秘密情報がない場合のみ | | profiles/project-x/SOUL.md | project-x用の方針。機密情報がない場合のみ | | skills/ | 再利用したい手順や知識 | | profiles/project-x/skills/ | project-x専用skills | | .githooks/ | commit/push前の安全チェック | | scripts/scan_sensitive.py | 秘密情報スキャン用script |
Examples of what you should not put in Git.
Since you cannot insert tables in note, I have also pasted the Markdown notation below.
| ファイル/ディレクトリ | 理由 | | --- | --- | | .env | APIキーやtokenが入る | | profiles//.env | profileごとのAPIキーやtokenが入る | | auth.json | OAuth認証情報が入る | | profiles//auth.json | profileごとのOAuth認証情報が入る | | state.db | セッションDB。会話履歴や個人情報が入る可能性がある | | sessions/ | セッション履歴が入る | | logs/ | ログに個人情報やtokenが混ざる可能性がある | | gateway_state.json | Gatewayのruntime state | | channel_directory.json | チャンネル情報が入る可能性がある | | *.token | tokenファイル | | *.secret | secretファイル | | cache/ | cache類 | | generated media | 生成物。必要に応じて別管理 |
In particular, session DBs and logs may contain conversation history or personal information. It is safer not to include them, even in a GitHub private repo.
Create a .gitignore
First, create a .gitignore to exclude sensitive information and runtime state.
The following is an example.
.env /.env auth.json /auth.json state.db state.db- sessions/ /sessions/ logs/ /logs/ gateway_state.json channel_directory.json *.token *.secret pycache/ /pycache/ *.pyc
Please add any files you wish to exclude according to your own environment.
Create README.md and RESTORE.md
It is convenient to have README.md and RESTORE.md ready in your GitHub repo. Let's instruct Hermes Agent to create them.
Write the following in README.md.
Purpose of this repo
Managed items
Unmanaged items
Profile configuration
Security policy
Explanation of hooks
Refer to RESTORE.md for restoration
Write the following in RESTORE.md.
Restoration procedure on a new VPS
Hermes installation
Repo clone
Copying tracked files
Manual recreation of .env
Reconfiguring auth
Setting hooksPath
gateway restart
Slack/Discord connectivity check
Preventing sensitive information leaks with pre-commit / pre-push hooks
Using only .gitignore cannot completely prevent mistakes where personal or confidential information is uploaded to a GitHub repo.
Therefore, I instruct Hermes Agent to run a secret scan before committing and pushing.
Instead of writing all the hooks and scripts myself, I asked Hermes Agent to handle the task.
For example, I make requests like the following.
このHermes設定管理repoで、.envやauth.json、sessions、logsなどがGitに入らないようにしてください。 また、commit前とpush前にAPIキーやtokenらしき文字列を検出して止めるhookも用意してください。 READMEとRESTOREにも、管理対象と管理対象外、復元手順を追記してください。
I entrusted Hermes Agent with the following tasks:
Organizing .gitignore
Creating .githooks/
Creating pre-commit / pre-push secret scan hooks
Creating scripts/scan_sensitive.py
Setting git config core.hooksPath .githooks
README.md / RESTORE.md updates
After the work is done, I perform a manual scan as needed to verify.
python3 scripts/scan_sensitive.py --staged
Here is an example of checking the diff before pushing.
python3 scripts/scan_sensitive.py --range origin/main..HEAD
Having such hooks in place makes it easier to stop commits or pushes when strings that look like API keys or tokens are included.
You can prepare your own scan_sensitive.py, but if you want to use an existing tool, Gitleaks is also an option. By combining it with pre-commit hooks or GitHub Actions, you can detect sensitive information before committing or pushing.
However, secret scanning is not a panacea. There are false positives, and it cannot guarantee the detection of all secret information.
It should be used only as a final safety net; it is important to design your system so that files like .env and auth.json are not included in Git in the first place.
Push to GitHub
Once the deploy key and remote settings are configured, push to the GitHub private repository.
Commit.
git add README.md RESTORE.md .gitignore config.yaml profiles/project-x/config.yaml git commit -m "chore: initialize Hermes VPS config repo"
Push.
git push -u origin main
Furthermore, you don't have to type the commands yourself from commit to push; you can simply instruct the Hermes Agent in natural language, and it will execute them for you.
Once you have reached this point, you can manage Hermes settings and skills in a GitHub private repository while keeping sensitive information and history—such as .env, auth.json, sessions, and logs—out of Git.
Actually requesting tasks from the AI employee via Slack/Discord
Once you have set this up, you can make requests to your AI employee from Slack/Discord.
For example, you can talk to it as follows.
@AI社員 こんにちは。あなたはproject-xのAI社員です。今日からこのプロジェクトを手伝ってください。
@AI社員 このVPSのディスク容量を確認してください。
@AI社員 project-x profileの設定ファイルがGitHub管理されているか確認してください。
@AI社員 Notionのこのページを読んで、TODOを3つに整理してください。
Instead of opening a browser to ask the AI questions, it feels like you are calling out to an AI employee who is in your project chat.
Things that were convenient during operation
I mentioned earlier what it feels like to have an AI in Slack/Discord. Here, I will summarize the practical operational benefits.
The points I found convenient are as follows:
The AI keeps running even when you close your PC
You can consult with it immediately from Slack/Discord
You can delegate server status checks to it
It is easy to connect with Notion and GitHub
You can separate AI employees by profile
Skills grow
Since it is managed via GitHub, a history of configuration changes is kept
Being able to separate profiles is particularly convenient.
For example, you can separate AI employees as follows:
AI employee for project-x
AI employee for project-y
AI for administration
AI for research
AI for documentation
Because you can separate background knowledge and skills for each project, you can treat them not just as chatbots, but as members who grow little by little.
Points to note
While convenient, there are also points to note.
First, the ability to operate the server from chat is powerful. If you enable the terminal tool, you can execute commands, and if you enable the file tool, you can rewrite important files.
Therefore, you should always keep the following in mind:
Do not use approvals.mode off lightly
Keep Slack/Discord Bot permissions to a minimum
Restrict users with an allowlist
Do not paste secret information into chat
Do not include .env or auth.json in GitHub
Session/log/memory may contain business information
VPS costs will be incurred
Be aware of specification changes in Hermes and each service
Deciding 'how much authority to give an AI employee' is a balance between convenience and security.
It is recommended to start with minimum privileges and increase tools and permissions as needed.
Future possibilities
Based on this configuration, the following things could be possible in the future.
Increase profiles for each project
Develop skills specific to project-x
Strengthen Notion integration
Connect with Google Workspace as well
Make better use of cron functions
Delegate meeting minutes and TODO organization on Slack/Discord
Assign different roles to each AI employee
Rather than just using AI as a single all-purpose assistant, I believe it will become easier to integrate into practical work if you develop them separately for each project or role.
Conclusion
Thank you for sticking with this long article until the end.
The three most important points in this article are as follows:
By running Hermes Agent on a VPS 24/7, you can treat the AI not as a tool to open in a browser, but as an 'AI employee residing in chat' that can be called from Slack/Discord
By separating profiles, memory, and skills, you can develop AI employees that possess context and knowledge specific to each project
Security design is extremely important, such as not including .env or auth.json in Git, properly setting allowlists and approvals, and restricting Bot permissions
Instead of just opening and using AI in a browser, welcoming it as a resident member in your chat is a great step. As a first step, setting up Hermes Agent to run on a VPS is a very interesting option.
I would be very happy if this article proves useful to you. Thank you for reading until the end.
[moze Inc. Company Overview]
Company Name: moze Inc.
Address: THE SHORE Nihonbashi Kayabacho 2F, 1-2 Nihonbashi Hakozaki-cho, Chuo-ku, Tokyo
Representative: Kazutaka Yokoi, Representative Director and CEO
Established: September 15, 2023
Business Description: Planning, development, operation, and user acquisition support for content specialized in Roblox
Corporate Collaboration Track Record: Release of Calbee, Inc.'s "Jagariko" Roblox space and avatar items
Official Website: https://moze.ai/
Contact: hello@moze.ai