Mathematical verification gate for AI agent actions
Project description
⬡ Nexus Gate
Mathematical verification layer for AI agent actions.
The LLM decides what to do. Nexus proves why it's safe. Not statistics. Derivation paths.
Install
pip install nexus-gate
Quick Start
from nexus_gate_pkg import NexusFullGate
gate = NexusFullGate()
gate.build_knowledge() # ~17 seconds, once
decision = gate.check("merge inbox with archive")
print(decision.verdict) # VERIFIED
print(decision.confidence) # 100
decision = gate.check("launch nuclear missiles")
print(decision.verdict) # NO_MATCH — no proof exists
16 Operations · 19 Properties · 100% Proven
| Category | Operation | Proof | Steps |
|---|---|---|---|
| CRUD | read | read(A) = A | 4 |
| CRUD | create | count + 1 | 6 |
| CRUD | update | count preserved | 5 |
| CRUD | delete | count → 0 | 4 |
| Data | send | count − 1 | 1 |
| Data | merge | count(A) + count(B) | 6 |
| Data | copy | copy(A) = A | 4 |
| Data | move | total preserved | 6 |
| Transform | transform | count preserved | 5 |
| Transform | filter | count ≤ input | 5 |
| Transform | sort | count preserved | 5 |
| Transform | aggregate | processes all | 6 |
| Auth | grant | access + 1 | 6 |
| Auth | revoke | access → 0 | 4 |
| Workflow | schedule | queue + 1 | 6 |
| Workflow | execute | queue − 1 | 1 |
Use with Ollama
pip install nexus-gate[ollama]
ollama serve
python -m nexus_gate_pkg.nexus_ollama --model llama3.2
Use with LangChain / CrewAI / MCP
from nexus_gate_pkg import NexusFullGate
gate = NexusFullGate()
gate.build_knowledge()
# In your agent's tool handler:
decision = gate.check("delete expired sessions")
if decision.verdict == "VERIFIED":
execute()
else:
ask_human()
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nexus_gate-0.1.0.tar.gz
(41.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexus_gate-0.1.0.tar.gz.
File metadata
- Download URL: nexus_gate-0.1.0.tar.gz
- Upload date:
- Size: 41.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a193081737d971490bdac015ed43f216316cee30aa14895eff8cb49e1766fc6
|
|
| MD5 |
dae34c6d191599c580d1f5243dfb9018
|
|
| BLAKE2b-256 |
a69c8a60fe79515526bb42c966749dd3433460ae44e0b30d6982197c932d85f1
|
File details
Details for the file nexus_gate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nexus_gate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 50.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
335a52f787383233e0ca6b0880adb5c0f806ffd9adb7e3bd5fb0a8a00491d0a7
|
|
| MD5 |
86a3bae613e94722ae1127ac8edbf16f
|
|
| BLAKE2b-256 |
bb6a2860bb29741b67a05bc1ac31949414ce13495703a2bb3d1d73e5297ef22e
|