Enterprise data quality layer for AI agents - Validates data quality with Verodat cloud integration. Requires Verodat API key.
Project description
ADRI – Agent Data Readiness Index
Protect AI workflows from bad data with one line of code.
ADRI is a small Python library that enforces data quality before data reaches an AI agent step. It turns data assumptions into executable data contracts, and applies them automatically at runtime.
No platform. No services. Runs locally in your project.
from adri import adri_protected
@adri_protected(contract="customer_data", data_param="data")
def process_customers(data):
# Your agent logic here
return results
What it is
ADRI provides:
- A decorator to guard a function or agent step
- A CLI for setup and inspection
- A reusable library of contract templates
Install & set up
pip install adri
adri setup
What happens when you run it
First successful run
- ADRI inspects the input data
- Creates a data contract (stored as YAML)
- Saves local artifacts for debugging/inspection
Subsequent runs
- Incoming data is checked against the contract
- ADRI calculates quality scores across 5 dimensions
- Based on your settings, it either:
- allows execution, or
- blocks execution (raises)
How ADRI works (high level)
In plain English: ADRI sits between your code and its data, checking quality before letting data through. Good data passes, bad data gets blocked.
Use it in code
from adri import adri_protected
import pandas as pd
@adri_protected(contract="customer_data", data_param="customer_data")
def analyze_customers(customer_data):
"""Your AI agent logic."""
print(f"Analyzing {len(customer_data)} customers")
return {"status": "complete"}
# First run with good data
customers = pd.DataFrame({
"id": [1, 2, 3],
"email": ["user1@example.com", "user2@example.com", "user3@example.com"],
"signup_date": ["2024-01-01", "2024-01-02", "2024-01-03"]
})
analyze_customers(customers) # ✅ Runs, auto-generates contract
What happened:
- Function executed successfully
- ADRI analyzed the data structure
- Generated a YAML contract under your project
- Future runs validate against that contract
Future runs with bad data:
bad_customers = pd.DataFrame({
"id": [1, 2, None], # Missing ID
"email": ["user1@example.com", "invalid-email", "user3@example.com"], # Bad email
# Missing signup_date column
})
analyze_customers(bad_customers) # ❌ Raises exception with quality report
Quick links
- Quickstart – 2-minute integration
- Getting started – tutorial
- How it works – quality dimensions explained
- Data contracts – concept + examples
- Contracts library – reusable templates
- Framework patterns – LangChain, CrewAI, AutoGen, etc.
- CLI reference – CLI commands
- FAQ – common questions
- Examples – real-world examples
Protection modes
# Raise mode (default) - blocks bad data by raising an exception
@adri_protected(contract="data", data_param="data", on_failure="raise")
# Warn mode - logs warning but continues execution
@adri_protected(contract="data", data_param="data", on_failure="warn")
# Continue mode - silently continues
@adri_protected(contract="data", data_param="data", on_failure="continue")
Contract templates (start fast)
ADRI includes reusable contract templates for common domains and AI workflows.
Business domains
AI frameworks
Generic templates
Contributing
- Star the project: https://github.com/adri-standard/adri
- Share feedback/requests in Discussions: https://github.com/adri-standard/adri/discussions
- Contribute new contracts and examples: CONTRIBUTING.md
Use cases
ADRI works with any data format. Sample data files are included for common scenarios:
API Data Validation
Protect your API integrations with structural validation.
- Sample:
api_response.json
Multi-Agent Workflows
Validate context passed between agents in CrewAI, AutoGen, etc.
- Sample:
crew_context.json
RAG Pipelines
Ensure documents have correct structure before indexing.
- Sample:
rag_documents.json
License
Apache 2.0. See LICENSE.
Built with ❤️ by Thomas Russell at Verodat.
One line of code. Local enforcement. Reliable agents.
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
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 verodat_adri-7.0.3.tar.gz.
File metadata
- Download URL: verodat_adri-7.0.3.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dec8007a14227bc1eec6da67616b1ebd82410318a46af552d8dd5788738f05b
|
|
| MD5 |
2e228f3a84b5f1268b0d0d77be9e21b8
|
|
| BLAKE2b-256 |
0c0f9e963da8d547c849d886aced5abcc8894ca1cf190fdfcb5cbd5188012c38
|
File details
Details for the file verodat_adri-7.0.3-py3-none-any.whl.
File metadata
- Download URL: verodat_adri-7.0.3-py3-none-any.whl
- Upload date:
- Size: 312.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20dd0a2dbb4a08dd01afac11c6c57626be7840e0829e1dbbde64918c83f8ed41
|
|
| MD5 |
44dee45eeb8bf96f37f932b53f48f9ab
|
|
| BLAKE2b-256 |
85d6eb08799e84d53d28ac11cf61e60bb5ec8bb04604a97f654df056b754d11c
|