AI SummaryA multi-agent red-teaming framework that orchestrates coordinated AI security testing with an arbiter to consolidate findings and maintain an immutable audit trail. Security engineers and AI developers use it to systematically test LLM vulnerabilities with repeatable, deterministic results.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to set up the "Extending Agents" agent in my project. Please run this command in my terminal: # Add AGENTS.md to your project root curl --retry 3 --retry-delay 2 --retry-all-errors -o AGENTS.md "https://raw.githubusercontent.com/dr-gareth-roberts/adversarial-debate/main/docs/developers/extending-agents.md" Then explain what the agent does and how to invoke it.
Description
Multi‑agent AI security testing framework that orchestrates red‑team analyses, consolidates findings with an arbiter, and records an immutable audit ledger—plus a deterministic demo mode for repeatable results.
Overview
Agents follow a simple pattern: • Receive context with code and metadata • Build a prompt for the LLM • Parse the response into structured findings • Emit a bead for the audit trail
Extending Agents
Create custom agents to add new types of analysis to the framework.
The Agent Base Class
All agents extend the abstract Agent class: `python from abc import ABC, abstractmethod from adversarial_debate.agents.base import Agent, AgentContext, AgentOutput from adversarial_debate.providers import LLMProvider, Message from adversarial_debate.store import BeadStore, BeadType, Bead class Agent(ABC): def __init__(self, provider: LLMProvider, bead_store: BeadStore): self.provider = provider self.bead_store = bead_store @property @abstractmethod def name(self) -> str: """Human-readable agent name.""" ... @property @abstractmethod def bead_type(self) -> BeadType: """Type of bead this agent produces.""" ... @property def model_tier(self) -> str: """Model capability tier (HOSTED_LARGE or HOSTED_SMALL).""" return "HOSTED_LARGE" @abstractmethod def _build_prompt(self, context: AgentContext) -> list[Message]: """Build the LLM prompt from context.""" ... @abstractmethod def _parse_response( self, response: str, context: AgentContext ) -> AgentOutput: """Parse LLM response into structured output.""" ... async def run(self, context: AgentContext) -> AgentOutput: """Execute the agent.""" # Build prompt messages = self._build_prompt(context) # Call LLM model = self.provider.get_model_for_tier(self.model_tier) response = await self.provider.complete( messages, model=model, json_mode=True, ) # Parse response result = self._parse_response(response.content, context) # Create bead bead = self._create_bead(context, result) self.bead_store.append(bead) # Return output return AgentOutput( agent_name=self.name, result=result, beads_out=[bead], confidence=result.get("confidence", 0.5), assumptions=result.get("assumptions", []), unknowns=result.get("unknowns", []), errors=[], ) `
Creating a Custom Agent
Let's create an agent that checks for accessibility issues in web code.
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster