Skip to main content

EVE CoreGuard SDK

AI Governance Enforcement in One API Call. Signed, replayable evidence for every AI/credit decision.

Website · EVE CoreGuard · Verify a signed record · Pricing · PyPI

PyPI version Python versions

EVE CoreGuard intercepts AI-generated decisions before execution, evaluates them against policy, and returns an auditable, cryptographically signed enforcement verdict — a record that reconstructs deterministically and verifies offline, so an examiner can confirm why a decision was allowed, denied, or modified, years later.

Built by EVE NeuroSystems — Decision Evidence Infrastructure for regulated AI — for lenders, banks, and fintechs navigating SR 11-7 model risk, ECOA / fair-lending examination, and the EU AI Act.

API endpoint

https://api.evecore.com is the canonical EVE API endpoint.

https://api.eveaicore.com remains fully supported and reaches the same production platform — same service, same database, same signing key. Hostname is not an input to tenant resolution, policy evaluation, authority, certificates, idempotency or execution-token validity, so the same credential and body produce the same result on either.

Existing integrations pinned to the legacy host keep working with no change:

CoreGuardClient(api_key="...", base_url="https://api.eveaicore.com")

There is no deprecation date. The legacy alias is kept indefinitely.

Install

pip install eve-coreguard

Quick Start

from eve_coreguard import CoreGuardClient

client = CoreGuardClient(
    api_key="eve_sk_...",
    base_url="https://api.evecore.com",  # or http://localhost:8000
)

# Evaluate a proposed lending decision against policy
result = client.evaluate(
    tenant_id="bank_001",
    proposed_action={"type": "loan_approval", "amount": 250000, "currency": "USD"},
    model_output={"decision": "approve", "confidence": 0.91},
    context={
        "credit_score": 580,
        "debt_to_income": 0.52,
        "employment_verified": False,
    },
    policy_set="lending_v1",
)

if result.blocked:
    print(f"BLOCKED: {result.decision.action}")
    print(f"Risk: {result.risk.score} ({result.risk.level})")
    for v in result.policy_violations:
        print(f"  - {v.policy_id}: {v.description}")
    if result.liability_prevented:
        print(f"Exposure prevented: {result.liability_prevented.estimated_exposure}")

Core Methods

Policy Discovery

# Enumerate the full catalog with metadata
for p in client.list_policies():
    print(p.policy_id, p.version, p.domain, p.jurisdiction, p.rule_count)

# Filter by regulatory domain
fair_lending = client.list_policies(domain="fair_lending")

# Inspect one pack (the policy_id is what you pass to evaluate)
info = client.get_policy("securities_trading_v1")
# info.policy_id, info.domain, info.jurisdiction, info.rule_count, info.notes

# Just the ids
ids = client.list_policy_sets()

Decision Enforcement

result = client.evaluate(
    tenant_id="org_001",
    proposed_action={"type": "loan_approval", "amount": 250000},
    model_output={"decision": "approve", "confidence": 0.91},
    context={"credit_score": 580, "debt_to_income": 0.52},
    policy_set="lending_v1",
)
# result.decision.status: ALLOWED | BLOCKED | MODIFIED
# result.risk.score: 0.0-1.0
# result.policy_violations: list of violated rules
# result.regulatory_impact: ECOA, TILA, etc.
# result.counterfactual: what would have passed
# result.liability_prevented: estimated exposure
# result.audit: cryptographic audit trail

AI Output Verification

vr = client.verify(
    ai_output="The capital of France is Paris.",
    confidence=0.9,
    domain="factual",
)
# vr.passed / vr.blocked
# vr.crd — Confidence-Reality Divergence score
# vr.veto.type — pass | soft_veto | hard_veto | charter
# vr.evidence — step-by-step audit chain

Audit & Compliance

# Retrieve cryptographic proof of a governance decision
proof = client.get_proof("proof_abc123")
# proof.content_hash, proof.signature, proof.chain_position

# Export decision history
export = client.export_audit(since="2026-01-01T00:00:00Z", limit=100)
for record in export.records:
    print(f"{record.decision_type}: {record.decision}")

# Verify hash chain integrity
status = client.verify_chain()

Offline eve.decision.v3 Verification (no EVE call, no secret)

from eve_coreguard import verify_decision_record

# record_or_evidence: the signed decision record, or the evidence wrapper
# returned by /v1/decisions/evaluate (include_evidence=true).
r = verify_decision_record(
    evidence,
    public_key_pem=pem,                      # published Ed25519 key (/.well-known/eve-pubkey)
    expected_fingerprint="sha256:...",       # optional out-of-band pin of EVE's key
    request_preimage=request_json,           # optional: proves THIS request produced it
    response_preimage=model_output_json,     # optional: binds the exact model output
    rule_results_preimage=rule_results_json, # optional: binds {decision, sorted rule IDs}
)
r.valid                 # overall — fail-closed on ANY evaluated check
r.schema                # "eve.decision.v3" | legacy label
r.hash_ok, r.signature_ok
r.key_id_ok             # signed signature_key_id vs kid DERIVED from your key
r.fingerprint           # SPKI fingerprint derived from your key (never trusted from JSON)
r.request_digest        # "PASS" | "FAIL" | "NOT_EVALUATED" (preimage not supplied)
r.response_digest, r.rule_results_digest

Absent preimages are reported NOT_EVALUATED — a signature-only check is never presented as full content binding. Requires the verify extra (pip install eve-coreguard[verify]) for Ed25519/ECDSA; HMAC-legacy records are labeled legacy and need the deployment's shared key.

Configuration

Parameter Default Description
api_key required EVE API key (eve_sk_...)
base_url https://api.evecore.com API endpoint
timeout 30.0 Request timeout (seconds)
max_retries 3 Retry count for 5xx errors
raise_on_veto False Raise VetoError on governance blocks

Error Handling

from eve_coreguard import CoreGuardClient, AuthError, RateLimitError, VetoError

try:
    result = client.evaluate(...)
except AuthError:
    print("Invalid API key")
except RateLimitError as e:
    print(f"Rate limited — retry in {e.retry_after}s")
except VetoError as e:
    print(f"Governance veto: {e.veto_type}")

Response Metadata (subscription + rate limits)

Every call captures the response's billing and rate-limit headers. Read them after a call (or after catching an error):

result = client.evaluate(tenant_id="bank_001", ...)

client.subscription_state    # 'active' | 'past_due' | 'restricted' | ...
client.access_state          # 'full_access' | 'warning' | 'read_only' | ...
client.quota_warning         # 'payment_past_due' when degraded-but-allowed, else None
client.rate_limit_limit      # '330' | 'unlimited'
client.rate_limit_remaining  # calls left in the current 60s window (int | None)
client.retry_after           # seconds to wait after a 429 (int | None)

The decision endpoint is rate-limited per org by plan tier (Free 10/min, Pro 330/min, Team 1150/min, Enterprise/Sovereign unlimited). On exhaustion it returns 429 with Retry-After. See Response-Header Contract.

Live Demo (Local)

Run a full end-to-end enforcement decision in 3 steps:

Step 1: Start the server

cd /path/to/EVE
python -m uvicorn saas.app:app --port 8000

Step 2: Install the SDK

cd sdks/coreguard
pip install -e .

Step 3: Run the demo

python run_demo.py

Expected output:

Decision:   BLOCKED
Action:     deny_loan_approval
Risk:       0.6284 (HIGH)
Violations: 3
  - CREDIT_SCORE_MIN: Credit score 580 is below the minimum threshold of 620
  - DTI_LIMIT: Debt-to-income ratio 0.52 exceeds the maximum threshold of 0.45
  - EMPLOYMENT_REQUIRED: Employment verification is missing or unverified
Regulatory: 3 impact(s)
  - ECOA [CRITICAL]: Potential discriminatory lending decision based on credit criteria
  - ECOA [CRITICAL]: DTI threshold may disproportionately affect protected classes
  - TILA [CRITICAL]: Incomplete underwriting verification
Liability:  $125,000 - $625,000
Audit:      audit_8e6db687d87d

Requirements

  • Python 3.9+
  • Zero required dependencies (stdlib urllib only)
  • Optional: cryptography for offline Ed25519/ECDSA evidence verification (pip install eve-coreguard[verify])

Links

About

EVE CoreGuard is built by EVE NeuroSystems LLCDecision Evidence Infrastructure for regulated AI. Every AI/automated decision becomes a cryptographically signed, independently verifiable evidence record that survives procurement and regulatory examination.

Learn more at eveaicore.com.

License

Proprietary. See LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eve_coreguard-0.2.8.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eve_coreguard-0.2.8-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file eve_coreguard-0.2.8.tar.gz.

File metadata

  • Download URL: eve_coreguard-0.2.8.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for eve_coreguard-0.2.8.tar.gz
Algorithm Hash digest
SHA256 1c10402f2f6edc08b843cbbde2227e55dcc5fed16ff5df470cec215298c1f70d
MD5 3886b0efcfba74de6deb8f9f274eb692
BLAKE2b-256 8f163584c11a5d45a18916d6333567a67976a93de7eb808d332d713cf62807b7

See more details on using hashes here.

File details

Details for the file eve_coreguard-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: eve_coreguard-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 35.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for eve_coreguard-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 66eb7d65479ee348677f78f47e75ccaccaf281e541242c70bda2898f08640d34
MD5 bfc3d45a9bed940254e2b7c3dc8dd216
BLAKE2b-256 2ab245500f4849d21284cc6256b63fcf647061af1b047a50019b038a1fc937c1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.9

2 files

This release

0.2.8 This release

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page