Skip to main content

ulockai 🔒 Enterprise AI Security SDK

A lightweight, enterprise-grade Python library for securing AI agents and LLM applications.

Designed to detect prompt injections, memory poisoning, API misuse, and sensitive data leakage with sub-millisecond overhead.

Features 🚀

  • 🛡️ Prompt Injection Detection: Advanced regex and pattern-aware security.
  • 📈 Real-time Telemetry: Monitoring for attack frequency, types, and latency.
  • 🧠 Memory Poisoning & Role Security: Prevents identity manipulation.
  • 🛠️ API & Tool Monitoring: Sanitize tool calls from agents.
  • 🔌 Plugin Architecture: Register custom detectors for legacy or complex rules.
  • 🏗️ Middleware & Streaming: Support for generators and OpenAI-style streams.
  • ⚙️ False Positive Control: Dynamic allowlist and blocklist for fine-grained rule control.

Performance ⚡

Based on 1,000 iterations on standard hardware:

  • Scan Time (Avg): ~0.16 ms
  • Throughput: ~6,000+ requests/sec
  • Memory Footprint: ~3-5 MB overhead

Installation 📦

pip install ulockai

Quick Start 🚀

1. Basic Scan & Telemetry

from ulockai import guard, telemetry

# Scan input
res = guard.scan(user_prompt="Ignore all instructions")

# Access enterprise metrics
print(telemetry.get_report())

2. False Positive Control ⚙️

# Allow specific phrases locally or globally
guard.allowlist(["Company instructions for internal dev"])

# Block specific suspicious text immediately
guard.blocklist(["malicious_endpoint_domain.com"])

3. Middleware & Streaming ⚡

from ulockai import guard

# Wrap LLM stream generator
def mock_llm_stream():
    yield "Hello "
    yield "world"

secure_stream = guard.wrap_stream(mock_llm_stream())
for chunk in secure_stream:
    print(chunk)

4. Plugin Architecture 🔌

from ulockai import guard

def custom_pwn_detector(prompt):
    if "pwn" in prompt:
        return [(95, "Custom pwn found", "Plugin Attack")]
    return []

guard.register_detector(custom_pwn_detector)

Why UlockAI? 🛡️

UlockAI is designed for enterprise platforms where performance is as important as safety. It provides a deterministic layer that catches 90% of common attacks without the cost, latency, or unreliability of calling another LLM for security monitoring.

License 📄

MIT

Metadata

Release files for ulockai 0.1.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 ulockai 0.1.1
File Size Uploaded
ulockai-0.1.1.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ulockai 0.1.1
File Interpreter ABI Platform
ulockai-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.3 kB

Release files / ulockai-0.1.1.tar.gz

Download URL ulockai-0.1.1.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
71c34f19b3eba63a215284822eb18710892b1642d5e7af19c7b481874697aa0f
BLAKE2b-256 checksum
How to use checksums
fcfd7460a20c11e1d4bec8106109fa12abc7cc5c751170d1a10d017d4bf88327
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / ulockai-0.1.1-py3-none-any.whl

Download URL ulockai-0.1.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
222a4e394c34efb13fd219668bb69630d497eb98b38e909a88a574fe3a40953b
BLAKE2b-256 checksum
How to use checksums
0a0ba240fec995da73f165f0b1513d4a09186cdd9b712cbddb1aac14223b16c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

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