Skip to main content

EdgeGuard

Sub-microsecond, On-Device AI Guardrails Engine in Rust and C++

EdgeGuard provides low-latency, zero-network security scanning and token-by-token guardrails for on-device LLMs (such as llama.cpp, vLLM, and Apple MLX).

Performance Benchmarks (Apple Silicon)

Metric EdgeGuard (Native Rust/C) Standard Python Regex LLM-based Guardrails
One-Shot Latency 0.48 us ~18.50 us 250 ms
Throughput 2,088,000+ scans/sec ~54,000 scans/sec ~4 req/sec
Streaming Latency 0.81 us / token ~12.20 us / token N/A
Streaming Throughput 1,238,000+ tokens/sec ~82,000 tokens/sec N/A
Network Overhead 0 ms (Offline) 0 ms 50-300 ms

Features

  • Sub-Microsecond Latency: Native zero-allocation Rust core.
  • Streaming Guardrails: Real-time token streaming validation with rolling window and immediate abort.
  • Dynamic Policy: Update and hot-reload rules (PII, Prompt Injection, Secrets) from policy.yaml without recompilation.
  • Shannon Entropy: Unsupervised detection of high-entropy raw secret keys and passwords.
  • Base64 Sniffer: Automatic decoding and scanning of obfuscated payloads in memory.

Quick Start

from edgeguard import EdgeGuard

guard = EdgeGuard(policy_path="policy.yaml")
result = guard.scan("Contact me at user@example.com")
print(result)

License

MIT

Release files for edgeguard-sdk 0.5.0

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

Source distribution (sdist)

Source distribution for edgeguard-sdk 0.5.0
File Size Uploaded
edgeguard_sdk-0.5.0.tar.gz 13.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for edgeguard-sdk 0.5.0
File Interpreter ABI Platform
edgeguard_sdk-0.5.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details

Total release size: 363.0 kB

Release files / edgeguard_sdk-0.5.0.tar.gz

Download URL edgeguard_sdk-0.5.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9f69a698d04e2103d9ed4976a373b011a4a22d9ce53a0aab69b834092237849e
BLAKE2b-256 checksum
How to use checksums
be0ab4f42695f500b984dc785a85a9ef58caa3979b883e0cfe4714708fae821d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / edgeguard_sdk-0.5.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL edgeguard_sdk-0.5.0-cp39-cp39-macosx_11_0_arm64.whl
Size 349.6 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
40af2026b90266b0388081755e5fc57c7f3c5c87ba566096994c33191ad579b5
BLAKE2b-256 checksum
How to use checksums
75bd585d1254e0e9176ed71f792459727139b7441a36596abc21fc6f4d0ee92f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

0.9.0

2 release files

0.6.1

1 release file

0.6.0

2 release files

This release

0.5.0 This release

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