SDK Overview
Build agents, datasets, evaluations, scorers, tracing, and hosted workflows with the Dreadnode Python SDK.
The SDK is the Python surface for Dreadnode. Use it when you want agent workflows, datasets, evaluations, and improvement loops that live in code instead of only in the app or CLI.
For installation and account setup, start with /getting-started/installation and /getting-started/authentication. The pages here assume you are already working inside a Python environment and want to automate Dreadnode programmatically.
Mental model
Section titled “Mental model”Think of the SDK as a stack of building blocks:
| Layer | What it does | Start here |
|---|---|---|
| packages / capabilities | reusable artifacts and agent bundles you load or publish | Packages & Capabilities |
Generator | raw model calls with no tool loop or memory | Generators |
Agent | multi-step reasoning loop with tools, hooks, and trajectories | Agents |
Tool | external actions an agent can call | Tools |
| transforms | input rewriting and prompt adaptation | Transforms |
Scorer | reusable numeric metric or pass/fail gate | Scorers |
Dataset / LocalDataset | persistent input sets for analysis and benchmarking | Data |
Evaluation | repeatable benchmark run over a dataset | Evaluations |
| AIRT | prebuilt attack studies and grouped red-team assessments | AIRT |
| studies / samplers | the iterative search loop behind optimization and AIRT | Studies & Samplers |
| tracing | execution telemetry, spans, and artifacts | Tracing |
| optimization / training | local and hosted improvement workflows once your datasets and metrics are stable | Optimization and Training |
SDK vs CLI
Section titled “SDK vs CLI”Use the SDK when you want:
- workflows checked into a repo
- reusable Python abstractions
- notebook, script, or CI execution
- custom scorers, hooks, or tools composed in code
Use the CLI when you want:
- login and profile management
- package publishing and registry operations
- hosted job submission from a shell
- quick inspection without writing Python
The two surfaces are complementary. A common pattern is to build and test locally in Python, then use the CLI for package publishing or job submission.
import dreadnode as dn
dn.configure( server="https://app.dreadnode.io", api_key="dn_...", organization="acme", workspace="research",)A common workflow
Section titled “A common workflow”Most teams end up following this sequence:
- Load or publish the capability, dataset, model, or environment you need.
- Build an
Agentand theToolobjects it needs. - Attach
Scorerobjects that express quality, safety, or policy checks. - Run an
Evaluationor AIRT workflow and inspect the result plus traces. - Move to optimization or training only after the task, dataset, and scoring logic are stable.
If you need the shortest path to “something running,” start with Agents, then come back for Scorers, Data, and Evaluations.