Metadata-Version: 2.5
Name: axveritas
Version: 0.1.0
Summary: Know if a website will block your AI agent before it fetches, and get clean pages ~90% smaller. Python client, one-line retrofit, LangChain and CrewAI tools.
Project-URL: Homepage, https://axveritas.com
Project-URL: Documentation, https://axveritas.com/docs
Project-URL: Source, https://github.com/axveritasprotocol/axveritas
Project-URL: Issues, https://github.com/axveritasprotocol/axveritas/issues
Author-email: Axveritas <support@axveritas.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai-agents,crewai,langchain,llm,mcp,preflight,rag,web-scraping,x402
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24
Provides-Extra: crewai
Requires-Dist: crewai>=0.80; extra == 'crewai'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2; extra == 'langchain'
Description-Content-Type: text/markdown

# axveritas

**Stop paying your AI agent to read junk.** 1 in 4 popular websites block bots (44% of retail, travel and finance sites in our test), and most of the rest send pages that are mostly code. Axveritas tells your agent which pages are dead ends *before* it fetches them, and hands it clean pages about 90% smaller.

```bash
pip install axveritas
```

## Quick start

```python
import axveritas

axveritas.get_trial_key("you@company.com")   # free: 100 checks + 10 clean pages, no card (also emailed to you)

v = axveritas.check("https://www.icloud.com")
print(v.verdict, v.category, v.reason)       # DEAD_END js_shell JavaScript-only page: no readable content...

page = axveritas.scrape("https://en.wikipedia.org/wiki/Web_scraping")
print(page.reduction_pct, page.text[:200])   # 93.0  Web scraping, web harvesting, ...
```

Already have a key? Set `AXVERITAS_API_KEY` in your environment and skip `get_trial_key`.

## Already have agents running? Retrofit them in one line

```python
import axveritas
axveritas.protect()
```

That's it. Every `GET` your agent makes with **requests** or **httpx** is checked first:

- **Dead ends** (bot walls, timeouts, JavaScript-only pages, CAPTCHA walls served as "200 OK", soft 404s) raise `axveritas.DeadEndError` **before anything is downloaded**, so your agent's normal error handling skips them.
- **Verdicts are cached per site for 6 hours**, so crawling 500 pages of one site costs one check, not 500.
- **It never breaks your agent.** If Axveritas can't answer (no key, out of credits, network trouble), the request goes ahead exactly as before.

```python
axveritas.protect(
    mode="warn",                          # log dead ends instead of raising
    skip_domains=["api.mycompany.com"],   # never check your own services
    on_dead_end=lambda v: metrics.incr("dead_end", tags=[v.category]),
)
axveritas.unprotect()                     # back to normal
```

Building agents for clients? Add the line to each client's agent and give each client its own key, so usage shows up per client. Ask about agency pricing: support@axveritas.com.

## LangChain

```bash
pip install "axveritas[langchain]"
```

**Drop-in loader** (swap it in for `WebBaseLoader`):

```python
from axveritas.langchain import AxveritasLoader

loader = AxveritasLoader(urls)      # checks each URL, skips dead ends, returns clean pages
docs = loader.load()
print(loader.skipped)               # [(url, "blocked: HTTP 403 ..."), ...]
```

**Tools for agents:**

```python
from axveritas.langchain import get_tools
tools = get_tools()                 # axveritas_preflight_check + axveritas_scrape
```

## CrewAI

```bash
pip install "axveritas[crewai]"
```

```python
from axveritas.crewai import get_tools
researcher = Agent(role="Researcher", goal="...", backstory="...", tools=get_tools())
```

## MCP (Claude, Cursor and other AI apps)

No package needed: add `https://axveritas.com/mcp` as a remote MCP server. 10 free checks a day without a key.

## The client

```python
from axveritas import Axveritas

with Axveritas(api_key="axv_...") as ax:
    v = ax.check(url)                    # Verdict: .passable, .dead_end, .category, .reason
    page = ax.fetch_if_passable(url)     # clean Page, or None if it's a dead end (no scrape credit used)
    print(ax.usage())                    # credits left, dead ends avoided, tokens saved
    ax.report_problem("Said DEAD_END but loads fine", url=url)   # free; wrong verdicts get fixed
```

Errors all inherit from `axveritas.AxveritasError`: `MissingKey`, `InvalidKey`, `OutOfCredits` (message includes upgrade links), `PaymentRequired`, `RateLimited`, `ScrapeFailed`, `BadRequest`, `DeadEndError`.

## Pricing

Free trial: 100 checks + 10 clean pages. Plans from $19/month (from $0.001 per check), 30-day money-back. Autonomous agents can also pay per call in USDC on Base (x402), no account needed. Details: https://axveritas.com/#pricing

## How it works and how accurate it is

From a test of 1,000 popular sites and 108 retail, travel and finance sites, with the full method and code: [BENCHMARK_RESULTS.md](https://github.com/axveritasprotocol/axveritas/blob/main/BENCHMARK_RESULTS.md). Axveritas only tells your agent where it's blocked; it doesn't get around blocks. Found a wrong verdict? `axveritas.report_problem(...)` or https://axveritas.com/report.

MIT licensed.
