Run a Red Team campaign

Beta
Choose a connection method, verify access, and launch an authorized assessment.

Respan Red Team sends adversarial messages to an agent and evaluates its replies.

Only assess an agent and its connected systems when you own them or have explicit authorization to test them.

Choose a connection method

In the Respan platform, open Red teamingCampaigns, then select New campaign.

MethodUse whenWhere the connection runs
Connect an agentThe agent is private, stateful, or uses a custom interfaceA Python adapter runs beside your agent
Connect an endpointThe agent exposes a browser-reachable, OpenAI-compatible Chat Completions endpointThe open platform tab calls the HTTPS endpoint
Use sample sandboxYou want to explore Red Team without connecting your systemsRespan uses a deliberately vulnerable hosted target

Connect an agent

This method supports local, private, stateful, and custom-auth agents. It requires Python 3.11+ and a Respan API key.

New Red Team campaign screen with Connect an agent selected and the CLI connection workflow
Connect an agent provides the CLI workflow for a private or custom target.
1

Install and sign in

$pip install respan-redteam
$respan-redteam auth login
2

Create the adapter

Ask your coding agent to fetch https://www.respan.ai/redteam-setup.txt and follow it to create adapter.py for your agent.

3

Start the scan

$respan-redteam scan adapter.py --output report.json

Keep the adapter process available until the campaign completes. The adapter should create a fresh conversation for each attack and return assistant text as a string.

Connect an endpoint

Use this method only when the target accepts OpenAI-compatible Chat Completions requests at a browser-reachable HTTPS URL.

New Red Team campaign endpoint form with target name, base URL, model, and custom header fields
Connect an endpoint collects the target name, base URL, optional model, and scoped headers.

Enter:

  • A recognizable target name
  • The HTTPS base URL
  • A model name, when the endpoint requires one
  • Any required headers as JSON

Before launching, verify CORS, firewall or VPN access, authentication, and the response shape. Assistant text must be available at choices[0].message.content. Use a narrowly scoped credential and keep the platform tab open while the campaign runs.

Use the sample sandbox

Choose ShopBot (naive) to explore the workflow without sending requests to your systems. The target is intentionally weak and does not require target credentials.

New Red Team campaign screen with the ShopBot naive sample sandbox selected
The sample sandbox offers the hosted ShopBot target and shows the authorization acknowledgement.

Review the authorization acknowledgement, then select Launch campaign.

Authorize and launch

Before starting any target:

  • Confirm the assessment scope and permission.
  • Prefer a non-production environment.
  • Limit the connected agent’s credentials, network access, and tool permissions.
  • Check the campaign allowance and reset date shown in the creation screen.

Queued and running campaigns reserve allowance. Failed campaigns do not count as completed campaign usage. If no allowance remains, wait for the displayed reset date or change the organization’s plan.

Run from CI

Set RESPAN_API_KEY in the CI secret store, then apply a grade threshold:

$respan-redteam scan adapter.py \
> --output redteam-report.json \
> --fail-under B \
> --quiet

Exit code 4 means the result fell below --fail-under.