Skip to main content

A lightweight, production-ready AI security SDK for protecting LLM agents.

Project description

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

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

ulockai-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

ulockai-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ulockai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9b6d47a77644794bbb0977baf52748e8a64f5feb0e2e7d10ef68489953238faf
MD5 1cf68dd120515454717816c7adaab3e1
BLAKE2b-256 081f04b0cda6eeb25e2060aaa931fe177df0573b98cfd0e04b2ed5d0c6d08b94

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ulockai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df5b49e3f168822fe8fbc83fe6edb7bb94deaeec7dde286739c57594ad4e2bd9
MD5 56f3dd6116c12c6ce6651ab6da5c0019
BLAKE2b-256 197381935a16b0e98875c62c22c51a4a73861a7fa0eac09d7b9ca1092b021160

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