Metadata-Version: 2.4
Name: spectral-guard
Version: 0.1.0
Summary: O(1) Topological Wormhole Rejection for Hallucination-Free Agentic AI
Home-page: https://github.com/WasimWarrior91/spectral-guard
Author: Shaik Wasim Akram
Author-email: wasimakramshaik91@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.0.0
Requires-Dist: scipy>=1.11.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: jax[cpu]>=0.4.13
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# SpectralGuard 🛡️

[![PyPI version](https://badge.fury.io/py/spectral-guard.svg)](https://badge.fury.io/py/spectral-guard)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![CI/CD](https://github.com/waveinity/spectral-guard/actions/workflows/python-app.yml/badge.svg)](https://github.com/waveinity/spectral-guard/actions/workflows/python-app.yml)

**SpectralGuard** is an $O(1)$ mathematical circuit-breaker for Neuro-Symbolic Agentic AI. 

It prevents Large Language Models (LLMs) from writing hallucinated or logically flawed connections into your Knowledge Graph (Neo4j) by enforcing strict topological boundaries. By treating the knowledge graph as an optimal expander network, SpectralGuard intercepts "Ontological Wormholes" in real-time using first-order perturbation on the Fiedler vector.

Built for sovereign-cloud, enterprise-scale AI in Energy, Finance, and Healthcare.

## 🚀 The Paradigm Shift
Standard RAG relies on semantic similarity, which is fundamentally stochastic. SpectralGuard shifts Agentic memory to **Geometric Certainty**:
* **$O(1)$ Synchronous Validation:** Uses JAX to calculate the Combinatorial Laplacian perturbation in `<5ms`.
* **$O(n \log n)$ Asynchronous Recalibration:** Uses IRLM (Implicitly Restarted Lanczos Method) with selective reorthogonalization on the Normalized Laplacian to guarantee long-term scale-free integrity.
* **Self-Correcting Agents:** Integrates natively with LangGraph to turn hallucination attempts into productive reflection loops.

## 📦 Installation

```bash
pip install spectral-guard
