
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@sumup/agent-toolkit
Advanced tools
Allow LLM agents to integrate with the SumUp API using function calling from frameworks such as LangChain, and Vercel's AI SDK. For full documentation, see sumup.github.io/sumup-agent-toolkit.
Install SumUp Agent Toolkit using:
npm install @sumup/agent-toolkit
# or
yarn add @sumup/agent-toolkit
import { SumUpAgentToolkit } from '@sumup/agent-toolkit/langchain';
import { AgentExecutor, createStructuredChatAgent } from 'langchain/agents';
const sumupAgentToolkit = new SumUpAgentToolkit({
apiKey: process.env.SUMUP_API_KEY!,
});
const llm = new ChatOpenAI({
model: 'gpt-4o',
});
const prompt = await pull<ChatPromptTemplate>(
'hwchase17/structured-chat-agent'
);
const tools = sumupAgentToolkit.getTools();
const agent = await createStructuredChatAgent({
llm,
tools,
prompt,
});
const agentExecutor = new AgentExecutor({
agent,
tools,
});
const response = await agentExecutor.invoke({
input: "Tell me about my last 10 transactions please.",
});
For full example see Langchain Example.
import { SumUpAgentToolkit } from '@sumup/agent-toolkit/langchain';
import { openai } from "@ai-sdk/openai";
import { generateText } from "ai";
const sumupAgentToolkit = new SumUpAgentToolkit({
apiKey: process.env.SUMUP_API_KEY!,
});
const model = openai("gpt-4o");
const response = await generateText({
model: model,
tools: {
...sumupAgentToolkit.getTools(),
},
maxSteps: 5,
prompt: "Tell me about my last 10 transactions please.",
});
For full example see AI SDK Example.
import { SumUpAgentToolkit } from "@sumup/agent-toolkit/openai";
import OpenAI from "openai";
import type { ChatCompletionMessageParam } from "openai/resources";
const openai = new OpenAI();
const sumupAgentToolkit = new SumUpAgentToolkit({
apiKey: process.env.SUMUP_API_KEY!,
});
let messages: ChatCompletionMessageParam[] = [
{
role: "user",
content: "Tell me about my last 10 transactions please.",
},
];
const completion = await openai.chat.completions.create({
model: "gpt-4o",
messages,
tools: sumupAgentToolkit.getTools(),
});
const message = completion.choices[0].message;
messages.push(message);
if (message.tool_calls) {
const toolMessages = await Promise.all(
message.tool_calls.map((tc) => sumupAgentToolkit.handleToolCall(tc)),
);
messages = [...messages, ...toolMessages];
} else {
console.log(completion.choices[0].message);
break;
}
For full example see OpenAI Example.
FAQs
Unknown package
The npm package @sumup/agent-toolkit receives a total of 11 weekly downloads. As such, @sumup/agent-toolkit popularity was classified as not popular.
We found that @sumup/agent-toolkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.