Stress-test your AI endpoints. Fires adversarial inputs, detects failures, tells you what broke.
Project description
Orangutan
Stress-test AI chat endpoints by firing adversarial inputs and reporting failures.
python orangutan.py --url https://your-api/chat
Install
pip install httpx
Usage
python orangutan.py [options]
| Flag | Default | Description |
|---|---|---|
--url |
required | POST endpoint to test |
--header |
— | Request header as KEY:VALUE (repeatable) |
--field |
message |
JSON field name for the input |
--timeout |
10.0 |
Seconds before a request is killed |
--delay |
0.0 |
Pause in seconds between requests |
--mode |
standard |
standard | security | edge | chaos |
--runs |
1 |
Number of times to repeat the full hurdle set |
--output |
— | Save the report to a file path |
Modes
standard — Runs a baseline set of inputs covering common failure patterns: empty strings, very long inputs, repeated characters, and benign but unusual phrasing. Use this for a quick sanity check against any endpoint.
security — Fires prompt injection attempts, jailbreak phrases, role-override instructions, and inputs designed to leak system prompts. Useful for validating that a model or API wrapper has guardrails in place.
edge — Targets boundary conditions: Unicode edge cases, null-like strings, whitespace-only inputs, control characters, and inputs that stress tokenization. Catches crashes and malformed responses that normal testing misses.
chaos — Sends random, malformed, and structurally unexpected payloads. Inputs may be truncated mid-sentence, contain mixed encodings, or be syntactically valid but semantically incoherent. Surfaces instability under unpredictable load.
What it detects
- Empty or null responses from the endpoint
- Slow responses that exceed the configured timeout threshold
- Disallowed phrases present in the response body
- Contradictions across multiple runs for the same input
- HTTP errors (4xx, 5xx)
Example commands
# Run the security hurdle set against a local endpoint with an auth header
python orangutan.py \
--url http://localhost:8080/chat \
--header "Authorization:Bearer mytoken" \
--mode security
# Run the full standard suite 5 times and save the report
python orangutan.py \
--url https://api.example.com/v1/chat \
--runs 5 \
--output results.txt
# Test a custom message field with a 30-second timeout and 1-second delay between requests
python orangutan.py \
--url https://api.example.com/chat \
--field prompt \
--timeout 30.0 \
--delay 1.0 \
--mode edge
File structure
orangutan.py— CLI entry point; parses arguments and orchestrates test runshurdles.py— Input sets for each mode (standard, security, edge, chaos)detector.py— Response analysis logic; identifies failures and anomaliesreporter.py— Formats and outputs results to stdout or filemock_server.py— Local test server for validating Orangutan itself
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orangutan_test-0.1.0.tar.gz.
File metadata
- Download URL: orangutan_test-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1ce3ab0fbf7438f1ad106bf37cb13c650110179d4169401c291f11cb3753ab0
|
|
| MD5 |
246b742c7c9557b12e19ba9665a8d87f
|
|
| BLAKE2b-256 |
91472b8ef8b5c001e70bf84ab97ee98d2bfc8f3eeaa924ba050d653b60cbe1cc
|
File details
Details for the file orangutan_test-0.1.0-py3-none-any.whl.
File metadata
- Download URL: orangutan_test-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9e2c61efeef1fed5775e7f9232c69fa08c32d15b6ee777e4707ba4b20e0986c
|
|
| MD5 |
2ed659b4f353ad099d115083f66295be
|
|
| BLAKE2b-256 |
260a87f4d6b4101bfbb26af62a7be8425d2139091e6077700bcf7f1096c48904
|