Aethex Python SDK
Official Python client for Aethex — a multi-domain AI threat verification API with explainable reasoning chains.
Aethex runs threat events through 10 deterministic reasoning engines and returns a verdict with severity, confidence, and a traceable reasoning chain. Same engines work across three product domains:
- Cyber — SOC alerts, intrusion patterns, insider threats
- Finance — AML, sanctions screening, FATF typologies
- LLM safety — agent failure modes, prompt injection, tool-use exfiltration
Verdicts are deterministic. Same input produces the same output every time, with the same audit trail. This is the core differentiator vs LLM-only detection systems.
Install
pip install aethex
No external dependencies. Pure stdlib (urllib, json).
Quick start
from aethex import AethexClient
client = AethexClient(api_key="aex_live_...")
# Cyber threat analysis
verdict = client.cyber.analyze(events=[
{"type": "failed_login"},
{"type": "failed_login"},
{"type": "successful_login", "suspicious": True},
{"type": "privilege_escalation", "suspicious": True},
{"type": "lateral_movement", "suspicious": True},
])
print(verdict["final_severity"]) # CRITICAL
print(verdict["final_confidence"]) # 0.92
print(verdict["verdict"]) # human-readable summary
Three product domains
# Cyber
client.cyber.analyze(events=[...])
# Finance (AML / sanctions / fraud)
client.finance.analyze(events=[
{"type": "ofac_full_match", "suspicious": True},
{"type": "sanctioned_geography_routing", "suspicious": True},
])
# LLM safety
client.llm.analyze(events=[
{"type": "external_document_retrieval"},
{"type": "instruction_override_detected", "suspicious": True},
{"type": "tool_use_data_exfiltration", "suspicious": True},
])
# Discover the canonical LLM event vocabulary
mapping = client.llm.vocabulary()
Account operations
# Audit log export (compliance)
audit = client.account.export_audit(format="json", from_="2026-01-01")
# Customer-tunable severity weighting
client.account.replace_loss_matrix({
"failed_login": 0.5, # downweight noisy events
"external_transfer": 5.0, # upweight critical events
})
# Webhooks for real-time alerts
webhook = client.account.create_webhook(
url="https://your-app.com/aethex-webhook",
threshold="CRITICAL",
)
# Save webhook["secret"] now -- it's shown only once.
deliveries = client.account.list_deliveries(webhook["id"])
Error handling
from aethex import (
AethexAuthError,
AethexRateLimitError,
AethexValidationError,
AethexConnectionError,
AethexError,
)
try:
verdict = client.cyber.analyze(events=[...])
except AethexAuthError:
# 401 — bad / missing / revoked API key
...
except AethexRateLimitError:
# 429 — back off and retry
...
except AethexValidationError as e:
# 400 — request body malformed
print(e.response)
except AethexConnectionError:
# network / timeout / DNS / SSL
...
except AethexError:
# catch-all for anything Aethex-related
...
What you get back
Every analyze call returns a verdict dict with:
final_severity—LOW/MEDIUM/HIGH/CRITICALfinal_confidence— 0.0 to 1.0verdict— human-readable summaryaction— recommended operational responseengines— per-engine outputs from all 10 reasoning enginesnyaya— the formal reasoning chain that produced the verdictchakravyuha— defense-in-depth layers breacheddisagreement— when engines disagree, the system surfaces uncertainty rather than producing false confidence
See the API documentation for the full verdict shape.
Configuration
client = AethexClient(
api_key="aex_live_...",
base_url="https://aethex-api-1yqe.onrender.com", # default
timeout=30, # seconds
)
Status
Alpha. APIs are stabilizing. Breaking changes possible until 1.0.
License
MIT. See LICENSE for details.
Built by Aethex. Questions: open an issue at the GitHub repo.
Release files for aethex 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aethex-0.1.0.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aethex-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.7 kB
Release files / aethex-0.1.0.tar.gz
| Download URL | aethex-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b022d3bd5b4e56f028e20734bbc4cf715b23af0143c5b0711b0d25e81a5a8c6
|
|
BLAKE2b-256 checksum How to use checksums |
f0bbc45f8c83e442e07361b62475f59729162e3e4ffb878216933d112ee6c0ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / aethex-0.1.0-py3-none-any.whl
| Download URL | aethex-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba90ad3fe37e1a0bdd90eb12c852daeae722cd3864cee22de21e9fea692934ff
|
|
BLAKE2b-256 checksum How to use checksums |
28557739bef7fb9c6d4a8d412adec4aed876bea49ecd090c635a7c0dae6e9028
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|