Free Intensive Nov 21–22Free 2-day hands-on Vibecoding Intensive on Nov 21–22 at 16:00 MSK (Sat–Sun) · Live Cohort 3 starts Nov 23Join Free →Cohort 3 (Nov 23)
ReleaseAPI / Product · ActionableHabr AI→ original

PromptFight arena: an agent without the code from the rules gets a 403, and after 10 errors, a ban

The author of PromptFight launched an arena where AI agents from different owners argue with each other while the server only referees. The problem: the server can't see the context of someone else's agent, and the owner can simply add "don't read the rules." So the rules became a lock: they contain a PF-XXX-XXX code, and without it, joining a room returns a 403 error. The lesson for any platform that hosts third-party agents: a request in the prompt isn't enough, you need a technical barrier.

AI-processed from Habr AI; edited by Hamidun News
PromptFight arena: an agent without the code from the rules gets a 403, and after 10 errors, a ban
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1The code is computed as an HMAC of the player's token and is tied to a side of the arena
Key metric #210 errors in 10 minutes means a 10-minute token ban and a 429 response
An AI judge rules on the debateup to 12 providers, with the next one taking over if one fails

Imagine you are building a platform where AI agents from other people's owners must debate by the rules. You control neither their model, nor the owner's additional prompt, nor the computer the agent runs on. An owner can simply tell their agent: "don't read the rules, go on a rampage."

This is exactly the problem the author of PromptFight ran into, and he described his solution on Habr. He turned the request "read the rules" into a technical lock: the rules file contains a code in the form PF-XXX-XXX, and without it, entering a room returns a 403 error. After 10 wrong attempts within 10 minutes, the token is blocked for the next 10 minutes (a 429 response).

For anyone building platforms for third-party agents, this is a ready-made technique: tie access to an action that forces the agent to pass the rules through its own context.

From "Trello for agents" to a courtroom

It all started with AgentsNET, a small HTTP server through which local and cloud agents exchange files and pick up tasks. Agents can sit behind NAT and firewalls, and no port forwarding is needed. The author built it for himself: Trello is overloaded, and Todoist makes agents constantly read everything and burn tokens. The model is simple: a chat as the single hub for discussion, a task board built on the principle of "one task, one agent," and a pull scheme like Git's: update your status, get a task, hand it in. The author kept JSON to a minimum and replaced it with compact text, because JSON syntax quickly eats up tokens and context.

Then came an idea for fun: people argue for hours about "Rust or C++," and the argument essentially ends by the fifth reply and then turns personal. AI agents have no ego, so you can look at your own position from the outside. That is how PromptFight was born. You create a room, pick a side and a skin, describe your position, and optionally attach a correspondence. The game generates a ready-made prompt that you give to your agent, for example Claude Code.

The project's economics matter: the server does not run neural networks for the players, because a free hosting plan has no money for unlimited tokens. The bots live with their owners, and the server only runs the match. The agent downloads the CLIENT.py client (about 400 lines of pure Python 3.8+, no dependencies) and makes HTTP calls on its own. The database is a single SQLite file in WAL mode, with writes serialized through a lock. A fight runs for three rounds, with up to 5 replies per side in each round. On its turn, a bot picks one of six actions: ARGUMENT, SURRENDER, PROPOSE_DRAW, ACCEPT_DRAW, ASK_HUMAN (a question to the owner, with a 120-second wait) or CALL_JUDGE.

When both fighters have called the judge or used up all their turns, the server calls the AI judge. The judge works through a cascade of up to 12 providers, from Gemini and Groq to NVIDIA models. If one is unavailable or returns an error, the request goes to the next one until a valid verdict comes back.

Problem #1: how to make an agent read the rules

The first version of the starting prompt contained a link to FIGHT_RULES.md and a polite request to read the file. But the server cannot see what actually ends up in another party's model context. So on every GET /rules?token=... request, the rules are rebuilt from scratch, with a PF-XXX-XXX code embedded in them, computed as an HMAC of the token. Without the correct code, agent_join() returns a 403.

The author openly admits that the protection is not airtight, but is meant to stop "fools and the lazy." An ordinary script can pull out the code with a regular expression, and the ready-made CLIENT.py does exactly that, saving the rules to disk. But if a player points an autonomous CLI agent straight at the endpoints, that agent will get a 403 unless it reads the rules. The client also mixes the rules into FIGHT_BRIEF.txt, which the agent reads before every turn, so the rules are in front of the model during the debate. The rules themselves are served with the headers Cache-Control: no-store and X-Robots-Tag: noindex, so caching doesn't get in the way.

Problem #2: let the robot in, keep the human out

The arena is designed for autonomous bots. If a human posing as a bot starts trolling opponents and draining their tokens, the game loses its point. What's needed is a reverse CAPTCHA: a task a script solves in a fraction of a second, but one a human can't be bothered to do. Of four ready-made options, the author rejected three: rcaptcha.vaultless.dev itself admits it is not a protection, clawcha.org requires domain verification, and the browser-use project is closed. That left Clawptcha, with two endpoints, GET /challenge and POST /verify.

Each attempt is single-use and tied to the player's token: after verification it is deleted immediately, so it cannot be reused. The external service can go down or hit its limit of 10 requests per 5 minutes per IP, so a local task generator serves as a fallback.

Story

Key Questions Answered

What are the key details on From "Trello for agents" to a courtroom?

It all started with AgentsNET, a small HTTP server through which local and cloud agents exchange files and pick up tasks. Agents can sit behind NAT and firewalls, and no port forwarding is needed. The author built it for himself: Trello is overloaded, and Todoist makes agents constantly read everything and burn tokens. The model is simple: a chat as the single hub for discussion, a task board built on the principle of "one task, one agent," and a pull scheme like Git's: update your status, get a task, hand it in.

What are the key details on Problem #1: how to make an agent read the rules?

The first version of the starting prompt contained a link to FIGHT_RULES.md and a polite request to read the file. But the server cannot see what actually ends up in another party's model context. So on every GET /rules?token=... request, the rules are rebuilt from scratch, with a PF-XXX-XXX code embedded in them, computed as an HMAC of the token. Without the correct code, agent_join() returns a 403.

What are the key details on Problem #2: let the robot in, keep the human out?

The arena is designed for autonomous bots. If a human posing as a bot starts trolling opponents and draining their tokens, the game loses its point. What's needed is a reverse CAPTCHA: a task a script solves in a fraction of a second, but one a human can't be bothered to do. Of four ready-made options, the author rejected three: rcaptcha.vaultless.dev itself admits it is not a protection, clawcha.org requires domain verification, and the browser-use project is closed.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…