
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
@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 21 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.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.