Running a 24/7 AI Agent on Your Own Machine: Setting Up Hermes
DevBlog
Jul 24, 2026 · 4 min read · 4 views

Most guides to AI agents stop at a chat window. This one covers running an agent — called Hermes — as a persistent background worker on your own computer: it messages you over Telegram, executes real tasks (file operations, web browsing, code execution), and keeps working after you close the laptop. Here's the full setup, plus the security configuration that matters once an agent has that much access.
Level 1: Basic Installation
Hermes runs on Node.js, so install that first — either via the terminal or the pre-built installer for your OS from the Node.js website.
Once Node is installed, install Hermes itself, either through a desktop app or a single terminal command (the terminal route is worth learning even if you use the desktop app day-to-day, since it's what you'd use to deploy Hermes on a remote server later). Run the install command and let it pull down dependencies.
What you end up with is a background worker, not a chatbot tab — it stays running after you step away, and you interact with it by messaging it like you would a person.
Choosing a Model Provider
Next, pick the model that powers Hermes. Free options are available, but a paid subscription you likely already have — ChatGPT Plus, for instance — works well as a provider and avoids extra cost. To use it:
Select OpenAI, then OpenAI Codex, as the provider.
Hermes will prompt a login/reauthentication and give you a URL and a code.
Open the URL in a browser signed into your paid OpenAI account, enter the code there.
Paste the confirmation code back into the terminal.
Choose a default model.
At this point, typing hermes in the terminal starts a working chat session with your agent.
Setting Up Remote Access via Telegram
To reach the agent from anywhere (not just your desktop), configure a messaging gateway. Telegram is the simplest to set up, and manual setup is more reliable than the automatic QR-code flow:
In Telegram, message BotFather (verify it's the official, checkmarked account) and send
/newbot. Follow the prompts to get a bot token.Paste that token into the Hermes gateway configuration.
Message @userinfobot to get your own Telegram user ID.
Paste your user ID in as the allowed user — this restricts who can control the agent via this bot. Use the same ID for the home channel.
Restart the gateway when prompted, then message your bot.
If the bot doesn't respond on the first message, it may return a pairing code instead — run the pairing command in the terminal with that code to complete the handshake between Hermes and Telegram.
Locking Down the Agent
An agent with terminal, file, and browser access on your primary machine is a real attack surface, so the next step is auditing what it's actually allowed to do.
Hermes exposes its capabilities as tools (the actions it can take — controlling the computer, accessing email, browsing the web) and skills (instruction sets/manuals for specific tasks). Run:
hermes toolsto list all available and currently active tools, and disable anything you don't need.
The specific risk worth designing around is prompt injection: a malicious actor hides instructions in a web page, the agent reads the page while browsing, and mistakes those instructions for legitimate commands rather than page content. Since the web is the largest injection surface, the recommended split is:
If you need web search, scraping, or browser automation — disable terminal/process access, file operations, and code execution.
If you need terminal, file operations, and code execution — disable web search, scraping, and browser automation.
Combining broad web access with unrestricted local execution is where a successful injection does the most damage.
Audit skills the same way:
hermes skills listWork through the list and disable anything irrelevant to your use case.
Onboarding the Agent
Rather than configuring behavior piecemeal, send Hermes one comprehensive message covering who you are, what you do, your tools and workflow, and your preferences — communication style included (e.g., "concise, direct, no filler, explain what you're doing and why"). Hermes retains this as memory and refines its behavior over time as you correct it.
Notably, once configured, you can also delegate configuration changes conversationally — e.g., asking Hermes to disable a specific skill — and it will read its own documentation and make the change itself, without you touching the terminal again.
Splitting Work Across Profiles
A single agent with access to everything is a security liability, but restricting it to one narrow toolset limits its usefulness. Hermes resolves this with profiles: multiple independent instances under one installation, each with its own memory, tools, and skills.
Example profile split:
A general profile for broad, ad hoc tasks.
A content writer profile, scoped to a personal knowledge base and Twitter access, used to draft posts and newsletters.
A coaching profile, scoped to planning and tracking workouts, with no web or file access.
A monitoring profile, scoped to a Discord channel, pulling messages and surfacing daily summaries.
Each profile is isolated — the content profile can't touch the terminal, the coaching profile can't browse the web, and so on.
To create one, message the default profile:
create a new profile called demo-agentFrom there, either run through provider/gateway setup again for the new profile, or ask the existing agent to copy its settings over and then strip out the tools and skills you don't want it to have. You can point a dedicated Telegram bot at a specific profile, or have one bot switch between profiles.