Skip to main content

LangChain tools for Revettr counterparty risk scoring in agentic commerce

Project description

langchain-revettr

LangChain tools for Revettr counterparty risk scoring. Score wallets, domains, IPs, and companies 0-100 before sending payments in agentic commerce.

Install

pip install langchain-revettr

# With x402 auto-payment:
pip install langchain-revettr[x402]

Tools

ScoreCounterpartyTool

Score any counterparty 0-100 with per-signal breakdown.

from langchain_revettr import ScoreCounterpartyTool

tool = ScoreCounterpartyTool(wallet_private_key="0x...")  # Optional: for x402 payment
result = tool.invoke({"domain": "uniswap.org"})
print(result)
# Score: 92/100 (tier: low, confidence: 0.75)
# Flags: none
# Signals checked: 3

ShouldPayTool

Get a clear YES/NO/WARN decision before sending payment.

from langchain_revettr import ShouldPayTool

tool = ShouldPayTool(wallet_private_key="0x...")
result = tool.invoke({"url": "https://some-api.com", "min_score": 60})
print(result)
# Decision: YES
# Counterparty scored 92/100 (low risk) — safe to proceed.

With a LangChain Agent

from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_revettr import ScoreCounterpartyTool, ShouldPayTool

tools = [ScoreCounterpartyTool(), ShouldPayTool()]
llm = ChatOpenAI(model="gpt-4")
agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)

result = executor.invoke({"input": "Should I pay the service at sketchy-crypto.xyz?"})

Pricing

$0.01 USDC per score via x402 on Base. No API keys needed.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_revettr-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_revettr-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file langchain_revettr-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_revettr-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for langchain_revettr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ca16a7fa46f05cc966c378e9ec0d80eb3f504fb05ee0d2c18da202dbd3824bbe
MD5 a045619dab1fc57997d88d63b26fbcfc
BLAKE2b-256 658ae2774dc16d996821cd9155ddb3c6a77d3cd42713d29976d4eacebc0a61b7

See more details on using hashes here.

File details

Details for the file langchain_revettr-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_revettr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 146bcd083d283de3fce5dbf502c18ce30fc668ec3e7da3eedb720b848fbe1292
MD5 7b81f6127b34f377010b83f3f3e36244
BLAKE2b-256 fbc0cffe68b555f1dd25c2496e54b0b2809c82445ca07d702b313e6b49a9e0c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page