Project Info
Inspiration
AI systems can fail in ways traditional tests miss — through prompt injection, data leakage, unsafe tool use, and jailbreaks. We built Red-Team Arena to make AI security testing repeatable, measurable, and useful to development teams. What It Does Red-Team Arena launches adversarial red-team and defensive blue-team agents against AI applications. It records every attack, response, guardrail decision, and outcome, then converts failures into evidence-backed remediation proposals for human review. It also provides: Versioned security-test corpora Model-to-tool attack-path analysis Reproducible before-and-after testing CI release gates Protection against regressions and false positives How We Built It We used Laravel, PHP, PostgreSQL, Redis, and Docker Compose. LLM providers are integrated through a shared HTTP client, while imported test corpora are fingerprinted with SHA-256 for reproducibility. We model risk conceptually as: $$ R \propto \text{Reachability} \times \text{Sensitivity} \times \text{Control Gaps} $$ The platform stores complete execution traces so every finding can be connected to the exact input, model response, control decision, and remediation test. Challenges Our biggest challenges were keeping AI-generated attacks realistic while making results deterministic, preserving legitimate behavior while blocking attacks, and maintaining compatibility between Laravel 8 and PHP 8.5. We also ensured optional or unavailable controls were reported honestly instead of being presented as successful protections. What We Learned We learned that AI security requires more than detecting harmful output. Teams need reproducible evidence, attack-path visibility, regression testing, and human approval before applying AI-generated fixes. The result is a platform that does not simply find vulnerabilities — it helps teams prove they fixed them.
⚔ Red-Team Arena
Autonomous Multi-Agent Adversarial Simulation Platform for LLM Safety Testing
Red-Team Arena pits a Red Team Attacker against a Blue Team Defender in real-time AI duels, with a Policy Judge referee scoring every turn against the OWASP LLM Top 10. All three agents reason using OpenAI's gpt-4o-mini, independent of whichever model is under test.
Architecture
┌──────────────┐ ┌────────────────┐ ┌──────────────────┐
│ Attacker │────▶│ NeMo + LLM │────▶│ Target Model │
│ Agent (Red) │ │ Guard (Input) │ │ (Groq / OpenAI / │
│ gpt-4o-mini │ │ │ │ Hugging Face) │
└──────────────┘ └────────────────┘ └────────┬─────────┘
│
┌──────────────┐ ┌────────────────┐ ┌────────▼─────────┐
│ Policy Judge │◀────│ Defender │◀────│ NeMo + LLM │
│ gpt-4o-mini │ │ Agent (Blue) │ │ Guard (Output) │
│ (Referee) │ │ gpt-4o-mini │ │ │
└──────────────┘ └────────────────┘ └──────────────────┘
How This Project Uses OpenAI Models
Red-Team Arena's entire adversarial loop is driven by OpenAI models — not just the model under test:
| Agent | Role | Model | Provider |
|---|---|---|---|
AttackerAgent | Crafts adversarial prompts, adapts technique on block | gpt-4o-mini | OpenAI (app/AI/Agents/AttackerAgent.php) |
DefenderAgent | Evaluates target output against policy profile | gpt-4o-mini | OpenAI (app/AI/Agents/DefenderAgent.php) |
PolicyJudgeAgent | Scores each turn and maps it to OWASP LLM Top 10 | gpt-4o-mini | OpenAI (app/AI/Agents/PolicyJudgeAgent.php) |
These three agents are the "brains" of every duel: the attacker's reasoning, the defender's verdicts, and the judge's scoring are all OpenAI completions, orchestrated through Prism PHP in ModelGateway.php.
Separately, the target model — the system actually being red-teamed — is configurable per duel and can be OpenAI, Groq (OpenAI-compatible API), or Hugging Face-hosted models, so the same OpenAI-powered attacker/defender/judge pipeline can be pointed at any model under evaluation.
Tech Stack
| Component | Technology |
|---|---|
| Backend | Laravel 11 (PHP 8.2+) |
| AI SDK | Prism PHP v0.100.1 |
| Agent Reasoning | OpenAI gpt-4o-mini (Attacker, Defender, Policy Judge) |
| Target Model Providers | OpenAI, Groq (llama-3.1/3.3), Hugging Face |
| Database | PostgreSQL |
| Cache/Queue | Redis |
| Guardrails | NeMo Guardrails + LLM Guard |
| Frontend | Alpine.js + Vanilla CSS |
| Infrastructure | Docker (Laravel Sail) |
Quick Start
# 1. Clone and install
git clone <repo-url>
cd Agenticthon-
cp .env.example .env
# 2. Set your OpenAI API key in .env (required — powers Attacker/Defender/Policy Judge)
# OPENAI_API_KEY=your-key-here
# 3. Start with Docker Sail
docker compose up -d --build
# 4. Setup application
docker compose exec laravel.test php artisan key:generate
docker compose exec laravel.test php artisan migrate
docker compose exec laravel.test php artisan db:seed
# 5. Open http://localhost:8888
Optional: Enable Guardrails (Phase 2)
docker compose --profile guardrails up -d
docker compose exec laravel.test php artisan config:clear
Health Check
docker compose exec laravel.test php artisan arena:health
Agent Roster
🗡️ AttackerAgent
- 10 attack techniques: jailbreak, role-play, injection, obfuscation, translation bypass, and more
- Adaptive intelligence: tracks technique effectiveness, rotates blocked families, escalates on block
🛡️ DefenderAgent
- 3 policy profiles: strict (0.3), moderate (0.6), permissive (0.85)
- Programmatic + LLM reasoning: hard thresholds enforced before LLM evaluation
⚖️ PolicyJudgeAgent
- Turn scoring: red_team_win, blue_team_win, draw, false_positive
- OWASP mapping: LLM01, LLM02, LLM04, LLM06, LLM08, LLM09
Scenarios
| # | Category | Severity | Techniques |
|---|---|---|---|
| 1 | Jailbreak | CRITICAL | role_play_framing, authority_impersonation |
| 2 | Self-Harm | CRITICAL | hypothetical_framing, multi_turn_escalation |
| 3 | PII Leakage | CRITICAL | indirect_injection, obfuscation |
| 4 | Toxicity | HIGH | translation_bypass, token_smuggling |
| 5 | Prompt Injection | HIGH | direct_jailbreak, many_shot_priming |
| 6 | Model Spec Violation | MEDIUM | direct_jailbreak, hypothetical_framing |
API Endpoints
| Route | Method | Description |
|---|---|---|
/ | GET | Landing page |
/duels | GET | Arena UI — run duels |
/duels/{scenario}/run | POST | Execute a duel |
/duels/{duel}/status | GET | Live duel status |
/duels/{duel}/report | GET | Full duel report |
/duels/history/all | GET | Browse past duels |
/api/stats | GET | Analytics dashboard data |
Project Status
| Phase | Status | Notes |
|---|---|---|
| Phase 1 — Foundation | Complete | Agents, scenarios, persistence, duel loop |
| Phase 2 — Defense Layer | Complete | NeMo and LLM Guard service integrations with safe-fail behavior |
| Phase 3 — Offense + Evaluation | Complete | Adaptive attacker logic and analytics dashboard service |
| Phase 4 — Landing Page | Complete | Marketing landing page at / and arena UI at /duels |
License
MIT
Analysis
View
Metric
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- JavaScriptIn code
- PHPIn code
- PythonIn code
- Tailwind CSSIn code
- DockerClaimed
- Hugging FaceClaimed
- Next.jsClaimed
- PostgreSQLClaimed
- RedisClaimed
6 of 11 appear in the indexed code. 5 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- Claude CodeCommits
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
427 KB
Source files
67
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
emadaqel/Agenticthon-
96 files · 745 KB · @ ba6083d
Structure
Interface
18 files · 19%Screens, components and styles rendered to the user.
+2 moreAPI & routing
9 files · 9%Request entry points: routes, handlers and controllers.
Application logic
7 files · 7%Domain rules, services and shared utilities.
Background jobs
1 file · 1%Work run outside a request: tasks, workers and schedules.
Data & schema
14 files · 15%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- PHP92%
- Markdown5%
- Python2%
- YAML1%
- XML0%
- JavaScript0%
- Other (1)0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 55 development-only dependencies.
docker/guardrails/requirements.txt
pypi · 3- fastapi
- pydantic
- uvicorn[standard]
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.