Skip to main content

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

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

respan_redteam-0.1.7.tar.gz (132.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

respan_redteam-0.1.7-py3-none-any.whl (94.3 kB view details)

Uploaded Python 3

File details

Details for the file respan_redteam-0.1.7.tar.gz.

File metadata

  • Download URL: respan_redteam-0.1.7.tar.gz
  • Upload date:
  • Size: 132.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for respan_redteam-0.1.7.tar.gz
Algorithm Hash digest
SHA256 bfee1cc4e2916b37b118b6dde904ef6190d8e1242752a4001fe0c30abf85ab3b
MD5 385f5a6cbf66e72c507af4a0120b443b
BLAKE2b-256 e465a8f7f0b065a24bdf1ef6a562128d5d1f9f4a0d9d6af0d78fcdaaf9a14b8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for respan_redteam-0.1.7.tar.gz:

Publisher: publish.yml on respanai/respan-redteam

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file respan_redteam-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: respan_redteam-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 94.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for respan_redteam-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 860afc3ed188e22bb1ef5974dc11337285aee173f913beaab41ca9ebf01bf4fc
MD5 693a1d91ac0b198a1293ad3ffff8be49
BLAKE2b-256 f046d246906d3b9d34c2add6deae03b3ec4b3015b117829e8765d00ca1785108

See more details on using hashes here.

Provenance

The following attestation bundles were made for respan_redteam-0.1.7-py3-none-any.whl:

Publisher: publish.yml on respanai/respan-redteam

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page