Skip to main content
Early Release (v0.1.x) — Attesta is under active development. The core API is functional and tested, but interfaces may change between minor versions. Pin your dependency to a specific version in production. Report issues through this repository’s issue tracker.
Attesta = Attestation + Gate. Every AI agent action passes through a trust gate before it touches the real world.

The Problem: Approval Fatigue

Every AI agent framework has a human-in-the-loop mechanism. LangChain has HumanApprovalCallbackHandler. CrewAI has human_input=True. OpenAI Agents SDK has handoffs. They all do the same thing: pause execution and ask a human to click Yes or No. A human who sees 200 approval prompts a day stops reading them. Approval fatigue turns your safety layer into a rubber stamp.
CapabilityBaseline HITLAttesta
Risk awarenessNone — all actions get the same Y/N5-factor scoring auto-detects risk from function signature
Challenge depthBinary confirm for everythingScales by risk: auto-approve → confirm → quiz → teach-back → multi-party
Approval fatigueHigh — every action promptsLow — only risky actions surface; safe actions pass silently
Audit integrityBasic logs (if any)SHA-256 hash-chained JSONL; tamper-evident
Multi-party supportNoCRITICAL actions require 2+ independent approvers
Trust adaptationNoBayesian trust engine; incidents instantly revoke trust
drop_database() outcome”Confirm? [Y/N]” → instant click → executedScore 0.95 CRITICAL → multi-party review, 30s+ minimum, teach-back + quiz
Illustrative comparison; baseline behavior varies by framework.

The Attesta Pipeline

AI agents can write code, execute shell commands, manage infrastructure, and access sensitive data. Attesta ensures no high-risk action happens without informed human approval — while letting low-risk actions fly through silently.
Attesta approval pipeline: AI Agent → Risk Scoring → Trust Engine → Challenge Branching (LOW/MEDIUM/HIGH/CRITICAL) → Decision → Audit Trail → Trust Feedback Loop

Core Pillars

Risk-Aware Scoring

A 5-factor scoring engine analyzes the function name, arguments, docstring, caller hints, and call novelty. get_user() scores 0.1. drop_database() scores 0.95. The challenge scales accordingly — no manual risk tagging required.

Escalating Challenges

Low-risk actions pass through silently. High-risk actions require the approver to answer auto-generated comprehension questions. Critical actions require multiple independent approvers, each completing a different challenge type. You can’t just click through.

Tamper-Proof Audit

Every decision is recorded in a SHA-256 hash-chained log. Modify any entry and every subsequent hash breaks. attesta audit verify checks the entire chain. attesta audit rubber-stamps flags suspiciously fast approvals.

Adaptive Trust

A Bayesian trust engine tracks each agent’s approval history with exponential decay. Trusted agents see reduced friction over time. A single security incident instantly penalizes trust. Critical actions are immune to trust discounts — always fully gated.

What Makes Attesta Different

  1. Risk is computed, not assumed — The scorer auto-detects risk from the function signature. No manual tagging.
  2. Challenges test comprehension — Quiz and teach-back challenges force the approver to prove they understand the action.
  3. Minimum review times — A wall-clock minimum prevents instant approvals. 3s for medium, 10s for high, 30s+ for critical.
  4. Trust is earned — Agents build trust through consistent safe behavior. Incidents instantly revoke it.

Quick Example

from attesta import gate

@gate
def deploy(service: str, version: str) -> str:
    """Deploy a service to production."""
    return f"Deployed {service} v{version}"

# Attesta intercepts, scores risk, and prompts for approval
deploy("api-gateway", "2.1.0")

Risk Levels at a Glance

ScoreLevelDefault ChallengeExample
0.0 - 0.3LOWAuto-approveget_user_profile()
0.3 - 0.6MEDIUMConfirm (Y/N)send_email()
0.6 - 0.8HIGHQuiz (comprehension)deploy_service()
0.8 - 1.0CRITICALMulti-party approvaldrop_database()

Works With

LangChain, OpenAI Agents SDK, Anthropic Claude, CrewAI, MCP, Vercel AI SDK

Next Steps

Quickstart

Get up and running in 5 minutes

OSS vs Cloud

See the public feature boundary

How It Works

Understand the 4-stage approval pipeline

Integrations

Connect Attesta to your AI framework

Configuration

Customize policies, risk scoring, and trust