Skip to main content

Diogenesis SDK

Runtime security for AI applications. Monitors what your AI does — every import, file write, network connection, and subprocess — and alerts when behavior deviates from normal.

Zero dependencies. Pure Python. Works with any AI framework.

Install

pip install diogenesis-sdk

Quick Start

from diogenesis_sdk import activate, status, threat_summary

# Turn on monitoring
activate()

# Check what's happening
print(status())

If it worked, you'll see something like:

{'active': True, 'interceptors': 4, 'total_events': 1200, 'field_coherence': 1.0, ...}

That means Diogenesis is watching every import, file access, network call, and subprocess.

What Can It Do?

from diogenesis_sdk import activate, status, field_state, threat_summary

activate()

# System health — are interceptors running?
print(status())

# Behavioral voltage — per-module coherence scores
print(field_state())

# Threat analysis — what did the xenobot agents find?
print(threat_summary())

Example output:

Threats: 0 | Suspicious: 0
Agents: ['import_guardian', 'file_sentinel', 'network_watcher', 'subprocess_monitor']

Four agents are patrolling your application automatically.

Add Custom Threat Patterns

from diogenesis_sdk import activate, add_pattern, BehavioralPattern

activate()

# Detect: file read followed by network send (possible data leak)
pattern = BehavioralPattern(
    name="api_key_leak",
    description="Sensitive file read followed by outbound network call",
    event_sequence=[
        {"type": "file", "detail_contains": {"path": ".env"}},
        {"type": "network", "classification": "UNEXPECTED"},
    ],
    window_seconds=30,
    severity="CRITICAL",
)
add_pattern(pattern)

Create Custom Agents

from diogenesis_sdk import activate, XenobotAgent, add_agent, investigations

activate()

# Create an agent that specializes in file monitoring
agent = XenobotAgent("file_patrol", domain="file")
add_agent(agent)

# Check investigation findings
print(investigations())

Each agent uses a 5-phase investigation cycle: Observe, Question, Search, Synthesize, Crystallize.

Behavioral Voltage Field

Every module gets a "voltage" score — how closely its behavior matches baseline. Voltage drops before attacks complete.

from diogenesis_sdk import activate, field_state

activate()

state = field_state()
for name, info in state["modules"].items():
    voltage = info["voltage"]
    if voltage < 0.5:
        print(f"WARNING: {name} coherence low ({voltage:.2f})")
    else:
        print(f"OK: {name} stable at {voltage:.2f}")

Core Components

Component What It Does
Interceptors Capture every import, file write, subprocess, and network call
Policy Engine Classify patterns (exfiltration, privilege escalation, shadow imports)
Voltage Field Per-module behavioral coherence — drops before attacks complete
Fibonacci Clock Agent patrols at PHI-ratio intervals (3, 5, 8, 13, 21 cycles)
Xenobot Agents Autonomous investigators that detect anomalies and share learning

Features

  • Zero dependencies — pure Python standard library only
  • 104 automated tests — production-grade
  • Python 3.8+ — works with any AI framework
  • Behavioral baseline — learns "normal", alerts on deviation
  • Graduated response — LOG → WARN → ALERT
  • 5 built-in threat patterns — exfiltration, import chains, write bursts, network scans, shadow imports

Troubleshooting

"ModuleNotFoundError: No module named 'diogenesis_sdk'" Run: pip install diogenesis-sdk (note the hyphen, not underscore)

"ImportError: cannot import name 'activate'" Make sure you have version 0.2.0+: pip install --upgrade diogenesis-sdk

License

Apache License 2.0. Free for commercial and personal use.


Built by Garry Anderson. Behavioral security for the age of autonomous AI.

Metadata

Release files for diogenesis-sdk 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diogenesis-sdk 0.2.1
File Size Uploaded
diogenesis_sdk-0.2.1.tar.gz 43.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for diogenesis-sdk 0.2.1
File Interpreter ABI Platform
diogenesis_sdk-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 81.8 kB

Release files / diogenesis_sdk-0.2.1.tar.gz

Download URL diogenesis_sdk-0.2.1.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c250cbd4a82fa0911295a7eb7812ff4c2bfaf441b0b09519540a0eef8d6bf84b
BLAKE2b-256 checksum
How to use checksums
47195e012f4c7fa1a2626cc455d21e0aac94474b7a8d805502f6c8d46e1c9076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / diogenesis_sdk-0.2.1-py3-none-any.whl

Download URL diogenesis_sdk-0.2.1-py3-none-any.whl
Size 38.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3701f37252c6ef81131064310e1be6e699992360c5340f0d4b67d5527e39922
BLAKE2b-256 checksum
How to use checksums
087bd2a108803be3df40589187e20bc4efa971c1bda831cf98215eefa96a7fb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page