The idea
AI agents are often used to read built web code: to find APIs, understand logic or copy an interface. Even minified code stays fairly readable to a language model, because names, strings and structure still carry some meaning.
agent-poisoner goes the other way. It renames identifiers from an adversarial vocabulary, turns numbers into arithmetic expressions, and puts sentences into function names and comments. The goal is to make reading by an agent costly and error prone.

What is in the toolkit
The GitHub repo is a monorepo with three npm packages:
- @7one/agent-poisoner-core: the core, independent of any build tool.
- @7one/vite-agent-poisoner: the Vite plugin, which calls the core during vite build.
- @7one/agent-poisoner-vocabulary: the default vocabulary file.
Who might need it
Use it only if you have a clear reason not to let agents read your build easily. For example:
- A web product team that wants to make automated copying of browser-side logic harder.
- Someone running an experiment on how agents react to scrambled code.
- A researcher who needs test data for AI code analysis tools.
What it is not
This is obfuscation, not security. There is no encryption here: the browser must still run the code, so a patient reader can still follow it. Secrets, API keys and sensitive data must never sit in browser code, obfuscated or not.
We also do not promise that any given agent will fail. Results depend on the model, and models change all the time.
Obfuscation also makes your own debugging of the build harder. See the cost section in how it works.
Getting started
You need Node 24 or later. In a Vite project you add one plugin to the config. The steps are in the setup guide. The repo is MIT licensed, at https://github.com/71zone/agent-poisoner.