Metadata-Version: 2.4
Name: stillos-clearance
Version: 0.1.0
Summary: Drop-in bonded counterparty clearance (OFAC + on-chain) for AI-agent frameworks — CrewAI, Agno, and any Python agent. Routes A2A-payment preflight through the StillOS notary.
Author: Still OS Digital Holdings
License: MIT
Project-URL: Homepage, https://nolawealthfinancial.com/notary
Project-URL: Clearance, https://nolawealthfinancial.com/notary/agent-clearance
Project-URL: Bond, https://nolawealthfinancial.com/notary/bond
Keywords: ai-agents,x402,erc-8004,kya,know-your-agent,ofac,crewai,agno,agent-payments,clearance
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# stillos-clearance

Drop-in **counterparty clearance** for AI-agent frameworks. Before your agent pays or
transacts with a counterparty, clear it in one line — OFAC SDN screen + live Base
on-chain wallet signals fused into a **CLEAR / REVIEW / BLOCK** verdict, Ed25519-signed
and backed by a real on-chain **correctness bond** with `/dispute` recourse.

x402 and A2A payments settle naked — no KYC, no chargeback. This is the preflight.

## Install
```bash
pip install stillos-clearance
```

## Use

```python
from stillos_clearance import guard, require_clearance, crewai_guard, agno_pre_hook

# 1. Inline — raises ClearanceBlocked on BLOCK
guard(counterparty_name="Acme LLC", counterparty_wallet="0xabc…")

# 2. Decorator — gate any payment/transfer function by default
@require_clearance()
def pay(amount, counterparty_name=None, counterparty_wallet=None):
    ...

# 3. CrewAI — gate a BaseTool so it refuses sanctioned/risky counterparties
crewai_guard(my_payment_tool)

# 4. Agno — pre_hook that clears the counterparty in run metadata before the agent runs
agent = Agent(..., pre_hooks=[agno_pre_hook()])
```

`block_on_review=True` treats REVIEW as a hard stop (default: REVIEW is allowed).

## Config
- `STILLOS_CLEARANCE_URL` — override the endpoint (default: the live notary).
- Free tier applies per agent/day; past it the endpoint returns HTTP 402/429 with x402
  payment terms, and `is_allowed()` treats a paywalled response as **not cleared**.

## Why bonded
Every verdict is backed by real USDC staked on-chain
([/notary/bond](https://nolawealthfinancial.com/notary/bond)). A verdict proven wrong via
independent re-run pays the disputant from the bond. Self-reported agent reputation has no
money behind it; these verdicts do.
