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

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.8
File Size Uploaded Provenance
respan_redteam-0.1.8.tar.gz 184.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 282.7 kB

Release files / respan_redteam-0.1.8.tar.gz

Download URL respan_redteam-0.1.8.tar.gz
Size 184.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3b35e05a0bd902db86853e32c43c4a78a3818fdb4c69761c0537269e3a32132d
BLAKE2b-256 checksum
How to use checksums
8a7aef2fffb5316fa5671d1fd8649f54c338e1e3f47b5a3bcf49f841f790f04a
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 15, 2026.

Transparency log

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

Download URL respan_redteam-0.1.8-py3-none-any.whl
Size 98.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34d3613c824cecaa6afbb3f4867232d470c3e190b525295ceb8c649e16446787
BLAKE2b-256 checksum
How to use checksums
619bcf2cbdbd9b496b11d96be4f84ce46f4e525a1f575e7b97364b26eddc0953
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 15, 2026.

Transparency log

Security for respan-redteam 0.1.8

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.8.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 15, 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