# How to Give Hermes Agent a Persistent Browser Identity with Camofox
**作者**: Neo
**日期**: 2026-04-21T09:08:20.000Z
**来源**: [https://x.com/NeoAIForecast/status/2046516373984317735](https://x.com/NeoAIForecast/status/2046516373984317735)
---

Most agent browser demos break the moment a login session matters.
You sign in once, the task ends, and the next run starts from scratch. That is fine for toy browsing. It is terrible for real workflows.
Hermes has a much better path: you can run it against Camofox, a self-hosted anti-detection browser backend, and configure persistent browser sessions so cookies and logins survive across agent runs.
That turns browser automation from “stateless demo mode” into something much closer to a reusable operator workflow.
Takeaway: persistent browser identity is the difference between agent browsing as a trick and agent browsing as infrastructure.
## Why this matters in Hermes
Hermes supports several browser backends:
- Browserbase
- Browser Use
- Firecrawl
- Local Chromium via agent-browser
- Local Chrome via CDP
- Camofox for local anti-detection browsing
Camofox is particularly interesting because it gives Hermes a self-hosted browser path with stronger stealth characteristics than a basic local browser, while still fitting into the same Hermes browser toolset.
But the real unlock is not just “Hermes supports Camofox.”
The real unlock is that Hermes can be configured so the browser identity becomes stable across sessions.
That means:
- Cookies can persist
- Logins can persist
- Repeated agent tasks do not always start from zero
- Different Hermes profiles can keep different browser identities
That last part is especially good.
Takeaway: the browser layer gets much more useful when it inherits the same long-lived profile logic as the rest of Hermes.
## What Camofox is doing here
Camofox is a self-hosted Node.js server that wraps Camoufox, a Firefox fork with fingerprint spoofing.
In practical terms, that means:
- You run the browser service yourself
- Hermes routes browser tasks through it
- The browsing environment can behave more like a durable operator browser than a disposable cloud session
This is a very different story from “agent launches a fresh anonymous browser every time.”
It is also useful if you want:
- Local control
- No cloud browser dependency
- Anti-detection browsing
- Profile-scoped persistence
Takeaway: Camofox is Hermes’s local anti-detection browser backend, not just another generic browser integration.
## Step 1: Run the Camofox server
There are two simple paths.
Local install
Docker
Then point Hermes at it in ~/.hermes/.env:
Or configure it through:


Once CAMOFOX_URL is set, Hermes routes browser tools through Camofox instead of Browserbase or local agent-browser.
That part is straightforward.
Takeaway: The Camofox integration starts with one server URL, but the real value comes from what you do next.
## Step 2: Enable persistent sessions
This is the most important part of the tutorial. By default, Camofox sessions are ephemeral.
That means each session gets a random identity, and cookies/logins do not survive.
To enable persistent browser sessions, add this to ~/.hermes/config.yaml:
And then fully restart Hermes.
> NOTE! If you put the flag at the wrong path, Hermes silently falls back to ephemeral sessions and your login state keeps disappearing.
That is exactly the kind of configuration bug that wastes hours.
Takeaway: If managed_persistence is not nested under browser.camofox, Hermes will ignore it and your sessions will still reset.
What Hermes actually does
This is where it gets more interesting than a normal setup guide.
When persistent mode is enabled, Hermes does three important things:
Sends a deterministic profile-scoped userId to Camofox
Skips server-side context destruction on cleanup
Scopes that identity to the active Hermes profile
That third point is a big deal.
It means if you have multiple Hermes profiles, each one can map to a different persistent browser identity.
So you can have:
- One profile for research browsing
- One profile for work automation
- One profile for personal browsing tasks
…and keep those browser identities separated the same way Hermes separates memory, sessions, and config.
Takeaway: Persistent Camofox sessions inherit Hermes’s profile model, which makes browser identity part of the broader agent architecture.
What Hermes does *not* do
Hermes does not force persistence on the Camofox server by magic.
Hermes only sends a stable userId.
The Camofox server itself must actually honor that userId by mapping it to a persistent Firefox profile directory.
So if your Camofox build treats every request as disposable, Hermes cannot fix that from its side. That is an important distinction because a lot of people will assume:
> “I turned on persistence in Hermes, so persistence is guaranteed.”
Not necessarily. The server has to support it correctly.
Takeaway: Hermes can provide a stable browser identity handle, but the Camofox server must implement real profile persistence for it to work.
## Step 3: Verify it actually works
The test flow is:
Start Hermes and your Camofox server
Open a login site such as Google
Sign in manually
End the browser task normally
Start a new browser task
Open the same site again
If persistence is working, you should still be signed in.
If you are logged out, the likely causes are:
- managed_persistence is at the wrong config path
- Hermes was not fully restarted
- the Camofox server is not honoring stable per-user profiles
- your server build is effectively still ephemeral
That troubleshooting path is exactly why this article is useful: it saves people from thinking “Hermes persistence is broken” when the problem is often in the backend behavior or config nesting.
Takeaway: The real test for persistent browser identity is not config presence it is whether login state survives a fresh browser task.
## Where the state lives
Hermes derives the stable userId from a profile-scoped directory like:
Or the equivalent under "$HERMES_HOME" for non-default profiles.
But the actual browser profile data lives on the Camofox server side, keyed by that userId.
That means if you want to fully reset a persistent browser profile, you may need to:
- clear it on the Camofox server
- remove the corresponding Hermes profile state directory
This is another place people can get confused. Deleting one local file is not necessarily enough if the server still holds the browser profile state.
Takeaway: Hermes owns the stable identity handle; the Camofox server owns the actual persisted browser profile.
## Why this is more interesting than cloud browser sessions
Cloud browser backends are useful. But persistent local Camofox sessions are interesting for a different reason.
They let Hermes operate more like a durable browser operator.
That matters when your workflow depends on:
- existing login state
- cookies
- repeat visits to the same service
- anti-detection browsing
- long-lived identity separation across profiles
That is much closer to how human operators use browsers and it fits the broader Hermes story extremely well: durable state, profile isolation, reusable workflows, and less repeated setup.
Takeaway: Camofox persistence makes Hermes browsing feel much more like an ongoing environment than a disposable task sandbox.
## Bonus: VNC live view
There is another good feature in the browser
When Camofox runs in headed mode, it can expose a VNC port in its health check response.
Hermes can discover that automatically and include the VNC URL in navigation responses, so you can watch the browser live.
That is a nice advanced operator feature because it gives you:
- Observability
- Easier debugging
- A better human-in-the-loop path for complex browsing tasks
This is especially useful when the browser is logged into a real account and you want visibility into what the agent is doing.
Takeaway: Headed Camofox plus VNC turns Hermes browser automation into something you can supervise, not just trust blindly.
## When to use this setup
This setup is a strong fit if you want Hermes to handle workflows like:
- Repeated logins to the same sites
- Anti-detection browsing without cloud dependency
- Profile-separated browser identities
- Local operator control over browser state
- Browser tasks that should feel continuous across sessions
It is less necessary if all you want is:
- Occasional stateless browsing
- Quick scraping
- One-off page interaction
- Zero interest in preserving login state
In that case, the simpler browser backends may be enough.
Takeaway: Persistent Camofox mode is for browser workflows with continuity, not just isolated page interactions.
## Common failure modes
1. Wrong config path
This is the big one.
Use:
Not:
2. No full restart
Editing config without restarting Hermes can leave you testing old behavior.
3. Backend mismatch
Hermes is sending a stable userId, but your Camofox server may still be creating ephemeral contexts.
4. Expecting Hermes profiles to be security sandboxes
They are state boundaries, not filesystem sandboxes.
What they do give you here is browser identity separation, which is exactly the useful thing.
Takeaway: Most persistence bugs in this setup come from config path errors or backend assumptions, not from the Hermes browser toolset itself.
## Conclusion
Most browser-agent tutorials stop at navigation and screenshots.
The more important question is whether the browser environment can persist in a useful way.
With Camofox, Hermes has a path to that.
You can run a self-hosted anti-detection browser backend, route Hermes through it, and configure persistent sessions so login state survives across agent runs with browser identity scoped to Hermes profiles.
That is a much more serious pattern than stateless browser demos.
Takeaway: Persistent Camofox sessions are one of the clearest ways to turn Hermes browser automation into long-lived infrastructure.
## 相关链接
- [Neo](https://x.com/NeoAIForecast)
- [@NeoAIForecast](https://x.com/NeoAIForecast)
- [859](https://x.com/NeoAIForecast/status/2046516373984317735/analytics)
- [Upgrade to Premium](https://x.com/i/premium_sign_up)
- [5:08 PM · Apr 21, 2026](https://x.com/NeoAIForecast/status/2046516373984317735)
- [859 Views](https://x.com/NeoAIForecast/status/2046516373984317735/analytics)
---
*导出时间: 2026/4/21 18:58:26*