General
What is Attesta?
What is Attesta?
- Risk scoring — a multi-factor heuristic analyzes function name, arguments, docstring, caller hints, and novelty
- Challenge selection — the risk level determines the challenge type (auto-approve, confirm, quiz, teach-back, or multi-party)
- Verification — the human operator completes the challenge
- Audit — the decision is recorded in a SHA-256 hash-chained audit log
How is Attesta different from RBAC or permissions systems?
How is Attesta different from RBAC or permissions systems?
| Aspect | RBAC | Attesta |
|---|---|---|
| Decision basis | Static role assignments | Dynamic risk scoring per invocation |
| Granularity | Action-level (can/cannot) | Invocation-level (these args, this context) |
| Human involvement | None at runtime | Human verifies each high-risk action |
| Adaptive | No | Yes — trust engine learns from history |
| Audit | Access logs | Tamper-proof hash-chained decision trail |
Which AI frameworks does Attesta support?
Which AI frameworks does Attesta support?
- LangChain (Python and TypeScript)
- OpenAI Agents SDK
- Anthropic Claude (tool use)
- CrewAI
- Vercel AI SDK (TypeScript)
- MCP (Model Context Protocol) — both custom servers and any existing server via the stdio proxy
@gate decorator on any function or the evaluate() method for direct pipeline access.Is Attesta open source?
Is Attesta open source?
Technical
What is the performance overhead of Attesta?
What is the performance overhead of Attesta?
min_review_seconds setting adds intentional latency to prevent rubber-stamping. This is configurable per risk level.Does Attesta support async operations?
Does Attesta support async operations?
@gate decorator supports both sync and async functions. When a sync function is decorated, Attesta bridges to async internally using asyncio.run() or by scheduling a task on an existing event loop (e.g., in Jupyter). The evaluate() method is always async.TypeScript: All gated functions return Promises and must be awaited. The gate() wrapper and Attesta.evaluate() are all async. Use the constructor (new Attesta()) for synchronous initialization.Can I write a custom risk scorer?
Can I write a custom risk scorer?
Protocol / TypeScript interface) for all pluggable components. Implement the RiskScorer interface with a score(ctx) method and a name property:CompositeRiskScorer (weighted average) or MaxRiskScorer (most conservative).What happens if the operator does not respond to a challenge?
What happens if the operator does not respond to a challenge?
fail_mode and timeout_seconds settings in attesta.yaml:fail_mode | Behavior on Timeout |
|---|---|
deny (default) | The action is blocked with verdict TIMED_OUT. |
escalate | The action is blocked with verdict ESCALATED and an escalation event is emitted. |
allow | The action proceeds with verdict APPROVED (timeout metadata is still recorded). |
deny or escalate — never allow.Can I override the risk level for specific functions?
Can I override the risk level for specific functions?
risk="critical" to the gate:risk.overrides section in attesta.yaml:How does the trust engine work?
How does the trust engine work?
- Approved actions gradually increase trust (the agent is behaving well)
- Denied actions decrease trust (the agent attempted something the operator rejected)
- Incidents (e.g., a revoked approval) immediately drop trust to zero
trust.influence (default 0.3), meaning a HIGH-risk action might be downgraded to MEDIUM for a well-established agent. However, CRITICAL actions are never downgraded by the trust engine.Trust decays over time (trust.decay_rate per day of inactivity) and is capped at trust.ceiling (default 0.9).Security
How does audit log integrity work?
How does audit log integrity work?
What are the trust model assumptions?
What are the trust model assumptions?
- The operator is trusted. Attesta ensures that a human sees and approves high-risk actions. It does not verify the identity or competence of the operator beyond the challenge mechanism.
- The runtime environment is not compromised. If an attacker has control of the process running Attesta, they can bypass gating. Attesta is a defense-in-depth layer, not a sandbox.
- The audit log file is protected by OS-level permissions. Attesta provides tamper detection (hash chain) but not tamper prevention. An attacker with write access to the log file can rewrite the entire chain. Protect the
.attesta/directory with appropriate file permissions. - The AI agent cannot modify its own gating configuration. If the agent has write access to
attesta.yamlor the Attesta source code, it could weaken or disable gating.
- Read-only mounting of
attesta.yamland the.attesta/directory - External audit log shipping to an immutable store (e.g., S3 with Object Lock)
- Network-level isolation for the agent process
Can an AI agent bypass Attesta?
Can an AI agent bypass Attesta?
- Run the agent in a separate process or container with no direct access to the protected functions
- Use the MCP proxy pattern (
attesta mcp wrap) where the proxy runs in a separate process - Use
risk="critical"with multi-party approval for the most sensitive operations - Monitor the audit log for unusual patterns (e.g., functions executing without corresponding audit entries)
Does Attesta encrypt the audit log?
Does Attesta encrypt the audit log?
.attesta/audit.jsonl) is stored in plaintext JSONL. It provides integrity (tamper detection via hash chaining) but not confidentiality (encryption).If your audit entries contain sensitive data (e.g., function arguments with PII), protect the log file with OS-level encryption (e.g., LUKS, FileVault, BitLocker) or ship entries to an encrypted external store.Integration
Can I use Attesta with multiple AI frameworks in the same project?
Can I use Attesta with multiple AI frameworks in the same project?
Attesta class is framework-agnostic. You can create a single Attesta instance and use it with multiple frameworks simultaneously. All gates share the same risk scorer, trust engine, and audit log.metadata.source to distinguish their origin.Does Attesta work with no-code platforms?
Does Attesta work with no-code platforms?
| Platform | Package | Description |
|---|---|---|
| n8n | n8n-nodes-attesta | AttestaGate node for gating workflow steps |
| Flowise | flowise-nodes-attesta | Approval node for Flowise chatflow chains |
| Langflow | langflow-attesta | Component for Langflow visual pipelines |
| Dify | dify-attesta | Plugin for Dify agent workflows |
How do I use Attesta with MCP servers I did not write?
How do I use Attesta with MCP servers I did not write?
attesta mcp wrap CLI command. It wraps any MCP server with a transparent stdio proxy that intercepts tool calls and evaluates them through Attesta. No modifications to the upstream server are needed.attesta as the MCP server command instead of the upstream server directly. See the attesta mcp wrap reference for full configuration examples.Can I use Attesta in a CI/CD pipeline or headless environment?
Can I use Attesta in a CI/CD pipeline or headless environment?
- Python default renderer (auto-detected when no TTY): auto-approves all actions. This is intentional for CI environments where a human already reviewed the code via a pull request.
- TypeScript default renderer (no TTY): denies by default for safety unless you provide an explicit renderer.
- Custom renderer: you can implement a renderer that sends approval requests to Slack, email, PagerDuty, or a webhook and waits for a response.
Does Attesta support the TypeScript MCP decorator?
Does Attesta support the TypeScript MCP decorator?
attesta_tool_handler decorator for custom MCP servers is currently Python-only. For TypeScript MCP servers, use the attesta mcp wrap CLI proxy, which works with any MCP server regardless of implementation language.Alternatively, use the evaluate() method directly in your TypeScript MCP server’s call_tool handler:Troubleshooting
Attesta auto-approves everything without prompting
Attesta auto-approves everything without prompting
TerminalRenderer is not active. Attesta auto-detects the renderer at startup:- If
richis installed and stdin is a TTY (interactive terminal), the richTerminalRendereris used. - In Python, otherwise the silent default renderer auto-approves.
- In TypeScript, otherwise the default behavior is deny unless you provide a renderer.
- Install the rich terminal UI:
pip install attesta[terminal] - Make sure you are running in an interactive terminal (not piped or backgrounded)
- Or pass a custom renderer explicitly:
@gate(renderer=MyRenderer())
attesta audit verify reports a broken chain
attesta audit verify reports a broken chain
Broken at: indices tell you which entries to examine.Common causes:- Manual editing of the
.attesta/audit.jsonlfile - Concurrent writes from multiple processes without proper file locking
- File corruption (disk errors, interrupted writes)
I get ImportError: No module named 'yaml' when using from_config()
I get ImportError: No module named 'yaml' when using from_config()
from_config() method requires PyYAML for YAML files. Install it with: