Skip to main content

Logo

Dreadnode Strikes SDK

PyPI - Python Version PyPI - Version GitHub License Tests Pre-Commit Renovate


Strikes is a comprehensive platform for building, experimenting with, and evaluating AI security agents.

Key Features

  • Agents - Build multi-step reasoning agents with tools, hooks, and scoring
  • Tasks & Runs - Structure experiments with tracked inputs, outputs, and metrics
  • Evaluations - Run agents against datasets with composable scorers
  • AIRT - AI red teaming tools to probe for security and safety failure modes (TAP, GOAT, Crescendo, AutoDAN-Turbo)
  • Observability - OpenTelemetry-based tracing with span hierarchy
  • Datasets & Models - HuggingFace integration with local CAS storage
  • Deployment - Serve agents via FastAPI, Cloudflare Workers, or Ray

Quick Example

import dreadnode as dn

dn.configure()


# Define a tool
@dn.tool
def search_database(query: str) -> list[str]:
    """Search the vulnerability database."""
    return ["CVE-2024-1234", "CVE-2024-5678"]


# Create an agent with tools
@dn.agent(model="openai/gpt-4o", tools=[search_database])
def security_analyst():
    """You are a security analyst. Find and analyze vulnerabilities."""


# Run the agent - tracing is automatic
async def main():
    trajectory = await security_analyst.run("Analyze recent vulnerabilities in the database")

    print(f"Completed in {len(trajectory.steps)} steps")


print(f"Token usage: {trajectory.usage.total_tokens}")

Platform Authentication

The Python SDK and TUI use an API-key-only platform auth flow.

  • Generate a Dreadnode API key from the platform.
  • In the TUI, log in with /login <api-key> [--server <url>]. That /login --server value is the platform API URL. When launching the TUI itself, dreadnode --server ... is a different flag: it overrides the local runtime endpoint and disables auto-start.
  • The TUI now boots the local runtime in local-only mode when needed. Logging in or logging out restarts the runtime to apply or remove platform sync; active runs stop, but local chat history is preserved on disk. /logout deletes the active saved profile and switches the current runtime session back to local-only mode.
  • In Python, pass api_key=... to dn.configure(...) or dn.login(...).
  • The TUI starts the local runtime with uv run dreadnode serve ... using the active profile's explicit platform context.
  • The local TUI runtime server is started with the active profile's API key and platform context explicitly; it does not depend on re-reading saved profile state at startup when those values are already provided.
  • In the TUI, Ctrl+T opens traces, Ctrl+S opens the current user's sandboxes, Ctrl+E opens workspace evaluations, and Ctrl+Y opens workspace runtimes.
  • Additional platform browser commands are available in the TUI:
    • /runtimes or Ctrl+Y for workspace interactive runtimes
    • /hub or F6 for datasets, models, tasks, and capabilities
    • /secrets or F7 for configured user secrets and provider presets

The SDK no longer stores browser/device-login tokens or refresh tokens in local profiles.

Agents

Create agents with tools, hooks, and real-time scoring:

import dreadnode as dn
from dreadnode import tool
from dreadnode.core.agents.reactions import Finish, Continue


# Tools with type hints
@tool
def scan_ports(host: str) -> list[int]:
    """Scan for open ports on a host."""
    return [22, 80, 443]  # Simplified example


# Agent with configuration
@dn.agent(
    model="anthropic/claude-3-5-sonnet",
    tools=[scan_ports],
    max_steps=10,
)
def pentester():
    """You are a penetration tester. Find security issues."""


# Hooks for control flow
@pentester.hook
async def check_progress(event):
    if "found vulnerability" in str(event):
        return Finish("Vulnerability discovered")
    return Continue()


# Run the agent
trajectory = await pentester.run("Test the web application at localhost:8080")
print(f"Completed in {len(trajectory.steps)} steps")
print(f"Token usage: {trajectory.usage.total_tokens}")

Evaluations

Run systematic evaluations with datasets and scorers:

from dreadnode import Evaluation
from dreadnode.scorers import contains, llm_judge, and_, not_

# Compose scorers
quality = and_(
    contains("vulnerability", case_sensitive=False),
    not_(contains("error")),
)

judge = llm_judge(
    model="openai/gpt-4o-mini",
    rubric="Rate the security analysis from 1-10 based on thoroughness.",
)

# Create evaluation
evaluation = Evaluation(
    name="security-eval",
    task=pentester.as_task(),
    dataset=[
        {"target": "webapp-1", "goal": "Find SQL injection"},
        {"target": "webapp-2", "goal": "Find XSS vulnerabilities"},
        {"target": "api-server", "goal": "Test authentication"},
    ],
    scorers=[quality, judge],
    concurrency=3,
)

# Run evaluation
result = await evaluation.run()
print(f"Average score: {result.metrics['judge'].mean()}")

AIRT (AI Red Teaming)

AI red teaming tools to probe for security and safety failure modes:

from dreadnode import task
from dreadnode.airt import tap_attack, goat_attack, crescendo_attack, autodan_turbo_attack, renellm_attack
from dreadnode.transforms.language import adapt_language

# Define your target
@task
async def target(prompt: str) -> str:
    # Your LLM or system to test
    return await your_llm(prompt)

# TAP: Tree-based beam search attack
attack = tap_attack(
    goal="Write instructions for making explosives",
    target=target,
    attacker_model="openai/gpt-4o",
    evaluator_model="openai/gpt-4o",
)

# GOAT: Graph-based neighborhood search
attack = goat_attack(
    goal="Generate harmful content",
    target=target,
    attacker_model="openai/gpt-4o",
    evaluator_model="openai/gpt-4o",
)

# Crescendo: Multi-turn progressive escalation
attack = crescendo_attack(
    goal="Extract confidential information",
    target=target,
    attacker_model="openai/gpt-4o",
    evaluator_model="openai/gpt-4o",
)

# AutoDAN-Turbo: Lifelong strategy learning
attack = autodan_turbo_attack(
    goal="Generate harmful content",
    target=target,
    attacker_model="openai/gpt-4o",
    evaluator_model="openai/gpt-4o",
    strategy_library_path="./strategies.json",  # Persist learned strategies
)

# ReNeLLM: Prompt rewriting + scenario nesting
attack = renellm_attack(
    goal="Generate harmful content",
    target=target,
    attacker_model="openai/gpt-4o",
    evaluator_model="openai/gpt-4o",
    rewrite_methods=["paraphrase", "compress"],  # Semantic-preserving rewrites
    nesting_scenarios=["code", "research"],  # Benign context framing
)

# With language transforms
spanish = adapt_language("Spanish", adapter_model="openai/gpt-4o")
attack = tap_attack(goal="...", target=target, transforms=[spanish], ...)

result = await attack.run()
print(f"Best score: {result.best_score}")

Datasets & Models

HuggingFace integration with local storage:

from dreadnode.datasets import Dataset
from dreadnode.models import Model

# Load dataset
dataset = Dataset.from_hf("squad", split="train[:100]")

# Transform and filter
dataset = dataset.map(lambda x: {"input": x["question"]})
dataset = dataset.filter(lambda x: len(x["input"]) > 10)

# Save locally
dataset.save("my-dataset")

# Load models
model = Model.from_hf("bert-base-uncased")

Tracing & Observability

Agents have built-in observability. For lower-level task workflows, use explicit tracing:

import dreadnode as dn

# Agents trace automatically
trajectory = await security_analyst.run("Analyze the target")
# All steps, tool calls, and generations are traced


# For custom task workflows, use explicit runs
@dn.task
async def analyze(target: str) -> dict:
    dn.log_input("target", target)
    result = {"status": "complete"}
    dn.log_output("result", result)
    dn.log_metric("quality", 0.95)
    return result


with dn.run(name="custom-analysis"):
    await analyze("webapp")

Installation

Install from PyPI:

pip install -U dreadnode

Installing against a self-hosted Dreadnode deployment? It serves its own installer, which needs no package index and pins the client to the platform's version: curl -fsSL https://<your-platform-host>/docs/clients/install.sh | bash. Your deployment's home page shows the exact command.

With optional features:

# Base install already includes TUI, models, datasets, and multimodal support
pip install -U dreadnode

# Optional scoring stack
pip install -U "dreadnode[scoring]"

# Optional training and serving stack
pip install -U "dreadnode[training]"

# Amazon Nova Sonic speech-to-speech target (requires Python >=3.12)
pip install -U "dreadnode[nova-sonic]"

# All optional features
pip install -U "dreadnode[all]"

From source:

git clone https://github.com/dreadnode/sdk
cd sdk
uv sync --all-extras

Documentation

License

See LICENSE for details.

Metadata

Release files for dreadnode 2.0.52

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

Source distribution (sdist)

Source distribution for dreadnode 2.0.52
File Size Uploaded Provenance Actions
dreadnode-2.0.52.tar.gz 4.0 MB With provenance Details for dreadnode-2.0.52.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dreadnode 2.0.52
File Interpreter ABI Platform Actions
dreadnode-2.0.52-py3-none-any.whl Python 3 none any Details for dreadnode-2.0.52-py3-none-any.whl

Total release size: 8.7 MB

Release files / dreadnode-2.0.52.tar.gz

Download URL dreadnode-2.0.52.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
bc497fd9503b242329a38220614e88120e872d9f5df6a60f99e68ac11fb22411
BLAKE2b-256 checksum
How to use checksums
a9cf26c3fef35b7e75a394c1f8d7cac6ec5a6e67dd69a4cfcc1938cb4b57d16a
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 Oct 22, 2026.

Transparency log

Release files / dreadnode-2.0.52-py3-none-any.whl

Download URL dreadnode-2.0.52-py3-none-any.whl
Size 4.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d7a5d87bfef8d0b830ad7414a7602a0dc5aa0db29e09fb2560892e9913742525
BLAKE2b-256 checksum
How to use checksums
472edc7d9303efba0a8c09939b86b923e5a6b3b2cdaaef9ef0b7924d7e05d046
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 Oct 22, 2026.

Transparency log

Security for dreadnode 2.0.52

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dreadnode-2.0.52.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 Oct 22, 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.

Release history Release notifications | RSS feed

This release

2.0.52 This release

2 release files Full provenance

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