One factory call returns an array of tools you can drop into any LangChain agent — createReactAgent, AgentExecutor, or your own graph. There is nothing else to register.
- Import the factory:
import { createTrue402Tools } from '@true402.dev/langchain'; - Build the tools with your payer key:
const tools = createTrue402Tools({ payerPrivateKey: process.env.PAYER_PRIVATE_KEY! }); - Pass
tools to your agent constructor exactly like any other LangChain tool array.
The agent can now call the stalls itself. The factory returns six tools: true402_token_report (POST /v1/base/token-report, composite avoid/caution/ok verdict, ~$0.01), true402_token_safety (POST /v1/token-safety, structural score 0-100, ~$0.005), true402_address_safety (POST /v1/base/address-safety, ~$0.005), true402_deployer_check (POST /v1/base/deployer-check, ~$0.008), true402_tx_preflight (POST /v1/base/tx-preflight, ~$0.008) and true402_liquidity_history (POST /v1/base/liquidity-history, ~$0.005). All hang off the API base https://true402.dev/api.
The last two cover what a pre-buy verdict cannot. true402_tx_preflight inspects the unsigned transaction the agent is about to sign — it takes no private key and no signature, so it cannot broadcast or front-run it — and returns a simulation against current state, the decoded intent (an unlimited approval is judged on the spender), and the counterparty's removal history. Call it last, immediately before signing. true402_liquidity_history reads what has already happened to the token's liquidity: every observed removal with amount, block and transaction hash, plus the other tokens drained in the same transaction. A live simulation is blind to this — a pool drained last month simulates fine today if it was re-seeded. Every answer states the block range the archive covers, so none observed is never a claim of safety.