Skip to main content

Python SDK for Redraven (fireraven.ai) — The AI agents redteaming platform.

Project description

redraven (Python SDK)

The official Python SDK for Redraven — the LLM red-teaming and policy-evaluation platform from fireraven.ai.

Redraven generates adversarial prompts, evaluates your LLM's responses against your safety policies and certifications, and surfaces failures so you can harden your AI products.

This SDK lets you drive the full Redraven flow from your own Python code:

  1. Generate (or pick) a test dataset on Redraven.
  2. Run each test case locally through your own LLM — your model API key never leaves your process.
  3. Submit responses back to Redraven for scoring; receive a summary you can act on.

The SDK talks only to public endpoints on the Redraven backend, authenticated with your organization API key (issued from the Redraven app).

Platforms

Installation

Install from PyPI:

uv add redraven
# or
pip install redraven

uv is preferred for reproducible installs.

Quick start

import asyncio
import redraven

async def my_llm(prompt: str) -> str:
    # Call your own LLM here. Your key stays in your process.
    return f"echo: {prompt}"

async def main():
    async with redraven.Client() as client:  # reads REDRAVEN_API_KEY + REDRAVEN_BASE_URL
        handshake = await client.call_agent(
            test_id="<your-existing-test-id>",
            llm=my_llm,
            concurrency=4,
        )
        await client.wait_for_evaluation_ready(test_id="<your-existing-test-id>")
        result = await client.get_eval_summary(
            test_id="<your-existing-test-id>",
            expected_cases=handshake.expected_cases,
        )
        print(result.model_dump())

asyncio.run(main())

Core methods

Sequence: dataset ready (generate_test / wait_for_dataset_ready) → call_agent (must finish; submits all case responses) → wait for eval (wait_for_evaluation_ready and/or get_eval_summary(..., wait_for_completion=True)) → get_eval_summary to read the summary if you waited separately. See the user guide for the full table.

Documentation

For private contributor documentation, use the repository internal docs.

License

Proprietary — © fireraven.ai. Contact us if you'd like to integrate Redraven into your product.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redraven-0.1.4.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redraven-0.1.4-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file redraven-0.1.4.tar.gz.

File metadata

  • Download URL: redraven-0.1.4.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for redraven-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7d19ed4a7b109762aee9b1ba588e87f632e43f0af1cf6b492274db1a133d4220
MD5 d36eab037862362df58d37e2cc9bb5ce
BLAKE2b-256 a4c6ce8b92928da05c25cb8da439368f97c9ef59980ac9c286b4696915fb2295

See more details on using hashes here.

File details

Details for the file redraven-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: redraven-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for redraven-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ac40c2775b3dbecb6e9531325082ca5ded25d49c6d8a939d1ebcc33c4868c21a
MD5 759e9c7656a5e455d4eb547f44bd7fa0
BLAKE2b-256 2da0bce9fedb162c5735f16d22f753859a2e67791b142eedbbfb1c9bfddb4b5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page