Hermes Agent Background: Keep Your Agent Running

Julian Goldie — founder, AI Profit Boardroom
By Julian Goldie · 7 min read
Get The AI Profit Stack Join AIPB →
🎯 1,000+ done-for-you AI agent workflows 📅 4 live coaching calls every week 🛡️ 7-day refund + 30-day ROI guarantee 👥 3,400+ AI operators inside

To run hermes agent background work, type /bg followed by your prompt. Hermes spins up a separate agent session that works on it while your main chat stays free, then hands you the result when it's done.

📺 Watch: Hermes + Claude + Codex - The AI System That Does EVERYTHING!

🔥 Get the Agent OS as a free bonus: AI Profit Boardroom members get the full Agent OS zip, prompt libraries, daily tutorials and weekly live coaching calls. → Get inside

That's the headline. But "background" in Hermes covers four things: background sessions, background processes, subagents, and cron jobs that run while you're not looking. Plus the gateway service that keeps all of it alive. I'll take each in turn, using only what the Hermes docs say.

Hermes Agent is the open-source, self-hosted agent from Nous Research, MIT licensed, with persistent memory and self-written skills. I run it daily inside my own Agentic Operating System, and background work is where most of the time savings come from.

Background sessions with /bg

In the CLI, you type something like /bg Analyze the logs in /var/log and summarize any errors from today. Hermes confirms straight away, gives you a task ID (the docs show one like bg_143022_a1b2c3), and hands you your prompt back.

Per the Hermes docs, each /bg prompt spawns a completely separate agent session in a daemon thread:

When a task finishes, the result shows up as a panel in your terminal. If it fails, you get an error notification. If display.bell_on_complete is on in your config, the terminal bell rings when it's done.

One thing to know: background sessions don't appear in your main conversation history. They're standalone sessions with their own task ID.

If you want to learn how to structure this kind of work properly, the AI Profit Boardroom ($69/mo) has Hermes courses, my Agent OS zip, daily updates and four coaching calls a week.

Background sessions from Telegram, Discord and Slack

/bg works in messaging apps too. Per the docs, the background agent inherits your model, provider, toolsets, reasoning settings and provider routing from the gateway setup. When it's done, the result goes back to the same chat or channel, prefixed with "Background task complete". If it fails, you see "Background task failed" with the error.

The docs call these fire-and-forget. You don't need to wait or check. Their example uses include server monitoring, long builds, competitor research and organizing files.

Background process management

This is different from /bg. A background process is a long-running command the agent starts, like a test run, a build or a server, using terminal with background set to true. It returns a session ID and a PID.

The agent then manages it with the process tool. Per the Hermes docs, the actions are:

ActionWhat it does
listShow all running processes
pollCheck status
waitBlock until done
logFull output
killTerminate
writeSend input

PTY mode lets interactive CLI tools like Codex and Claude Code run this way.

Finished commands keep their exit status and output. Hermes keeps the newest 64 completed results for up to 7 days after completion, under logs/process-results/ in the profile's Hermes home. Each receipt holds at most a 200,000-character output tail, with secret redaction always applied. The docs are clear that this saves work that finished. It doesn't keep unfinished processes alive after a timeout or crash.

Controlling process notifications

On messaging apps, you choose how chatty these updates are with display.background_process_notifications in ~/.hermes/config.yaml:

You can also set it with the HERMES_BACKGROUND_NOTIFICATIONS environment variable.

📺 Watch: Hermes3D Is INSANE: AI Agents Now Have a 3D Office

Background subagents

The delegate_task tool spawns child agents with isolated context, inherited tool access and their own terminal sessions. Only each child's final summary goes back into the parent's context.

Per the Hermes docs, top-level model calls run in the background automatically. Hermes returns a handle straight away so the conversation can continue, then posts the result back as a new message. You can run up to 10 concurrent subagents by default, and that's configurable.

One rule to remember: background processes belong to the agent that starts them. When a child finishes, its remaining processes are shut down. So if a server or watcher needs to keep running after the child is done, start it in the parent session.

Which tools you give these agents matters a lot. My best Hermes Agent tools list covers the ones worth switching on.

📺 Watch: Hermes AI Agents Just Went Portable

Cron jobs: hermes agent background work on a schedule

Cron is how you get Hermes doing jobs in the background while you sleep. Per the docs, you can schedule one-shot or recurring tasks in plain language or cron expressions, attach skills, and deliver results back to a chat, local files or other platform targets.

The key detail: cron execution is handled by the gateway. The gateway ticks the scheduler every 60 seconds and runs due jobs in isolated agent sessions. No gateway, no cron.

You can just ask Hermes to create, pause, edit or remove jobs. Or use the CLI:

Need to stop everything at once? hermes pause is the global emergency stop, and hermes resume lifts it. Runs already in progress aren't killed, and due work catches up after you resume.

If hermes cron status shows a job as overdue, the docs say that's the sign of a scheduler that stopped ticking. Restart the gateway with hermes gateway restart, or run the job now with hermes cron run.

The Agent OS guide shows how I organize scheduled jobs across different agents.

How to check and stop background work

Here's the quick reference, all from the Hermes docs:

TypeHow to check itHow to stop it
/bg sessionResult panel or chat message when doneFire-and-forget; results arrive automatically
Background processprocess list, poll or logprocess kill
Cron jobhermes cron list, hermes cron statushermes cron pause or remove; hermes pause for everything
Gatewayhermes gateway statushermes gateway stop

Keeping the gateway running in the background

Your bots and cron jobs only work while the gateway is up. Per the docs, hermes gateway install sets it up as a user service on Linux (systemd) or a launchd service on macOS.

Linux (systemd)

The docs say to use the user service on laptops and dev boxes, and the system service on a VPS or headless host that should come back at boot. For a headless VM you never log into, a user service plus linger gives you start-at-boot with no root needed, so hermes update can restart the gateway without sudo.

Prefer hermes gateway restart over a raw systemctl restart when in-flight agent turns matter, because it drains first and waits for the replacement.

macOS (launchd)

Same commands: hermes gateway install, start, stop and status. Logs are at ~/.hermes/logs/gateway.log, and the plist lives at ~/Library/LaunchAgents/ai.hermes.gateway.plist. Per the docs, if you install new tools after setting up the gateway, run hermes gateway install again to capture the updated PATH.

If you haven't installed Hermes yet, start with my Hermes Agent installation guide. And if you want it running 24/7 without your laptop open, see my pick of the best Hermes VPS options.

Choosing a model that handles long background jobs well is worth testing first. I score models on real agent work in Goldie Bench.

Want a plan for what to automate first? Book a free AI strategy session.

FAQ

How do I run a Hermes task in the background?

Type /bg followed by your prompt. Per the Hermes docs, it spawns a separate agent session with your same model and toolsets, and the result comes back to your terminal or the same chat when it finishes.

Does a background session know about my current chat?

No. The docs say the background agent has no knowledge of your current session's history and only receives the prompt you provide. Put everything it needs in that prompt.

Why aren't my cron jobs running?

Cron runs inside the gateway, so check hermes gateway status and hermes cron status. If a job shows as overdue, restart with hermes gateway restart. Also check you haven't left hermes pause switched on.

How do I keep Hermes running after I close my laptop?

Install the gateway as a service with hermes gateway install. On a Linux server, enable linger or use the --system service so it starts at boot. For true always-on, run it on a VPS.

Ready to put your agent to work while you're offline? Join the AI Profit Boardroom for the Hermes courses, or book a free AI strategy session. Get one hermes agent background job running tonight and see what's waiting for you in the morning.

What members say about the AI Profit Boardroom

Read all 114 reviews on Skool →

★ 4.9 out of 5 from 114 member reviews on Skool

Yosuke Sato, AI Profit Boardroom member review (5 stars, paying member for 17 months): The best Skool course you get for AI! I have attended a few Skool courses before, but AI Profit Boardroom is the most active community and has great support from the management team, including Julian! You can get the most up-to-date information and practical implementations in this community. I highly recommend this!Mazzie T, AI Profit Boardroom member review (5 stars, paying member for 10 months): My mind is blown everyday with all the content and the incredible information. So much support and I love the personalised attention and quick responses. The community is great and people are very responsive and helpful.Rene Clayton, AI Profit Boardroom member review (5 stars, paying member for 9 months): The AI Profit Boardroom is a GAME CHANGER people. I could not be more thrilled that I joined!! So much support, more information than you can even consume, a huge value for what the small fee was. I have grown my business, my knowledge and my FUN!. SUCH a fantastic leader and group of humans. I am incredibly honored to be a part of this fantastic group of intelligent humans :-) THANK YOU!Arpiet Malpani, AI Profit Boardroom member review (5 stars, paying member for 8 months): Incredible learning from Julian and team. I started out in march and was able to build end to end SAAS with the help and learning from this group. I am incredibly thankful to Julian for crazy support and prompt response.James Grimm, AI Profit Boardroom member review (5 stars, paying member for 7 months): I asked Julian for help finding local business websites with little to no traffic. Julian was gracious in providing me my personal "how-to" video instruction. Wow, this is the pinnacle of customer service! I am just one of 3,400 subscribers and Julian took the time to help me personally. Thank you Julian for your assistance and outstanding custoemr support and care. James (Jim) GrimmNick Good, AI Profit Boardroom member review (5 stars, paying member for 4 months): I’m part of many AI groups and hands down, what Julian Goldie, has built here…the classroom trainings are amazing, but the community he has created is second to none (the community is worth the cost of joining!). If you’re looking to become the AI expert and build/create something meaningful, then AI Profit Boardroom is for YOU!Steven Gray, AI Profit Boardroom member review (5 stars, paying member for 4 months): Been in awhile. I’m a dad on a factory shift, not a tech bloke. Julian’s lot showed me how to use AI without drowning in tools. Avatar, voice, the workflow thinking — that’s what I needed. If you’re stuck on “where do I start,” this group’s worth it. I always read them.Steve Erickson, AI Profit Boardroom member review (5 stars, paying member for 4 months): I asked Julian a simple question, and he ended up creating a 10-minute video and a guide breaking down in extreme detail what I had asked. Amazing response!Rod Martin, AI Profit Boardroom member review (5 stars, paying member for 3 months): Julian is brilliant, and more prolific than I can keep up with (which is a great thing). His AgentOS is remarkable, and he is THE go-to guy for what you can really do (and not do) with the ever-increasing deluge of new AI upgrades and tools. HIGHLY recommend.Daniel Shulman, AI Profit Boardroom member review (5 stars, paying member for 4 months): Julian is very helpful. He doesn't try sell stuff you dont need and will give you a straight answer to your questions.Rj Herzog, AI Profit Boardroom member review (5 stars, paying member for 5 months): Top notch. If you are searching & searching thinking there is always something better out there.... You just found it. No need to look any further. Goldie covers it all & is super helpful. Can't beat the group either. Really can't recommend this group enough.Jermey Matthews, AI Profit Boardroom member review (5 stars, paying member for 6 months): While he has the capacity to do it, Julian is definitely doing the unscalable things to support his community.

Ready To Join The #1 AI Community?

Join 3,400+ entrepreneurs inside the AI Profit Boardroom. Get the Agent OS, 1,000+ plug-and-play AI agent workflows, daily Q&A with Julian and 4 live coaching calls every week.

Join The AI Profit Boardroom →

7-Day No-Questions Refund • 30-Day ROI Guarantee

← Back to all posts