Metadata-Version: 2.5
Name: rai-check-genai
Version: 0.0.1
Summary: Generative AI audits for LLM, RAG, and agentic AI systems
Author: Sai Teja Erukude
License: MIT License
        
        Copyright (c) 2026 Sai Teja Erukude
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agents,generative-ai,hallucination,llm,prompt-injection,rag,responsible-ai
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: pyyaml>=6.0
Requires-Dist: rai-check-core>=0.0.1
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.20; extra == 'anthropic'
Provides-Extra: openai
Requires-Dist: openai>=1.0; extra == 'openai'
Description-Content-Type: text/markdown

# rai-check-genai

Generative AI audit package for LLM, RAG, and agentic AI systems.

It includes:

- LLM safety, refusal, structured-output, latency, token-budget, and provider checks
- RAG faithfulness, citation, provenance, retrieval, tenant-isolation, stale-context, and poisoned-document checks
- Agent trace checks for tool allowlists, permissions, memory use, handoffs, untrusted content, and prompt injection

## CLI

```bash
rai-check genai llm run \
  --suite packages/rai-check-genai/examples/llm_audit_suite.yml \
  --format html

rai-check genai agents run \
  --trace packages/rai-check-genai/examples/customer_support_trace.json \
  --allowed-tools lookup_order,refund_order \
  --format html
```

## Python API

```python
from rai_audit.genai import LLMAudit, load_test_suite

suite = load_test_suite("packages/rai-check-genai/examples/llm_audit_suite.yml")
report = LLMAudit(suite, persist=False).run()
report.to_html("llm_audit_report.html")
```

```python
from rai_audit.genai import AgentAudit, load_trace

trace = load_trace("packages/rai-check-genai/examples/customer_support_trace.json")
report = AgentAudit(trace, allowed_tools=["lookup_order"], persist=False).run()
report.to_html("agent_audit_report.html")
```

Framework adapters normalize traces from common agent runtimes:

```python
from rai_audit.genai import (
    adapt_autogen_messages,
    adapt_langgraph_events,
    adapt_openai_agents_trace,
    adapt_otel_spans,
)
```

See also:

- [OpenAI Agents SDK tracing](https://openai.github.io/openai-agents-python/tracing/)
- [OpenTelemetry GenAI semantic conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/)
