Quickstart
The Check Point AI Red Teaming SDK (lakera-red-sdk) lets you run adversarial scans programmatically.
Use it to integrate red teaming into CI/CD pipelines, test custom agent flows, or
automate security assessments without the web UI.
The SDK is outbound-only: your process pulls attack prompts from the Red API over HTTPS, so you don’t need to expose any inbound endpoints or open inbound firewall rules. See SDK Deployment for network requirements, proxy configuration, and runtime details.
Prerequisites
TypeScript
Python
- Node.js 22+
- A Check Point account with Red access enabled
- An API key from the AI Red Teaming platform
Install
TypeScript
Python
Try a Runnable Example
The SDK includes ready-to-run examples to help you get started quickly.
TypeScript
Python
See the examples helper reference for the full list of examples and commands.
Run Your First Scan
Create a scan
Define what you want to test. The target name is reused across scans — if a
target with that name already exists, the SDK uses it.
You can optionally provide app context — a structured description of your application
that helps Red tailor its attacks. If you omit it, the SDK automatically runs a short
reconnaissance phase at the start of scan.run() to learn about your agent.
TypeScript
Python
Alternatively, load the context from a YAML file:
You can also define custom objectives alongside standard ones:
See CustomObjective for the full field reference.
Handle attack sessions
The scan.run() method drives the scan. For each concurrent session, your handler
receives adversarial prompts and submits your agent’s responses.
You can also follow the scan’s progress in the dashboard via
scan.dashboardLink / scan.dashboard_link.
TypeScript
Python
Each session may contain multiple turns (especially with the crescendo strategy).
The async iterator handles this naturally — just keep looping. The finally block
ensures your agent is properly shut down once the session completes or errors out.
Full Example
TypeScript
Python
Next Steps
- See the SDK Reference for all configuration options and types
- Learn about attack categories Red tests for
- Set up AI Guardrails Integration to remediate findings automatically