npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sumup/agent-toolkit

v0.8.0

Published

<div align="center">

Readme

SumUp Agent Toolkit - Typescript

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-ai.

NPM Version JSR Version Documentation Downloads License

Install

Install SumUp Agent Toolkit using:

npm install @sumup/agent-toolkit
# or
yarn add @sumup/agent-toolkit

LangChain

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.

AI SDK

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.

OpenAI

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.