Respan Red Team
Adaptive security testing for AI agents.
Respan profiles your agent, chooses attack strategies, adapts after refusals, and produces an evidence-backed, OWASP-aligned report.
Only scan systems you own or are authorized to test.
Quickstart
Requires Python 3.11+ and a Respan API key.
1. Install
pip install respan-redteam
2. Sign in
Get an API key at platform.respan.ai/platform/api-keys, then:
respan-redteam auth login
Paste your API key when prompted (characters echo as *). The key is stored in
your OS credential manager, or in ~/.config/respan-redteam/.credentials.json if
that store is unavailable.
For CI / headless use:
export RESPAN_API_KEY="..."
3. Connect your agent
Paste this into your coding agent (Cursor, Claude Code, Codex, etc.):
Fetch https://raw.githubusercontent.com/respanai/respan-redteam/refs/heads/main/SETUP
and follow it to create adapter.py for my agent, then tell me how to run the scan.
That setup guide walks the agent through writing a small adapter.py that talks
to your system. Prefer that over hand-writing the protocol.
4. Scan
respan-redteam scan adapter.py
respan-redteam scan adapter.py --output report.json
Progress goes to stderr; the report goes to stdout or --output.
Commands
respan-redteam auth login|status|logout
respan-redteam config show|edit|path|set|use
respan-redteam scan ADAPTER [--local] [-o PATH] [--fail-under B]
Run respan-redteam <command> --help for options.
Hosted vs local
By default the attack engine runs on Respan (https://api.respan.ai). Your
adapter stays on your machine and only exchanges user messages / replies.
export OPENAI_API_KEY="..."
respan-redteam scan adapter.py --local --output report.json
Local mode runs the open-source engine on your machine. Non-secret settings live
in ~/.config/respan-redteam/config.toml (respan-redteam config edit).
CI
RESPAN_API_KEY="$RESPAN_API_KEY" \
respan-redteam scan adapter.py \
--output redteam-report.json \
--fail-under B \
--quiet
Exit code 4 means the grade fell below --fail-under.
Examples & API
examples/adapter_local.py— client-owned historyexamples/adapter_session.py— server-owned sessionsSETUP— full adapter brief for coding agents
from respan_redteam import EngineConfig, LLMConfig, run_campaign
from adapter import TARGET
result = run_campaign(
TARGET,
config=EngineConfig(llm=LLMConfig(api_key="...", model_attacker="gpt-4.1")),
)
print(result.grade(), result.to_report())
Development
git clone https://github.com/respanai/respan-redteam.git
cd respan-redteam
uv sync
just test
Licensed under Apache 2.0.
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.5.tar.gz.
File metadata
- Download URL: respan_redteam-0.1.5.tar.gz
- Upload date:
- Size: 132.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d00f7358422394b7d86775d1c88f18b6c628f4a6abaa8f051a7ba255e70f1af5
|
|
| MD5 |
340e0cd93a7c661119931445276b1337
|
|
| BLAKE2b-256 |
bbc81c015f8aa26691f9d7acd0beb4965a8ec3282949f1f0058ce6d2d8014c4e
|
Provenance
The following attestation bundles were made for respan_redteam-0.1.5.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.5.tar.gz -
Subject digest:
d00f7358422394b7d86775d1c88f18b6c628f4a6abaa8f051a7ba255e70f1af5 - Sigstore transparency entry: 2188447173
- Sigstore integration time:
-
Permalink:
respanai/respan-redteam@4d3e50e352be0e1bd1585f5e0d37b380fd1e2202 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/respanai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d3e50e352be0e1bd1585f5e0d37b380fd1e2202 -
Trigger Event:
release
-
Statement type:
File details
Details for the file respan_redteam-0.1.5-py3-none-any.whl.
File metadata
- Download URL: respan_redteam-0.1.5-py3-none-any.whl
- Upload date:
- Size: 93.6 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 |
12186a06c22bcdaa0a5949bbdd2ad5c2f4a653fd270b20ee8505c3a85f33c307
|
|
| MD5 |
27437bac9824a976b99a4fd5cc1ba402
|
|
| BLAKE2b-256 |
3d2a4156d36297faf770af90daa99971bd3ec1cc63d4f350192dd7f6a497ac11
|
Provenance
The following attestation bundles were made for respan_redteam-0.1.5-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.5-py3-none-any.whl -
Subject digest:
12186a06c22bcdaa0a5949bbdd2ad5c2f4a653fd270b20ee8505c3a85f33c307 - Sigstore transparency entry: 2188447180
- Sigstore integration time:
-
Permalink:
respanai/respan-redteam@4d3e50e352be0e1bd1585f5e0d37b380fd1e2202 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/respanai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d3e50e352be0e1bd1585f5e0d37b380fd1e2202 -
Trigger Event:
release
-
Statement type: