Skip to main content

Official Python SDK for Aethex — multi-domain AI threat verification (cyber, finance, LLM safety) with explainable reasoning chains.

Project description

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_severityLOW / MEDIUM / HIGH / CRITICAL
  • final_confidence — 0.0 to 1.0
  • verdict — human-readable summary
  • action — recommended operational response
  • engines — per-engine outputs from all 10 reasoning engines
  • nyaya — the formal reasoning chain that produced the verdict
  • chakravyuha — defense-in-depth layers breached
  • disagreement — 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.

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

aethex-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

aethex-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file aethex-0.1.0.tar.gz.

File metadata

  • Download URL: aethex-0.1.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for aethex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b022d3bd5b4e56f028e20734bbc4cf715b23af0143c5b0711b0d25e81a5a8c6
MD5 6add02fd7de89a0cf3fc1020e71418d0
BLAKE2b-256 f0bbc45f8c83e442e07361b62475f59729162e3e4ffb878216933d112ee6c0ca

See more details on using hashes here.

File details

Details for the file aethex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aethex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for aethex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba90ad3fe37e1a0bdd90eb12c852daeae722cd3864cee22de21e9fea692934ff
MD5 5819221e593b65590cae16e5cc12537f
BLAKE2b-256 28557739bef7fb9c6d4a8d412adec4aed876bea49ecd090c635a7c0dae6e9028

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