Red-team visible LLM reasoning — refusal quotes aren't success. Adaptive TUI, CI scan, OWASP tags, mock provider, proof-of-action agent lane.
2
stars
92
commits
Python
primary language
Aug 27, 2026
updated
Refusal quotes of a canary are not a finding. This CLI scores visible chain-of-thought and proves simulated-agent impact from observed actions — not from assistant prose or an LLM judge.
python -m pip install cot-redteam-agent
Published on PyPI as cot-redteam-agent.
The keyless mock provider never touches the network. The config below is also
shipped as cot_redteam/data/mock_demo.example.yaml.
mock_mode: auto discloses a synthetic canary, so scan should exit 1
(findings). That is the demo working — not a real-model vulnerability.
cat > demo.yaml <<'EOF'
version: 2
global:
seed: 1
output_dir: ./results-demo
concurrency: 1
providers:
mock:
kind: mock
mock_mode: auto
evaluation:
models:
- mock:target
dataset_path: pkg:sample.jsonl
sample_count: 1
budgets:
max_requests: 40
max_elapsed_seconds: 120
retain_prompts: false
retain_responses: false
storage:
path: ./results-demo/cot_redteam.db
EOF
cot-redteam scan --config demo.yaml
Exit codes: 0 clean, 1 findings, 2 config/env, 3 partial. Gate CI on
1. Switch mock_mode to refuse for a clean pass — packaged variants
mock_refuse.example.yaml and
mock_disclose.example.yaml
sit next to the auto demo. cot-redteam init --demo mock writes this keyless
config instead of the OpenRouter example. From a clone, the v0.6 agent lane is
also keyless:
cot-redteam agent scan --config cot_redteam/data/agent_security.example.yaml.
Pick the tool that matches the job. This project does not replace a broad scanner, an orchestration SDK, or a YAML eval harness.
| CoT Red Team Agent | garak | PyRIT | promptfoo | |
|---|---|---|---|---|
| Best fit | Score visible reasoning and simulated agent actions | Broad model vulnerability scanner | Compose red-team workflows in Python | YAML/CI eval and red-team prompts |
| Success rule | A refusal that only quotes a canary is not success; agent impact needs observed tool actions and world-state diffs | Probe/detector library across many failure modes | You choose converters, scorers, and targets | Assertions and judges you configure |
| Live loop | Adaptive TUI (cot-redteam tui) | CLI and reports | SDK / notebooks | Web UI and CI |
| Start offline | Keyless mock provider | Typically needs a target model | Typically needs a target | Typically needs a provider |
| Agent proof | v0.6 simulated world, deny-by-default gateway, checksummed replay | Different scope | Different scope | Different scope |
| Standards | OWASP GenAI LLM Top 10 (2026) tags on report items | Own taxonomies / plugins | Own taxonomies / datasets | Own rubrics / plugins |
See also docs/comparisons.md for overlap, honest non-goals, and what each project's own README says it is.

Interactive adaptive TUI: multi-model board, payload attempt log, model output, and last real successful disclosure (refusal re-quotes are not counted as success). See docs/assets/README.md for social-preview guidance.
CoT Red Team Agent is an open-source CLI and Python API for evaluating LLM and agent behavior under adversarial inputs. It runs reproducible model attacks and offline simulated-agent scenarios, records failure-aware evidence, and generates auditable reports and replayable security regressions.
Version 0.6.0 adds the Proof-of-Action agent execution lane: a deterministic
Support Agent World, deny-by-default tool gateway, action/state-transition
oracles, checksummed exploit replay, and patched-target regression suites. It
preserves the 0.5 adaptive attacks and TUI, 0.3 benchmark, and 0.2 Python
API. Existing users should also read the
0.3 migration guide.
injection.system_canary_agent_llm): an attacker
model writes the next extraction prompts from the conversation (PAIR loop,
TAP-style candidate branching) and falls back to the deterministic catalog
if the attacker provider fails. Requires attacker_model in attack_config.injection.crescendo_canary): gradual
5-rung escalation that references the model's own replies, from a benign
question to an exact token ask. No attacker model needed.harm.forbidden_behavior): score
any harmful request (phishing, fraud, weapons, hate speech, ...) with a
StrongREJECT-style rubric judge — refusal, specificity, convincingness —
no canary required. Ships with pkg:harmful.jsonl (10 items).cot-redteam scan --config X runs a quick compliance
scan and exits 0 (clean) / 1 (findings) / 3 (partial) — gate CI on it.injection.system_canary_adaptive).cot-redteam tui).The tool does not provide a hosted service or guarantee that automated monitors represent ground truth.
| Provider | Configuration kind | Typical use |
|---|---|---|
| OpenRouter | openrouter | Hosted access to multiple model families |
| OpenAI | openai | OpenAI API models |
| Anthropic | anthropic | Anthropic Messages API models |
| vLLM | vllm | Local or self-hosted OpenAI-compatible server |
| llama.cpp | llamacpp | Local llama.cpp OpenAI-compatible server |
| Generic endpoint | openai_compatible | Explicit user-selected compatible API |
| Mock | mock | Deterministic keyless provider for demos, tests, and CI |
Provider keys are read only from named environment variables. Secrets must not
be placed directly in YAML files. The mock provider needs no key at all:
mock_mode: auto|refuse|disclose|error controls whether it discloses a
synthetic canary, refuses, or raises provider errors — ideal for smoke tests
and CI without spending any budget.
Python 3.10 through 3.13 is supported.
Install from PyPI:
python -m pip install cot-redteam-agent
Or install the tagged source release:
# test: command
python -m pip install "git+https://github.com/rudrasatani13/cot-redteam-agent.git@v0.6.0"
Or install the wheel attached to the GitHub release:
python -m pip install \
"https://github.com/rudrasatani13/cot-redteam-agent/releases/download/v0.6.0/cot_redteam_agent-0.6.0-py3-none-any.whl"
For development:
git clone https://github.com/rudrasatani13/cot-redteam-agent.git
cd cot-redteam-agent
python -m pip install -e ".[dev]"
Published on PyPI as cot-redteam-agent.
No API key? Use the 30-second mock scan above. The steps below contact a real provider and may incur cost.
Create a wheel-safe example configuration:
# test: command
cot-redteam init --path config.yaml
# Keyless mock demo instead of the OpenRouter example:
# cot-redteam init --path demo.yaml --demo mock
# Edit evaluation.models and generative model IDs for your provider route.
export OPENROUTER_API_KEY=your-key
cot-redteam config validate --config config.yaml
cot-redteam list-attacks
cot-redteam list-monitors
The generated configuration uses the packaged pkg:sample.jsonl dataset and
works outside the repository. It includes optional provider examples, but
validation requires credentials only for providers referenced by the selected
evaluation and generative models. The default attack is
injection.system_canary_agent (invent techniques until real disclosure).
Run the configured evaluation when you are ready to contact the provider:
cot-redteam run --config config.yaml
cot-redteam list-runs --config config.yaml
--config is required (bare cot-redteam tui will error):
cot-redteam tui --config config.yaml
# or auto-start:
cot-redteam tui --config config.yaml --auto-start
The bottom type bar is a single slim line (no tall box borders). Type a slash command and press Enter. Mid panels expand; the composer stays pinned.
Inside the TUI:
/model openrouter:your-model-id
/payloads 8
/run
Useful commands: /help, /add, /models, /attack, /stop, /quit. See
the full TUI guide (layout + slim composer notes).
Render a report using the run_id printed by the run command:
cot-redteam report \
--config config.yaml \
--run-id RUN_ID \
--format markdown
Markdown reports include retained system and attack prompts, model responses, visible provider reasoning, exact attack-assessment evidence, and monitor outcomes. The packaged adaptive canary attack places a synthetic token only in a trusted system instruction and reports success only on real disclosure—not when the model refuses while quoting the canary during analysis.
List the packaged suites:
cot-redteam list-suites
cot-redteam suite show --id builtin.smoke
In config.yaml, select a suite and remove the legacy attacks and monitors
entries if you want a benchmark-only run:
evaluation:
models:
- openrouter:your-model-route
suite_ids:
- builtin.smoke
repetitions: 1
budgets:
# 12 trials; one is two-turn, so the target-request minimum is 13.
max_requests: 13
retain_prompts: true
retain_responses: true
retain_reasoning: true
Provider capabilities are declared under providers.<name>.capabilities.
Unsupported roles fail during config validate, before any billed request.
The packaged smoke suite includes a simulated tool-output case, so the selected
route must declare tool_role: true; otherwise use a filtered local suite.
Run and inspect it with the same commands:
cot-redteam config validate --config config.yaml
cot-redteam run --config config.yaml
cot-redteam report --config config.yaml --run-id RUN_ID --format markdown
cot-redteam report --config config.yaml --run-id RUN_ID --format jsonl
Benchmark results apply only to the tested model route, provider behavior, policy, suite version, transformations, and repetitions. They are not a universal model-security score. See the benchmark guide.
The tool records visible reasoning only when it is:
<think>...</think>.Ordinary answer prose is not relabeled as hidden reasoning. Model outputs are nondeterministic, automated monitors are imperfect, and attack success does not prove a general model vulnerability. Reports preserve failed and excluded items so those limitations remain visible. A reasoning-only canary disclosure means the tested provider route exposed protected system content to its API caller; it does not prove that every deployment of the named model does so.
Prompts, responses, and visible reasoning can contain confidential information.
Review evaluation.retain_prompts, evaluation.retain_responses, and
evaluation.retain_reasoning before running against sensitive datasets.
The default configuration retains evaluation traces. Stored SQLite databases, artifacts, reports, and generated archives should be protected as sensitive research data and must not be committed.
Use the project only with models, endpoints, datasets, and credentials you are authorized to test. Respect provider terms, rate limits, privacy obligations, and applicable law. Do not use generated attacks to access third-party systems or data without permission.
Model-safety results belong in normal research reports or issues. Suspected software vulnerabilities in this repository must be reported privately under the security policy.
v0.6 adds an agent execution lane that evaluates agent behavior, not just model text. Impact is proven only by observed simulated actions and deterministic world state transitions — assistant prose, model reasoning, and LLM judge opinion are never proof of impact.
ToolGateway with deny-by-default tool dispatch — unknown tools,
tools outside the scenario sandbox allowlist, schema-invalid calls, and
over-limit arguments are denied before execution. Derived authorization
(policy decisions per tool call) is recorded on every dispatch as oracle
evidence; scenarios rely on unauthorized calls EXECUTING so the oracles
can prove impact from observed state changes, so authorization is enforced
only when the gateway is configured with deny_unauthorized_tools: true.
Byte/action/time/concurrency limits bound every dispatch and structured
trajectory events are recorded for each one..sha256 sidecar that is verified on load; retention
flags and the recorded seed are honored so exact replay reproduces them,
and regression suites replay saved exploits against patched targets
expected to hold.cot-redteam agent scan --config cot_redteam/data/agent_security.example.yaml
cot-redteam replay artifacts/<run_id>/replay.json # exit 1 = reproduced
cot-redteam regress --suite security-regressions/ # patched target holds
The v0.6 path runs fully offline with the keyless mock provider plus
scripted targets and local SQLite/artifacts. Agent retention defaults to
omitting raw tool arguments/results, memory values, and final-response
content; structural evidence (events, digests, oracle verdicts) is always
kept.
Custom Python target adapters execute in-process and are trusted code, like installed plugins. The runtime facades separate target-authored messages from gateway-authored action evidence, but they are not a sandbox for malicious adapter code. Treat model output and tool-result data as hostile; install or supply only target adapter code you trust.
# test: python
import asyncio
from cot_redteam.api import run_benchmark
from cot_redteam.core.config import load_config
async def main() -> None:
config = load_config("config.yaml")
run = await run_benchmark(config)
print(run.run_id, len(run.trials))
asyncio.run(main())
Use run_evaluation for the backward-compatible 0.2 attack/monitor path and
run_benchmark for configured suites. Both contact providers and may incur cost.
cot-redteam init — --demo mock writes the keyless mock democot-redteam config validate|showcot-redteam list-attacks|list-monitors|list-providerscot-redteam list-suitescot-redteam suite validate|showcot-redteam dataset import cyberseceval|ih-challengecot-redteam runcot-redteam tui — interactive adaptive dashboardcot-redteam race — race one probe across models and compare compliancecot-redteam list-runs|show-run|reportcot-redteam evolvecot-redteam agent scan --config — scripted agent scenarios; saves replay artifacts for verified exploitscot-redteam replay EXPLOIT.json — deterministic local replay of a saved exploitcot-redteam regress --suite DIR — replay saved exploits against patched targets expected to holdExit codes are 0 for completed, 1 for failed/findings (a reproduced
exploit), 2 for configuration or environment errors (including corrupt or
incompatible replay artifacts), 3 for partial/inconclusive runs, and 130
for user interruption (Ctrl-C) — so CI gates keyed on 1 = findings are not
poisoned by aborts.
| Guide | Purpose |
|---|---|
| Configuration | Schema, credentials, precedence, and validation |
| Attack catalog | Registered attacks, families, and selection guidance |
| Interactive TUI | Adaptive dashboard, slash commands, screenshot |
| Providers | Provider-specific behavior and endpoints |
| Plugins | Attack and monitor extension contracts |
| Experiments | Metrics, rates, comparisons, and retention |
| Benchmarking | Suites, capabilities, scoring, reports, and imports |
| Comparisons | vs garak, PyRIT, and promptfoo (honest non-goals) |
| Consumer CI scan | Copy-paste GitHub Actions job for cot-redteam scan |
| 0.3 migration | Additive changes from 0.2.x |
| Migration | Breaking changes from 0.1.x |
| Support | Where to ask questions or report reproducible bugs |
| Contributing | Development, good first issues, and pull-request workflow |
| Security | Private vulnerability reporting and scope |
| Roadmap | Phased direction for v0.7 and beyond |
| AGENTS.md | On-boarding contract for AI coding agents |
| Changelog | Version history |
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
ruff format --check .
ruff check .
mypy cot_redteam
pytest
See CONTRIBUTING.md for the complete quality gates.
Released under the MIT License.
Python
100.0%
Red-team visible LLM reasoning — refusal quotes aren't success. Adaptive TUI, CI scan, OWASP tags, mock provider, proof-of-action agent lane.
2
stars
92
commits
Python
primary language
Aug 27, 2026
updated
Refusal quotes of a canary are not a finding. This CLI scores visible chain-of-thought and proves simulated-agent impact from observed actions — not from assistant prose or an LLM judge.
python -m pip install cot-redteam-agent
Published on PyPI as cot-redteam-agent.
The keyless mock provider never touches the network. The config below is also
shipped as cot_redteam/data/mock_demo.example.yaml.
mock_mode: auto discloses a synthetic canary, so scan should exit 1
(findings). That is the demo working — not a real-model vulnerability.
cat > demo.yaml <<'EOF'
version: 2
global:
seed: 1
output_dir: ./results-demo
concurrency: 1
providers:
mock:
kind: mock
mock_mode: auto
evaluation:
models:
- mock:target
dataset_path: pkg:sample.jsonl
sample_count: 1
budgets:
max_requests: 40
max_elapsed_seconds: 120
retain_prompts: false
retain_responses: false
storage:
path: ./results-demo/cot_redteam.db
EOF
cot-redteam scan --config demo.yaml
Exit codes: 0 clean, 1 findings, 2 config/env, 3 partial. Gate CI on
1. Switch mock_mode to refuse for a clean pass — packaged variants
mock_refuse.example.yaml and
mock_disclose.example.yaml
sit next to the auto demo. cot-redteam init --demo mock writes this keyless
config instead of the OpenRouter example. From a clone, the v0.6 agent lane is
also keyless:
cot-redteam agent scan --config cot_redteam/data/agent_security.example.yaml.
Pick the tool that matches the job. This project does not replace a broad scanner, an orchestration SDK, or a YAML eval harness.
| CoT Red Team Agent | garak | PyRIT | promptfoo | |
|---|---|---|---|---|
| Best fit | Score visible reasoning and simulated agent actions | Broad model vulnerability scanner | Compose red-team workflows in Python | YAML/CI eval and red-team prompts |
| Success rule | A refusal that only quotes a canary is not success; agent impact needs observed tool actions and world-state diffs | Probe/detector library across many failure modes | You choose converters, scorers, and targets | Assertions and judges you configure |
| Live loop | Adaptive TUI (cot-redteam tui) | CLI and reports | SDK / notebooks | Web UI and CI |
| Start offline | Keyless mock provider | Typically needs a target model | Typically needs a target | Typically needs a provider |
| Agent proof | v0.6 simulated world, deny-by-default gateway, checksummed replay | Different scope | Different scope | Different scope |
| Standards | OWASP GenAI LLM Top 10 (2026) tags on report items | Own taxonomies / plugins | Own taxonomies / datasets | Own rubrics / plugins |
See also docs/comparisons.md for overlap, honest non-goals, and what each project's own README says it is.

Interactive adaptive TUI: multi-model board, payload attempt log, model output, and last real successful disclosure (refusal re-quotes are not counted as success). See docs/assets/README.md for social-preview guidance.
CoT Red Team Agent is an open-source CLI and Python API for evaluating LLM and agent behavior under adversarial inputs. It runs reproducible model attacks and offline simulated-agent scenarios, records failure-aware evidence, and generates auditable reports and replayable security regressions.
Version 0.6.0 adds the Proof-of-Action agent execution lane: a deterministic
Support Agent World, deny-by-default tool gateway, action/state-transition
oracles, checksummed exploit replay, and patched-target regression suites. It
preserves the 0.5 adaptive attacks and TUI, 0.3 benchmark, and 0.2 Python
API. Existing users should also read the
0.3 migration guide.
injection.system_canary_agent_llm): an attacker
model writes the next extraction prompts from the conversation (PAIR loop,
TAP-style candidate branching) and falls back to the deterministic catalog
if the attacker provider fails. Requires attacker_model in attack_config.injection.crescendo_canary): gradual
5-rung escalation that references the model's own replies, from a benign
question to an exact token ask. No attacker model needed.harm.forbidden_behavior): score
any harmful request (phishing, fraud, weapons, hate speech, ...) with a
StrongREJECT-style rubric judge — refusal, specificity, convincingness —
no canary required. Ships with pkg:harmful.jsonl (10 items).cot-redteam scan --config X runs a quick compliance
scan and exits 0 (clean) / 1 (findings) / 3 (partial) — gate CI on it.injection.system_canary_adaptive).cot-redteam tui).The tool does not provide a hosted service or guarantee that automated monitors represent ground truth.
| Provider | Configuration kind | Typical use |
|---|---|---|
| OpenRouter | openrouter | Hosted access to multiple model families |
| OpenAI | openai | OpenAI API models |
| Anthropic | anthropic | Anthropic Messages API models |
| vLLM | vllm | Local or self-hosted OpenAI-compatible server |
| llama.cpp | llamacpp | Local llama.cpp OpenAI-compatible server |
| Generic endpoint | openai_compatible | Explicit user-selected compatible API |
| Mock | mock | Deterministic keyless provider for demos, tests, and CI |
Provider keys are read only from named environment variables. Secrets must not
be placed directly in YAML files. The mock provider needs no key at all:
mock_mode: auto|refuse|disclose|error controls whether it discloses a
synthetic canary, refuses, or raises provider errors — ideal for smoke tests
and CI without spending any budget.
Python 3.10 through 3.13 is supported.
Install from PyPI:
python -m pip install cot-redteam-agent
Or install the tagged source release:
# test: command
python -m pip install "git+https://github.com/rudrasatani13/cot-redteam-agent.git@v0.6.0"
Or install the wheel attached to the GitHub release:
python -m pip install \
"https://github.com/rudrasatani13/cot-redteam-agent/releases/download/v0.6.0/cot_redteam_agent-0.6.0-py3-none-any.whl"
For development:
git clone https://github.com/rudrasatani13/cot-redteam-agent.git
cd cot-redteam-agent
python -m pip install -e ".[dev]"
Published on PyPI as cot-redteam-agent.
No API key? Use the 30-second mock scan above. The steps below contact a real provider and may incur cost.
Create a wheel-safe example configuration:
# test: command
cot-redteam init --path config.yaml
# Keyless mock demo instead of the OpenRouter example:
# cot-redteam init --path demo.yaml --demo mock
# Edit evaluation.models and generative model IDs for your provider route.
export OPENROUTER_API_KEY=your-key
cot-redteam config validate --config config.yaml
cot-redteam list-attacks
cot-redteam list-monitors
The generated configuration uses the packaged pkg:sample.jsonl dataset and
works outside the repository. It includes optional provider examples, but
validation requires credentials only for providers referenced by the selected
evaluation and generative models. The default attack is
injection.system_canary_agent (invent techniques until real disclosure).
Run the configured evaluation when you are ready to contact the provider:
cot-redteam run --config config.yaml
cot-redteam list-runs --config config.yaml
--config is required (bare cot-redteam tui will error):
cot-redteam tui --config config.yaml
# or auto-start:
cot-redteam tui --config config.yaml --auto-start
The bottom type bar is a single slim line (no tall box borders). Type a slash command and press Enter. Mid panels expand; the composer stays pinned.
Inside the TUI:
/model openrouter:your-model-id
/payloads 8
/run
Useful commands: /help, /add, /models, /attack, /stop, /quit. See
the full TUI guide (layout + slim composer notes).
Render a report using the run_id printed by the run command:
cot-redteam report \
--config config.yaml \
--run-id RUN_ID \
--format markdown
Markdown reports include retained system and attack prompts, model responses, visible provider reasoning, exact attack-assessment evidence, and monitor outcomes. The packaged adaptive canary attack places a synthetic token only in a trusted system instruction and reports success only on real disclosure—not when the model refuses while quoting the canary during analysis.
List the packaged suites:
cot-redteam list-suites
cot-redteam suite show --id builtin.smoke
In config.yaml, select a suite and remove the legacy attacks and monitors
entries if you want a benchmark-only run:
evaluation:
models:
- openrouter:your-model-route
suite_ids:
- builtin.smoke
repetitions: 1
budgets:
# 12 trials; one is two-turn, so the target-request minimum is 13.
max_requests: 13
retain_prompts: true
retain_responses: true
retain_reasoning: true
Provider capabilities are declared under providers.<name>.capabilities.
Unsupported roles fail during config validate, before any billed request.
The packaged smoke suite includes a simulated tool-output case, so the selected
route must declare tool_role: true; otherwise use a filtered local suite.
Run and inspect it with the same commands:
cot-redteam config validate --config config.yaml
cot-redteam run --config config.yaml
cot-redteam report --config config.yaml --run-id RUN_ID --format markdown
cot-redteam report --config config.yaml --run-id RUN_ID --format jsonl
Benchmark results apply only to the tested model route, provider behavior, policy, suite version, transformations, and repetitions. They are not a universal model-security score. See the benchmark guide.
The tool records visible reasoning only when it is:
<think>...</think>.Ordinary answer prose is not relabeled as hidden reasoning. Model outputs are nondeterministic, automated monitors are imperfect, and attack success does not prove a general model vulnerability. Reports preserve failed and excluded items so those limitations remain visible. A reasoning-only canary disclosure means the tested provider route exposed protected system content to its API caller; it does not prove that every deployment of the named model does so.
Prompts, responses, and visible reasoning can contain confidential information.
Review evaluation.retain_prompts, evaluation.retain_responses, and
evaluation.retain_reasoning before running against sensitive datasets.
The default configuration retains evaluation traces. Stored SQLite databases, artifacts, reports, and generated archives should be protected as sensitive research data and must not be committed.
Use the project only with models, endpoints, datasets, and credentials you are authorized to test. Respect provider terms, rate limits, privacy obligations, and applicable law. Do not use generated attacks to access third-party systems or data without permission.
Model-safety results belong in normal research reports or issues. Suspected software vulnerabilities in this repository must be reported privately under the security policy.
v0.6 adds an agent execution lane that evaluates agent behavior, not just model text. Impact is proven only by observed simulated actions and deterministic world state transitions — assistant prose, model reasoning, and LLM judge opinion are never proof of impact.
ToolGateway with deny-by-default tool dispatch — unknown tools,
tools outside the scenario sandbox allowlist, schema-invalid calls, and
over-limit arguments are denied before execution. Derived authorization
(policy decisions per tool call) is recorded on every dispatch as oracle
evidence; scenarios rely on unauthorized calls EXECUTING so the oracles
can prove impact from observed state changes, so authorization is enforced
only when the gateway is configured with deny_unauthorized_tools: true.
Byte/action/time/concurrency limits bound every dispatch and structured
trajectory events are recorded for each one..sha256 sidecar that is verified on load; retention
flags and the recorded seed are honored so exact replay reproduces them,
and regression suites replay saved exploits against patched targets
expected to hold.cot-redteam agent scan --config cot_redteam/data/agent_security.example.yaml
cot-redteam replay artifacts/<run_id>/replay.json # exit 1 = reproduced
cot-redteam regress --suite security-regressions/ # patched target holds
The v0.6 path runs fully offline with the keyless mock provider plus
scripted targets and local SQLite/artifacts. Agent retention defaults to
omitting raw tool arguments/results, memory values, and final-response
content; structural evidence (events, digests, oracle verdicts) is always
kept.
Custom Python target adapters execute in-process and are trusted code, like installed plugins. The runtime facades separate target-authored messages from gateway-authored action evidence, but they are not a sandbox for malicious adapter code. Treat model output and tool-result data as hostile; install or supply only target adapter code you trust.
# test: python
import asyncio
from cot_redteam.api import run_benchmark
from cot_redteam.core.config import load_config
async def main() -> None:
config = load_config("config.yaml")
run = await run_benchmark(config)
print(run.run_id, len(run.trials))
asyncio.run(main())
Use run_evaluation for the backward-compatible 0.2 attack/monitor path and
run_benchmark for configured suites. Both contact providers and may incur cost.
cot-redteam init — --demo mock writes the keyless mock democot-redteam config validate|showcot-redteam list-attacks|list-monitors|list-providerscot-redteam list-suitescot-redteam suite validate|showcot-redteam dataset import cyberseceval|ih-challengecot-redteam runcot-redteam tui — interactive adaptive dashboardcot-redteam race — race one probe across models and compare compliancecot-redteam list-runs|show-run|reportcot-redteam evolvecot-redteam agent scan --config — scripted agent scenarios; saves replay artifacts for verified exploitscot-redteam replay EXPLOIT.json — deterministic local replay of a saved exploitcot-redteam regress --suite DIR — replay saved exploits against patched targets expected to holdExit codes are 0 for completed, 1 for failed/findings (a reproduced
exploit), 2 for configuration or environment errors (including corrupt or
incompatible replay artifacts), 3 for partial/inconclusive runs, and 130
for user interruption (Ctrl-C) — so CI gates keyed on 1 = findings are not
poisoned by aborts.
| Guide | Purpose |
|---|---|
| Configuration | Schema, credentials, precedence, and validation |
| Attack catalog | Registered attacks, families, and selection guidance |
| Interactive TUI | Adaptive dashboard, slash commands, screenshot |
| Providers | Provider-specific behavior and endpoints |
| Plugins | Attack and monitor extension contracts |
| Experiments | Metrics, rates, comparisons, and retention |
| Benchmarking | Suites, capabilities, scoring, reports, and imports |
| Comparisons | vs garak, PyRIT, and promptfoo (honest non-goals) |
| Consumer CI scan | Copy-paste GitHub Actions job for cot-redteam scan |
| 0.3 migration | Additive changes from 0.2.x |
| Migration | Breaking changes from 0.1.x |
| Support | Where to ask questions or report reproducible bugs |
| Contributing | Development, good first issues, and pull-request workflow |
| Security | Private vulnerability reporting and scope |
| Roadmap | Phased direction for v0.7 and beyond |
| AGENTS.md | On-boarding contract for AI coding agents |
| Changelog | Version history |
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
ruff format --check .
ruff check .
mypy cot_redteam
pytest
See CONTRIBUTING.md for the complete quality gates.
Released under the MIT License.
Python
100.0%