Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ NETRA_CONVERSATION_CONTENT_MAX_LEN=
# ANTHROPIC_API_KEY=
# GOOGLE_APPLICATION_CREDENTIALS=
# GOOGLE_CLOUD_PROJECT=

# Red-team SDK (Netra.redteam) — beta
# Ordinary REST timeout (seconds) for every red-team API call (default: 20)
NETRA_REDTEAM_TIMEOUT=
# Interval (seconds) between createRun retries while prompts are still generating (default: 2)
NETRA_REDTEAM_GENERATION_POLL_INTERVAL=
# Deadline (seconds) to wait for prompt generation before failing (default: 300)
NETRA_REDTEAM_GENERATION_TIMEOUT=
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.9.0-beta.1] - 2026-08-06

### Added

- **Red-team SDK (`Netra.redteam`, beta)**: Trigger a red-team evaluation against a developer's local agent function via `Netra.redteam.runRedteam({ configId, handler, maxConcurrency? })`. `configId` identifies a red-team config created ahead of time (e.g. in the dashboard) — the config's agent, evaluators, and attack settings are decided there; the SDK only drives the run. `handler` is a plain callback `(prompt, sessionId, turnIndex) => Promise<string | {message, sessionId?}>`, called once per turn — no class to extend. The client fetches the run's whole generated prompt list once, then drives every session's turns itself (bounded local concurrency via `maxConcurrency`, default/cap 5), submitting each turn's result directly. Returns a `RedteamResult` with `results`, `progress`, and `riskScore`. `Ctrl-C` (SIGINT/SIGTERM) cancels any in-flight run server-side before the process exits.

## [1.8.0] - 2026-08-03

### Added
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ You can configure the SDK using environment variables:
| `NETRA_APP_NAME` | Name of your application |
| `NETRA_ENV` | Environment (e.g., prod, dev) |
| `NETRA_TRACE_CONTENT` | Capture prompt/completion content (default: true) |
| `NETRA_REDTEAM_TIMEOUT` | Red-team API request timeout in seconds — an ordinary, bounded REST timeout (default: `20`) |
| `NETRA_REDTEAM_GENERATION_POLL_INTERVAL` | Interval in seconds between `createRun` retries while prompts are still generating (default: `2`) |
| `NETRA_REDTEAM_GENERATION_TIMEOUT` | Deadline in seconds to wait for prompt generation to finish before failing (default: `300`) |

## 🤝 License

Expand Down
Loading