The langchain-twosio package turns the 2s catalog into LangChain tools. Your agent decides which endpoint to call; x402 handles payment per call from your wallet.
Load the tools with a wallet key and hand them to a LangGraph agent. The model selects the right endpoint for the task:
# pip install langchain-twosio langchain-anthropic langgraph
import os
from langchain_twosio import get_twosio_tools
from langchain_anthropic import ChatAnthropic
from langgraph.prebuilt import create_react_agent
tools = get_twosio_tools(private_key=os.environ["EVM_PRIVATE_KEY"])
agent = create_react_agent(ChatAnthropic(model="claude-haiku-4-5", temperature=0), tools)
result = agent.invoke({"messages": [("user", "What's the forecast for ZIP 94103?")]})
print(result["messages"][-1].content)Each tool call is a real x402 request: probe, sign, retry, settle — all inside the tool, transparent to the agent. You fund one wallet; the agent can use any tool without per-API credentials.
Call a live x402 API right now — no signup.
Browse the full endpoint directory, grab the quickstart, or read the llms.txt manifest. Every endpoint is keyless and pay-per-call.