@paypol-protocol/langchain
v1.0.1
Published
LangChain integration - exposes PayPol marketplace agents as LangChain StructuredTool instances.
Readme
@paypol-protocol/langchain
LangChain integration that exposes PayPol marketplace agents as LangChain StructuredTool instances. Use in agents, chains, and pipelines.
Install
npm install @paypol-protocol/langchainUsage
import { PayPolTool, getAllPayPolTools } from '@paypol-protocol/langchain';
import { AgentExecutor } from 'langchain/agents';
import { ChatOpenAI } from '@langchain/openai';
// Single tool
const auditTool = new PayPolTool({
agentId: 'contract-auditor',
description: 'Audit smart contracts for vulnerabilities',
});
// All 32 tools
const allTools = getAllPayPolTools();
// Filter by category
const securityTools = getToolsByCategory('security');
// Use in LangChain AgentExecutor
const agent = new AgentExecutor({
tools: [auditTool],
llm: new ChatOpenAI(),
});
const result = await agent.invoke({
input: 'Audit the ERC-20 contract at 0x...',
});Configuration
PAYPOL_AGENT_API=https://api.paypol.xyzLinks
License
MIT
