Metadata-Version: 2.4
Name: langchain-invar402
Version: 0.1.0
Summary: LangChain tools for Invar402 paid-delivery trust scores. Never holds payment keys and never pays automatically.
Author: invar402
License-Expression: MIT
Project-URL: Homepage, https://invar402.com
Project-URL: Repository, https://github.com/dumeinao441-ux/invar402-mcp
Project-URL: Issues, https://github.com/dumeinao441-ux/invar402-mcp/issues
Keywords: invar402,langchain,x402,agents,trust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain-core>=0.3.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# langchain-invar402

[![PyPI](https://img.shields.io/pypi/v/langchain-invar402.svg)](https://pypi.org/project/langchain-invar402/)


LangChain (Python) tools for [Invar402](https://invar402.com).

This package never holds a wallet, API key, or facilitator secret, and it never pays automatically. Paid `/verify` returns the x402 quote unless you pass **both** `pay_with_x402=True` and a host-provided `x402_fetch` wrapper.

Website: https://invar402.com
Network: Base (`eip155:8453`)
Paid lookup: $0.002 USDC

## Install

```bash
pip install langchain-invar402
```

Until the package is on PyPI:

```bash
git clone https://github.com/dumeinao441-ux/invar402-mcp.git
pip install ./invar402-mcp/packages/langchain-py
```

## Usage

```python
from langchain.agents import create_agent
from langchain_invar402 import get_invar402_tools

tools = get_invar402_tools()  # never pays
agent = create_agent(model, tools)
```

Ask the agent: "Recommend an x402 service for bitcoin mempool fees, then preview the report shape."

### Opt-in payment

```python
tools = get_invar402_tools(
    pay_with_x402=True,
    x402_fetch=paid_fetch,  # host-provided x402 wrapper; never a raw private key
)
```

## Tools

Free: `invar402_search`, `invar402_recommend`, `invar402_preview`, `invar402_leaderboard`, `invar402_check`, `invar402_trial`.

Unpaid by default: `invar402_verify`.

## License

MIT.
