import{bosonProtocolPlugin}from"@bosonprotocol/agentic-commerce";import{BOSON_MCP_URL,CHAIN_MAP}from"@common/chains.ts";import{getOnChainTools}from"@goat-sdk/adapter-langchain";import{viem}from"@goat-sdk/wallet-viem";// Get tools with the Boson Protocol pluginconsttools=awaitgetOnChainTools({wallet:viem(walletClient),plugins: [bosonProtocolPlugin({url:bosonMcpUrl})],});console.log("Available tools:",tools.map((tool:any)=>tool.name),);
2. LangChain Agent Integration
Transaction Signing
The example shows how wallet setup enables automatic transaction signing through the GOAT SDK plugin:
When you provide this wallet client to the GOAT SDK plugin, it handles all transaction signing automatically when the agent calls Boson tools.
Required Environment Variables
Agent Usage Example
Key Dependencies
Additional Examples
Other framework implementations in the repository:
const result = await agentExecutor.invoke({
input: prompt,
chat_history: chatHistory,
});
console.log(result.output);
// Add messages to chat history for context in next interaction
chatHistory.push(new HumanMessage(prompt));
chatHistory.push(new AIMessage(result.output));