Current collected state Current
Observed since 21 Oct, 09:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python SDK for AI Assess Tech - Ethical AI Assessment Platform
The official Python SDK for AI Assess Tech - Assess AI systems for ethical alignment across 4 dimensions: Lying, Cheating, Stealing, and Harm.
AIAssessClient) and async (AsyncAIAssessClient)block_until_pass() for CI/CD gatespip install aiassess
from aiassess import AIAssessClient
# Define your AI callback
def my_ai(question: str) -> str:
# Replace with your actual AI implementation
response = openai.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": question}]
)
return response.choices[0].message.content or ""
# Run assessment
with AIAssessClient(health_check_key="hck_your_key_here") as client:
result = client.assess(callback=my_ai)
print(f"Classification: {result.classification}")
print(f"Passed: {result.overall_passed}")
print(f"Verify at: {result.verify_url}")
import asyncio
from aiassess import AsyncAIAssessClient
async def my_async_ai(question: str) -> str:
response = await openai.chat.completions.acreate(
model="gpt-4",
messages=[{"role": "user", "content": question}]
)
return response.choices[0].message.content or ""
async def main():
async with AsyncAIAssessClient(health_check_key="hck_your_key") as client:
result = await client.assess(callback=my_async_ai)
print(f"Passed: {result.overall_passed}")
asyncio.run(main())
from aiassess import AIAssessClient, AssessProgress
def on_progress(p: AssessProgress):
print(f"[{p.percentage:3d}%] Testing {p.dimension}... ({p.current}/{p.total})")
with AIAssessClient(health_check_key="hck_your_key") as client:
result = client.assess(
callback=my_ai,
on_progress=on_progress,
)
from aiassess import AIAssessClient
with AIAssessClient(health_check_key="hck_your_key") as client:
result = client.block_until_pass(
callback=my_ai,
max_retries=3,
retry_delay_seconds=60,
exit_on_failure=True, # Exits process if AI fails
)
Test your integration without running a full assessment:
with AIAssessClient(health_check_key="hck_your_key") as client:
result = client.assess(
callback=my_ai,
dry_run=True, # Only 5 questions, returns mock scores
)
# Run assessment (dry run)
aiassess assess --key hck_your_key --dry-run
# Show configuration
aiassess config --key hck_your_key
# Verify a result
aiassess verify run_abc123 --key hck_your_key
The AssessmentResult object includes:
| Field | Type | Description |
|---|---|---|
run_id | str | Unique assessment ID |
overall_passed | bool | True if all dimensions pass |
scores | DimensionScores | Scores per dimension (0-10) |
passed | DimensionPassed | Pass/fail per dimension |
classification | str | Personality classification |
verify_url | str | Public verification URL |
result_hash | str | SHA-256 for cryptographic verification |
variance | float | Score variance (< 5 = stable) |
is_stable | bool | True if variance < 5 |
result.scores.lying # 0-10 (higher = more ethical)
result.scores.cheating # 0-10
result.scores.stealing # 0-10
result.scores.harm # 0-10
result.scores.overall # Average of all dimensions
| Classification | Description |
|---|---|
| Well Adjusted | Ethical AI - passes all thresholds |
| Misguided | Minor ethical concerns |
| Manipulative | Significant ethical issues |
| Psychopath | Fails ethical assessment |
from aiassess import (
AIAssessClient,
AIAssessError,
AuthenticationError,
RateLimitError,
ValidationError,
AssessmentError,
)
try:
with AIAssessClient(health_check_key="hck_your_key") as client:
result = client.assess(callback=my_ai)
except AuthenticationError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited, retry after {e.retry_after}s")
except ValidationError as e:
print(f"Invalid input: {e.message}")
except AssessmentError as e:
print(f"Assessment failed: {e.message}")
except AIAssessError as e:
print(f"SDK error: {e.code} - {e.message}")
client = AIAssessClient(
health_check_key="hck_...",
base_url="https://www.aiassesstech.com", # API base URL
timeout=30.0, # Per-request timeout (seconds)
overall_timeout=360.0, # Total assessment timeout (seconds)
max_retries=3, # Retry attempts for transient errors
)
| Variable | Description |
|---|---|
AIASSESS_KEY | Health Check Key (used by CLI) |
Looking for the TypeScript SDK? See packages/sdk-ts.
MIT License - see LICENSE for details.
Built with ❤️ by AI Assess Tech
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.7.0 | 7 Jan 2026 | 13 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 09:56 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:08f553b8b939ad27d8a2d40e439be075440105abe96ef68d1a5a09ad9b13bf53