Respan security
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
The fastest path: paste this into your coding agent (Cursor, Claude Code, Codex, etc.):
Fetch https://www.respan.ai/redteam-setup.txt
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 installing the CLI, writing a small
adapter.py that talks to your system, and running your first scan. Prefer
that over hand-writing the protocol.
To set up manually instead (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
Write an adapter.py for your agent (see Examples & API
below, or use the setup prompt above).
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. If the
connection drops mid-scan, the CLI reconnects and resumes the same campaign. If
the CLI itself stops (crash, Ctrl-C, closed terminal), running the same scan
again within 30 minutes picks the campaign up from its last finished goal; pass
--new to start over instead.
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.
Metadata
Release files for respan-redteam 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| respan_redteam-0.1.10.tar.gz | 194.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respan_redteam-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 298.8 kB
Release files / respan_redteam-0.1.10.tar.gz
| Download URL | respan_redteam-0.1.10.tar.gz |
|---|---|
| Size | 194.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cd5148d34e3e27a61bbf3e5d15d59e8365b8617bc115f1e6c7c140819218b9e
|
|
BLAKE2b-256 checksum How to use checksums |
97622a6a9cb36758dabad6070ad52a5552a70355338dbdd7eb313729fb49ec2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logRelease files / respan_redteam-0.1.10-py3-none-any.whl
| Download URL | respan_redteam-0.1.10-py3-none-any.whl |
|---|---|
| Size | 104.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff2bf8342cc74876e42f97c3f99e927ed3a7c4f987cfc892af4ac9a622fed291
|
|
BLAKE2b-256 checksum How to use checksums |
68a4b1fab66b261f81d559b6cd868b66e2805addabb9e6a005e61c15ba438fca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logSecurity for respan-redteam 0.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for respan_redteam-0.1.10.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.