# Agent Janitor: Hermes Agent plugin

> Process hygiene for agent machines — finds the background processes your agent left behind (dev servers, tunnels, watchers, nohup jobs) using evidence signals (ppid=1 reparent, port listener via /proc/net/tcp{,6}…

Canonical: https://hermeswatcher.com/plugins/agent-janitor  
Tier: Community  
Official page (Nous Research): https://hermes-agent.nousresearch.com/docs/plugins/agent-janitor  
Last updated in catalog: 2026-10-13

Process hygiene for agent machines — finds the background processes your agent left behind (dev servers, tunnels, watchers, nohup jobs) using evidence signals (ppid=1 reparent, port listener via /proc/net/tcp{,6}, dev-server traits, TTL exceeded) and attributes them to the originating tool call via agent-ledger's ledger when present. Dry-run by default: nothing is killed until you write policy_mode=enforce; system daemons and host/VM management agents are exempt by name, a user-editable whitelist covers your real infrastructure, and each kill re-reads the cmdline first (SIGTERM, 2s, SIGKILL with PID-reuse check). stdlib-only, fails open.

## Good to know before installing

Inside Hermes it only appends terminal commands that look like they start background work (first 300 characters, which can include inline secrets) to plugin-data/agent-janitor/spawns.jsonl, and reads agent-ledger's ledger.db read-only when present. Killing is a separate CLI you run yourself (janitor_cli.py sweep): after you write "enforce" to plugin-data/agent-janitor/policy_mode it sends SIGTERM then SIGKILL to every process re-parented to PID 1 for over a minute that is not on its built-in exempt list or your whitelist, whoever started it (for example a tmux server or a nohup'd hermes gateway), including other users' processes when run as root. Dry-run first; the dry-run list is the kill list.

From the plugin's catalog listing.

## How to install

1. Install it. Hermes asks for any API keys it needs, then asks whether to turn it on.

```bash
hermes plugins install agent-janitor
```

2. Said no? Turn it on later:

```bash
hermes plugins enable agent-janitor
```

3. Restart Hermes so it loads the plugin.

Some plugins also need a sign-in or settings: see the official page. Memory plugins ask whether to become your memory provider instead. Steps follow the official plugins guide: https://hermes-agent.nousresearch.com/docs/user-guide/features/plugins

## Facts

- Category: Cost, speed & monitoring
- Maintained by: ZidoCode (Community)
- Needs: No API keys declared
- Requires Hermes: `>=0.21.6`
- Version: 0.3.1
- In the catalog since: 2026-10-13

## Links

- [Full setup and settings (official page)](https://hermes-agent.nousresearch.com/docs/plugins/agent-janitor)
- [Source code](https://github.com/ZidoCode/agent-janitor#readme)
- [All plugins](https://hermeswatcher.com/plugins.md)

---

HermesWatcher is an independent guide. It is not affiliated with or endorsed by Nous Research. The [official Hermes Agent documentation](https://hermes-agent.nousresearch.com/docs) and [repository](https://github.com/NousResearch/hermes-agent) from Nous Research are the authority; each page here lists the official sources it was written from. If this site and the official docs disagree, trust the official docs. Index for agents: https://hermeswatcher.com/llms.txt
