Skip to main content
Respan security
PyPI Python versions License Y Combinator W24 Platform Documentation Twitter Discord

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.

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.

Metadata

Release files for respan-redteam 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for respan-redteam 0.1.9
File Size Uploaded Provenance
respan_redteam-0.1.9.tar.gz 186.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for respan-redteam 0.1.9
File Interpreter ABI Platform
respan_redteam-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 285.2 kB

Release files / respan_redteam-0.1.9.tar.gz

Download URL respan_redteam-0.1.9.tar.gz
Size 186.2 kB
Tags Source
SHA-256 checksum
How to use checksums
03ebc9b249eb49c4dad5e29cc92c767f267f02bf77c4fb247bbd51c5d9c4022b
BLAKE2b-256 checksum
How to use checksums
7c49d01d5747262abc732f8b57dcce3706ff5943d23b67d757d7e170681f06ed
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 16, 2026.

Transparency log

Release files / respan_redteam-0.1.9-py3-none-any.whl

Download URL respan_redteam-0.1.9-py3-none-any.whl
Size 99.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d02c6d3a0122d000c20a8c095e83769a19b52aa9b5da257d3489200d756a5c2
BLAKE2b-256 checksum
How to use checksums
6c711487a2ffac7695cfc3d453d050fefa675423d5ce6554c0b0c7322dcf0fc2
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 16, 2026.

Transparency log

Security for respan-redteam 0.1.9

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.

Select from 2 files

Attestation for respan_redteam-0.1.9.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 16, 2026.

Transparency log

A 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.

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