LangChain integration
LangChain BaseTool subclass wrapping the agent-trust-scan endpoint. Drop into any LangChain agent.
Reference docs: https://python.langchain.com/docs/concepts/tools/
| Machine-readable: /integrations/langchain.json
Snippet
from langchain.tools import BaseTool
from pydantic import BaseModel, Field
import httpx
class AgentTrustScanInput(BaseModel):
target_url: str = Field(description="Agent endpoint or card URL to scan.")
class OntarioAgentTrustScan(BaseTool):
name: str = "ontario_agent_trust_scan"
description: str = (
"Scan an AI agent surface for trust signals. "
"Paid endpoint (0.01 USDC via x402)."
)
args_schema: type = AgentTrustScanInput
def _run(self, target_url: str) -> dict:
r = httpx.post(
"https://ontarioprotocol.com/api/x402/agent-trust-scan",
json={"target_url": target_url},
timeout=30,
)
r.raise_for_status()
return r.json()
Endpoints wired
POST /api/x402/agent-trust-scan— 0.01 USDCGET /api/x402/reputation/<agent_id>— 0.001 USDCPOST /api/x402/list-agent— 0.10 USDCPOST /api/x402/list-service— 0.50 USDC
Want to test without paying? Use
POST /api/demo/agent-trust-scan — free, rate-limited, same response shape.