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.5.tar.gz (132.2 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.5-py3-none-any.whl (93.6 kB view details)

Uploaded Python 3

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

Hashes for respan_redteam-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d00f7358422394b7d86775d1c88f18b6c628f4a6abaa8f051a7ba255e70f1af5
MD5 340e0cd93a7c661119931445276b1337
BLAKE2b-256 bbc81c015f8aa26691f9d7acd0beb4965a8ec3282949f1f0058ce6d2d8014c4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for respan_redteam-0.1.5.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.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

Hashes for respan_redteam-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 12186a06c22bcdaa0a5949bbdd2ad5c2f4a653fd270b20ee8505c3a85f33c307
MD5 27437bac9824a976b99a4fd5cc1ba402
BLAKE2b-256 3d2a4156d36297faf770af90daa99971bd3ec1cc63d4f350192dd7f6a497ac11

See more details on using hashes here.

Provenance

The following attestation bundles were made for respan_redteam-0.1.5-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

0.1.7

2 files

0.1.6

2 files

This release

0.1.5 This release

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