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.6.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.6-py3-none-any.whl (93.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: respan_redteam-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 251f66bdb6d1d072d010c65520df59dd3541f8ba1b6da5f54a2ac8e563e4e281
MD5 71eb66474e53f8d12137ba69aaa9c6a1
BLAKE2b-256 0a2983d75763dd0448d4d9ad5ac289441eea9e5f23a7a9049c36277d466eb3f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for respan_redteam-0.1.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: respan_redteam-0.1.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9e0a0f163a85e67b61d2d0b0050ba562503b894fb26c7753363e1fd0e992f6f0
MD5 a97d8d7bd1d96874aad0ea146dc9dda1
BLAKE2b-256 a9a9f2c892cb21774f8cd982f8a7555fa47123a311ef6f12182303c51b247483

See more details on using hashes here.

Provenance

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

This release

0.1.6 This release

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