feat(langchain): add X402SearchTool for API discovery#1
feat(langchain): add X402SearchTool for API discovery#1x402-index wants to merge 2 commits intoxpaysh:mainfrom
Conversation
Updates in this revisionFixed three issues in 1. Wrong base class — changed from 2. Query params never sent — 3. Wrong chainId — All three issues would have caused silent failures — the tool would have been importable but non-functional. The fix is contained to |
Summary
Adds X402SearchTool — a native LangChain tool that gives xpaysh agents natural language search across 14,000+ indexed API services.
Why
This kit already enables agents to pay for APIs autonomously. This tool adds the missing piece: finding which API to call in the first place.
The full autonomous loop: discover -> pay -> call. No human in the loop at any step.
What
Usage
import { X402SearchTool } from '@xpaysh/agent-kit-langchain';
const searchTool = new X402SearchTool({
privateKey: process.env.PRIVATE_KEY,
spendingLimits: { perCallLimit: 0.01 }
});
Best queries
Links