Skip to main content

Second Opinion for Python agents (LangChain · CrewAI · anything)

Give your agent a paid, independent skeptic: before acting on a claim, it buys an adversarial verification ($0.02–$0.75 in USDC via x402 — no account, no API key) and gets a structured verdict with calibrated confidence, citations, and a signed offline-verifiable receipt.

Setup (~5 minutes)

pip install secondopinion-x402
  1. Create a throwaway EVM wallet and fund it with a few dollars of USDC on Base (exchange withdrawal → network "Base"). No ETH needed — payments are gas-free for you; the facilitator covers it. Keep only pocket money in it.
  2. export SECOND_OPINION_PRIVATE_KEY=0x… — the key signs payments locally and never leaves your machine.

Try it first — no wallet

from secondopinion import SecondOpinionClient

so = SecondOpinionClient()          # no key needed for the free trial
v = so.try_free("The Model Context Protocol uses JSON-RPC 2.0")

Free trial is rate-limited per caller per day and returns unsigned verdicts.

Plain Python (paid)

so = SecondOpinionClient()                       # default tier: quick ($0.02)
v = so.verify("Library X v3 supports streaming natively",
              context="About to build a day's work on this")
if v["verdict"] == "refuted":
    ...  # stop and re-plan; v["findings"] says why, v["citations"] has sources

LangChain

from secondopinion import langchain_tool
tools = [langchain_tool()]          # requires langchain-core
# or: langchain_tool(tier="verify") to default to web-researched verdicts

CrewAI

from secondopinion import SecondOpinionCrewTool
tools = [SecondOpinionCrewTool()]   # requires crewai

OpenAI Agents SDK

from secondopinion import openai_agents_tool
agent = Agent(..., tools=[openai_agents_tool()])   # requires openai-agents

What comes back

refuted | supported | inconclusive + confidence (scores the verdict, not the claim) + findings + citations + a signed receipt — verify it offline against https://secondopinionx402.com/.well-known/second-opinion-pubkey.json for a tamper-evident audit trail. Measured accuracy, failures included: https://secondopinionx402.com/benchmark

Tiers: quick $0.02 reasoning-only (~20s) · verify $0.20 live web research (~60s) · panel $0.75 three skeptics, majority vote. You are never charged for failed requests; failed async jobs retry free.

Status: core client and LangChain adapter are payment-tested against production; the CrewAI adapter is a thin wrapper of the same client (import-guarded) — report anything odd and it'll be fixed fast.

Download files

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

Source Distribution

secondopinion_x402-0.2.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

secondopinion_x402-0.2.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file secondopinion_x402-0.2.1.tar.gz.

File metadata

  • Download URL: secondopinion_x402-0.2.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for secondopinion_x402-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ccd52077d56f51397b3494385e3baed1abb65fe79d7c5952a2f7c7ed1264d5d0
MD5 90ea5f5b78be918d18aa04bd9b23df24
BLAKE2b-256 9383524a8edd18195d2bfe1c19dd0a0a8bcda5decb308e7ab4d4bc3d679d355d

See more details on using hashes here.

File details

Details for the file secondopinion_x402-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for secondopinion_x402-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e1591a748002f6145bd77d413545fe4d9c54c149bda7766042747c7b31a0f19
MD5 fd144152aba692f9a19ecc4d75f6c4de
BLAKE2b-256 2b43fa2a5b1a423a449cdf117db983ae9abc24a87394b243b78e63fc28da8c67

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