agent-purge
One persona for every coding agent on your machine — swap or inject system prompts locally, with diff previews and one-click rollback.
- Source repo
- ZiChuanLan/agent-purge
- Stars
- ★ 2.1k
- Last updated
- today
- FARS reviewed
- Nov 15, 2026
- License
- MIT
- Primary language
- JavaScript
- FA score
- 67/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformCodex · Claude Code
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A solo developer running Codex, Claude Code and OpenCode side by side who wants one shared tone and language preference instead of three copies.
- Not a fit if
- Users who stick to a single coding agent and don't need shared personas
- Teams that refuse to let any tool rewrite host configuration files
- Anyone looking to bypass host authorisation or safety review
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-23+30.0 ★/day over 7 days
- Source review
- 67/100 · Some gaps
What does this agent do, and when should you use it?
agent-purge is a local prompt and persona orchestration console. It solves the duplication problem of maintaining the same working persona separately inside Codex, Claude Code, Pi, OpenCode, dsh, omp, Grok, zcode and other coding agents. You keep personas as Markdown files on disk; agent-purge delivers the body text into each host's system-prompt entry point while every host keeps its own model, tools and workflow. A CLI and a browser console share one persona library and one ledger; the console listens on http://127.0.0.1:7788 by default and falls back to ports 7890–7909 in a separate desktop window when that port is taken. Four handling modes (replace, strict, append, off) can follow a global setting or be overridden per tool, and takeover happens through four channel types — install, shim, slash and project — each with a different activation timing. Project rules are shared via AGENTS.md / CLAUDE.md / QWEN.md files with diff preview, SHA conflict detection and a byte-exact stash snapshot on every write. It ships under MIT with zero production dependencies and stores data in ~/.agent-purge/, but it needs Node.js 20+ and the target agents already installed.
It reads Markdown persona files under ~/.agent-purge/personas/ — the frontmatter id / name / description are management metadata, only the body reaches the prompt — and writes that body into the selected hosts' system-prompt entry points according to the active mode. agent-purge ls lists personas, use <id> switches and syncs the selected scope, use <id> --for codex targets a single host, use follow --for codex restores global following, and mode append changes the global strength. Persistent takeover runs through four channel types: install writes managed host config or a plugin, shim forwards launches via a same-named command on PATH, slash installs an in-session /purge extension, and project appends a rule block to AGENTS.md, CLAUDE.md, QWEN.md, CRUSH.md, .clinerules or .roorules in a chosen directory. arm <host> tries that host's persistent, command and slash channels and reports each result; status shows current state. For one-off use you can launch a host through the tool, with everything after -- passed straight to the host. Teardown is covered by pause / resume, uninstall <host>, disarm <host> and clean. The web console's settings page also configures WebDAV backup and window-close behaviour, and the repo ships an optional magpie-plugin/ gateway plugin.
- A solo developer running Codex, Claude Code and OpenCode side by side who wants one shared tone and language preference instead of three copies.
- Engineers whose per-repository conventions differ: append rule blocks into each project's AGENTS.md or CLAUDE.md so switching directories switches the rules.
- People experimenting with prompt wording who want a diff preview before committing and a stash snapshot to roll back if the result disappoints.
- Users who prefer clicking to memorising flags: open the local console and manage personas, tool switches and rule files from three pages.
- Debugging sessions that need a mid-conversation persona change: install the slash extension on Pi, omp, OpenCode or dsh, where the dynamic channel applies on the next turn.
- Teams routing traffic through the magpie gateway: install the optional plugin under magpie-plugin/ so rewriting happens at the gateway.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npm install -g agent-purgenpx agent-purge web
- Config files
~/.agent- Runtime
- Node.js 20+
- Install notes cover
- Windows · macOS · Linux · WSL
How do you install or deploy this agent?
You need Node.js 20+ and the coding agents you intend to manage already installed on the machine. Then install globally and start the console:
npm install -g agent-purge
agent-purge webIf you would rather not install globally, run it through npx:
npx agent-purge webOn SSH or WSL boxes without a desktop, start the server only:
agent-purge web --no-openPrebuilt packages also exist: a Windows setup.exe, portable exe and zip, a macOS .dmg, and Linux single-file binaries, .tar.gz, .deb and AppImage. The setup.exe, zip and .tar.gz expect an external Node.js 20+, while the standalone exe, dmg and Linux binaries bundle a runtime. Check the actual assets on GitHub Releases; unsigned builds may need an OS-level approval on first launch.
How do you use this agent?
Starting the console opens http://127.0.0.1:7788. Begin in the persona library — edit the starter template or create your own, or drop a Markdown file into ~/.agent-purge/personas/ by hand:
---
id: concise
name: Concise pairing
description: Chinese, conclusion first, read code before editing
---
Work in Simplified Chinese. Give the conclusion first, then the reasoning.
Read the existing implementation before changing code; say so when unsure.Then pick a persona and default strength on the console page, save, and flip the switch for each target tool. Finer control lives in the CLI:
agent-purge ls # list personas
agent-purge use concise # switch and sync the selected scope
agent-purge mode append # change the global mode
agent-purge use follow --for codex # make Codex follow the global persona again
agent-purge install codex # write Codex's managed config
agent-purge arm pi --slash # try Pi's persistent and slash channels
agent-purge project on pi --dir /path/to/project
agent-purge statusFor a one-off run without registering a persistent channel, launch the host through agent-purge; arguments after -- go to the host:
agent-purge codex --mode append
agent-purge pi --ask "explain this function"
agent-purge codex -- --helpAnd when you want out:
agent-purge pause # temporarily pause, personas kept
agent-purge resume # restore the previous scope
agent-purge disarm dsh # remove all selected channels for one host
agent-purge clean # remove every registered takeoverSafety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- rollback or recovery path
What are this agent's strengths and limitations?
- One persona library feeds both the CLI and the web console across Codex, Claude Code, Pi, OpenCode, dsh, omp, Grok, zcode and more, so you stop maintaining the same text per host.
- Per-tool overrides on top of the four replace / strict / append / off modes, and the UI only exposes channels and strengths that were actually verified per host instead of fake toggles.
- Reversibility is engineered: diff preview and SHA conflict detection before writing project rules, plus a byte-exact stash snapshot on every write that can be rolled back precisely.
- Local-first with zero production dependencies: data lives in ~/.agent-purge/ (overridable via AGENT_PURGE_HOME) and program upgrades never overwrite your personas.
- Honest about activation timing — dynamic per-turn channels on Pi, omp, OpenCode and dsh apply on the next turn, while static or launch-argument entry points explicitly need a new session.
- Broad packaging: npm, a Windows installer and portable exe, a macOS .dmg, and Linux binaries / .tar.gz / .deb / AppImage, with --no-open for headless environments.
- Requires Node.js 20+ and the target agent CLIs to be installed first; it manages entry points rather than replacing the hosts themselves.
- Hard capability limits are documented: Antigravity, Crush, Continue, Goose and zcode are append-only so the native identity remains, and Claude, Kilo and Qoder keep residual text that cannot be removed.
- Model behaviour after rewriting is not guaranteed, and strict does not mean the model only receives your persona; self-reported model identity is explicitly rejected as a test criterion.
- Activation is easy to misjudge — config written, historical tests passing and the current session actually applying it are three different states, and plugin updates usually require reloading the host.
- macOS is still pending real-hardware verification; the README only reports regressions on Windows and WSL/Linux, and the .dmg is neither signed nor notarised by Apple.
- The console only binds to 127.0.0.1, so sharing it across machines or with a team needs infrastructure you build yourself.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| agent-purge This agent | 67 · Some gaps | CLIFree | ★ 2.1k | today | JavaScript | Codex · Claude Code |
| Coven | 66 · Some gaps | CLIFree | ★ 76 | 1d ago | Rust | Codex · Claude Code |
| AGRO Sandbox Runtime | 76 · Good | CLIFree + model costs | ★ 43 | 6d ago | TypeScript | Codex · Claude Code |
| Most Capable Agent System Prompt | 48 · Major gaps | — | ★ 889 | 1d ago | — | ChatGPT · Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
least_privilege: Web binds to 127.0.0.1 only, data defaults to ~/.agent-purge/, no models or credentials bundled, but it rewrites host configs and project rule files, so moderate privilege, not full marks. user_confirmation: no auto-arming on first launch and pause/resume exist, but install/arm/project write actions lack a documented per-action confirmation flow, deducted. data_flow_transparency: README and pause-and-uninstall state persona text is sent upstream with host requests and update checks hit GitHub, good transparency. sensitive_data_handling: upgrades never overwrite user data and recovery conflicts preserve files/credentials, but no concrete credential/key handling policy, mid score. dependency_security: package.json has only pinned devDependencies, release-check pins action SHAs and uses --ignore-scripts, but no runtime dependency audit or SBOM, score 2. external_effects: rewrites host configs, PATH shims, project AGENTS.md/CLAUDE.md, clear side effects, but clean/disarm provide reversal, score 2. rollback: backends comments and restore.mjs references show hash-based rollback, stash backups, temporary plugin restore on exit, docs warn not to delete backups, thorough, score 3. source_attribution: README cites docs site and LINUX DO community, but per-harness behavioral conclusions lack itemized sourcing, score 1.
self_consistency: README, backends code and docs guides broadly agree on modes, channels and port fallback, but README.en and package.json harness lists differ slightly (hermes/zcode), score 2. dependency_availability: requires Node 20+, pinned devDependencies, release-check pins action SHAs, but no runtime dependency manifest or lockfile evidence in packet, score 2. failure_messages: docs mention explicit recovery-conflict reports and source-checkout refusals with reasons, but backends mostly carry residueHint comments with no unified error-message spec, score 1.
audience_and_scenarios: targets multi-harness users with CLI and Web entry points and single-shot/persistent/project scenarios, broad coverage. capability_boundaries: README explicitly states strict does not guarantee only the persona arrives, per-harness residue, append-only hosts keep native identity, boundaries well documented, score 3. trigger_precision: four modes and channel timing documented, but replace is approximate detection and some harnesses fall back to strict, limited precision, score 2. environment_fit: covers Windows/Linux/macOS install forms and headless, but macOS unverified on real hardware, score 2.
information_architecture: README sections clear and docs have guide/reference structure, but only part of files present, limited architecture evidence, score 2. install_notes: detailed install table with npm/installer/portable/binary/deb/AppImage and SHA verification guidance, score 3. naming_stability: package and command names stable, but version 0.2.x early and harness naming variants (opencode/opencode2, dsh), score 2. examples_and_faq: Quick Start and command examples present, no dedicated FAQ, score 2. known_limitations: compatibility docs, residue notes, macOS pending, command-line length limits well recorded, score 3. license: full MIT text present and consistent with package.json, score 3. versioning_changelog: version number present but no CHANGELOG, score 1. maintenance_responsibility: publisher unverified, no maintainer responsibility or governance statement, score 1.
output_usability: CLI and Web console, status query and undo commands present, decent usability, but no executed verification, score 2. marginal_value: unified multi-persona injection has real value for multi-harness users, but similar prompt-injection tools exist, moderate incremental value, score 2. cost_benefit: local with zero production dependencies and light install, but requires understanding per-harness residue and mode differences, moderate learning cost, score 2.
claim_traceability: README points to docs site and compatibility docs, but key conclusions (measured purge, residue sizes) lack raw evidence in packet, score 2. cross_source_corroboration: README, docs guides and backends code corroborate modes and channels, score 2. fact_inference_separation: docs distinguish measured vs inferred (strict not guaranteed, approximate detection), but some compatibility/performance conclusions lack evidence labels, score 2.
- The tool rewrites host configs, PATH shims and project AGENTS.md/CLAUDE.md; confirm the target environment and keep backups before use.
- strict/replace modes do not guarantee only the persona reaches the model; host identity residue may remain, so validate with append for critical tasks.
- Publisher identity is unverified by FollowAgents; maintenance responsibility and update path are unclear, verify SHA-256 and signature status before upgrading.
- macOS is not yet verified on real hardware, so cross-platform behavior is uncertain.
- No CHANGELOG and no runtime dependency audit, limiting long-term maintenance and supply-chain transparency.
FAQ
Is agent-purge free?
Is agent-purge open source?
Is agent-purge safe to use?
Is agent-purge still maintained?
Who makes agent-purge?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.