Adaptive red-team engine and CLI for AI agents
Project description
Respan Red Team
Open-source red-team engine and CLI for AI agents. It probes an agent through normal chat messages, adapts its attacks, judges the responses, and produces an OWASP-aligned report.
Only scan systems you own or have permission to test.
Install
Requires Python 3.11 or newer.
pip install respan-redteam
For development:
git clone https://github.com/respanai/respan-redteam.git
cd respan-redteam
uv sync
Connect your agent
Create adapter.py with a TARGET. A target opens conversations, and a chat sends user messages to
your agent:
class Chat:
def send(self, message: str) -> str:
return my_agent(message)
def transcript(self) -> list[dict]:
return []
class Target:
label = "my-agent"
def open(self) -> Chat:
return Chat()
TARGET = Target()
Complete templates are available for a
local adapter
and a
server-owned session.
Run
The default remote scan uses Respan's hosted engine:
respan-redteam adapter.py -o report.json
To run the engine locally, provide an OpenAI-compatible API key:
export OPENAI_API_KEY=...
respan-redteam adapter.py --local -o report.json
From a source checkout, use uv run respan-redteam. Run respan-redteam --help for output,
retry, CI-grade, and connection options.
Python API
from respan_redteam import run_campaign
from adapter import TARGET
result = run_campaign(TARGET)
print(result.grade(), result.score())
print(result.to_report())
Extend
Custom prompt attacks, payload carriers, and multi-step strategies can be registered through the
public extension API. See the
prompts,
carriers, and
strategies
packages.
Local model settings use OPENAI_API_KEY, optional OPENAI_BASE_URL, and the RESPAN_MODEL_*
variables documented in
config.py.
Development
just test
Licensed under Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file respan_redteam-0.1.0.tar.gz.
File metadata
- Download URL: respan_redteam-0.1.0.tar.gz
- Upload date:
- Size: 87.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa33a1056d8f1e054a7c6b89dace6a8e9a07e4a04317fe39d00f1458767ebe9
|
|
| MD5 |
6419c780e7b41192fa0591aa287e80ed
|
|
| BLAKE2b-256 |
4e8a77948b55e07b65d8a54f419baccc3f6a9f389ae285591c2df5e16e42ffc4
|
Provenance
The following attestation bundles were made for respan_redteam-0.1.0.tar.gz:
Publisher:
publish.yml on respanai/respan-redteam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
respan_redteam-0.1.0.tar.gz -
Subject digest:
0aa33a1056d8f1e054a7c6b89dace6a8e9a07e4a04317fe39d00f1458767ebe9 - Sigstore transparency entry: 2159155948
- Sigstore integration time:
-
Permalink:
respanai/respan-redteam@7c04c61d4325251c7cd501bcef2fbdddc19af005 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/respanai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7c04c61d4325251c7cd501bcef2fbdddc19af005 -
Trigger Event:
release
-
Statement type:
File details
Details for the file respan_redteam-0.1.0-py3-none-any.whl.
File metadata
- Download URL: respan_redteam-0.1.0-py3-none-any.whl
- Upload date:
- Size: 65.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecdf6d06953360a85559f242cf5d6e0fb4ac23faada3c48c48e9f0c064249780
|
|
| MD5 |
571dc37164d09cd9880cd50e6e8560b8
|
|
| BLAKE2b-256 |
4817c82dd3b5851a1b63ba3d202ea35a2b8391d02fcf112023f9b2e989c42753
|
Provenance
The following attestation bundles were made for respan_redteam-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on respanai/respan-redteam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
respan_redteam-0.1.0-py3-none-any.whl -
Subject digest:
ecdf6d06953360a85559f242cf5d6e0fb4ac23faada3c48c48e9f0c064249780 - Sigstore transparency entry: 2159156038
- Sigstore integration time:
-
Permalink:
respanai/respan-redteam@7c04c61d4325251c7cd501bcef2fbdddc19af005 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/respanai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7c04c61d4325251c7cd501bcef2fbdddc19af005 -
Trigger Event:
release
-
Statement type: