█

AI/TLDR

Buy me a coffee
Buy me a coffee

agent-purge

One persona file, injected into the system prompt of every coding agent you run

Coding-Agent Harnesses & RuntimesOpen source
Language
JavaScript
License
MIT
$npm install -g agent-purge
IN SHORT

What is agent-purge?

agent-purge is One persona file, injected into the system prompt of every coding agent you run. It sits in the Coding-Agent Harnesses & Runtimes category of the AI Coding tools and is open-source, written in JavaScript and licensed MIT. To get started: install and open the console.

Overview

The same agent-purge console in its narrow-screen layout, with the persona, mode options and agent toggles stacked in one column.
The narrow-screen layout of the console.agent-purge README ↗

Every coding agent ships with its own system prompt — its identity line, its tone, its house rules — and each one keeps it in a different place: a config file, a plugin hook, a launch flag, a project rule file. agent-purge is a local prompt-configuration tool that puts one persona in front of all of them. You write the persona once as a Markdown file, pick how it should be applied, and switch on the agents it should govern; each agent keeps its own tools, models and workflow.

There are four injection modes. `replace`, the default, swaps the host's identity lines and tries to keep its other instructions; `strict` replaces the controllable host prompt with the persona text; `append` leaves the host prompt alone and adds the persona alongside it; `off` stops injection. The README is explicit that `strict` does not guarantee the model sees only your persona — depending on the agent and the channel, the text may land in the `system` or `developer` role or in project context, and the host can still add wrapper prompts of its own.

How the persona reaches an agent depends on the channel: `install` writes managed configs, plugins or identity files; `shim` puts a forwarding command first on the PATH; `slash` registers an in-session `/purge` command; `project` writes a managed block into `AGENTS.md` or `CLAUDE.md`. Every write is recorded in a ledger with backups, so `agent-purge clean` can restore the original configuration. The README lists verified versions for pi / omp, OpenCode, DeepSeek Harness, Codex, Claude Code, CodeBuddy, Grok, Kilo Code and WorkBuddy, with hot-switching between turns verified on the agents that expose a per-turn callback. It runs on Node.js 20+, stores data under `~/.agent-purge/`, and its web console listens only on `127.0.0.1`.

What it does

  • One Markdown persona applied across Codex, Claude Code, OpenCode, pi, DeepSeek Harness, Kilo Code, Grok, CodeBuddy and WorkBuddy
  • Four injection modes — replace, strict, append and off — set globally or per agent
  • Four delivery channels: managed config install, PATH shim, an in-session /purge slash command and project rule files
  • A local web console on 127.0.0.1:7788 with a persona library, per-agent toggles and diagnostics, sharing state with the CLI
  • A ledger of every managed write with backups, plus pause, disarm, uninstall and clean commands that restore the original files
  • Distributed on npm and as Windows installer, zip and standalone executable builds

Getting started

agent-purge needs Node.js 20+ and the coding agents you want it to manage already installed. These steps follow the project README.

Install and open the console

Install the npm package globally and start the web console, or run it once with `npx agent-purge web`. On a headless machine (SSH, WSL) add `--no-open`.

bashbash
npm install -g agent-purge
agent-purge web
The agent-purge web console with the persona and mode picker, the three injection modes and toggles for the Claude, Codex and pi agents.
The console: pick a persona, choose how it is injected, then switch on the agents it should govern.agent-purge README ↗

Write a persona

A first run creates a `neutral` starter template you can edit in the Persona Library. To write one by hand, save a Markdown file under `~/.agent-purge/personas/`; only the body goes into the prompt, the front matter is for management. The example below is the README's own, translated from Chinese.

markdownmarkdown
---
id: concise
name: Concise collaborator
description: Conclusion first, read the code before editing
---

Give the conclusion first, then the reasoning.
Read the existing implementation before changing code; say so when unsure.

Choose the persona and mode

Switch the active persona and the global mode from the CLI, or give one agent its own setting.

bashbash
agent-purge ls
agent-purge use concise
agent-purge mode append
agent-purge use concise --for codex

Try it on a single run

To test without registering anything persistent, launch an agent through agent-purge; arguments after `--` go to the host agent.

bashbash
agent-purge codex --mode append
agent-purge pi --ask "Explain this repository"

Arm agents persistently

Enable the channels you want, then start a new session or reload the plugin as each agent's status line says.

bashbash
agent-purge install codex
agent-purge arm pi --slash
agent-purge project on pi --dir /path/to/project
agent-purge status

Pause or undo

Pause every channel without losing personas, or remove the managed hooks before uninstalling the package.

bashbash
agent-purge pause
agent-purge resume
agent-purge clean
npm uninstall -g agent-purge

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when you switch between several coding agents and want the same language, tone and working rules in all of them
  • Reach for it when you want to test how a different identity or instruction block changes an agent's behaviour, then roll it back cleanly
  • Reach for it when you maintain a team persona and want it written into AGENTS.md or CLAUDE.md as a managed, removable block

How agent-purge compares

agent-purge alongside other open-source coding-agent harnesses & runtimes tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
CC Switch★ 158kA cross-platform desktop app that manages provider configuration for eight coding-agent CLIs from one place, with a local failover proxy, MCP and skill management, and spend tracking.
Oh My OpenAgent★ 71.2kOpinionated agent bundle for OpenCode and Codex CLI that ships preconfigured sub-agents, lifecycle hooks and built-in MCP servers behind a single ultrawork command.
herdr★ 53.7kA single-binary terminal multiplexer built for coding agents: persistent sessions across local and SSH machines, per-pane working/blocked/idle status, and a socket API agents drive themselves.
oh-my-claudecode★ 41.1kA plugin and CLI that adds multi-agent orchestration to Claude Code: staged autopilot workflows, parallel tmux workers, and advisors that route a second opinion to Codex, Gemini, Grok or Cursor.
DSH Go★ 35.2kA native Android client for DeepSeek Harness that runs the agent on the phone in a built-in Linux environment or drives DSH on your computer or server over SSH, with plugins and phone control.
AionUi★ 34.6kAn open-source desktop workspace that pairs a built-in agent engine with dozens of external CLI agents, adding scheduled runs, MCP tools and remote access from a WebUI or chat apps.
cc-connect★ 16.5kA Go daemon that bridges local coding agents — Claude Code, Codex, Cursor Agent, Gemini CLI, OpenCode, Kimi CLI and more — to Feishu, DingTalk, Slack, Telegram, Discord, LINE and WeCom, so you drive them from chat.
agent-purge★ 2.3kOne persona file, injected into the system prompt of every coding agent you run