
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@coinbase/agentkit-vercel-ai-sdk
Advanced tools
This package is an extension used to easily plug AgentKit into AI SDK by Vercel.
For a single command to install all necessary dependencies, run:
npm install @coinbase/agentkit-vercel-ai-sdk @coinbase/agentkit ai @ai-sdk/openai
To break it down, this package is:
npm install @coinbase/agentkit-vercel-ai-sdk
This package is used alongside AgentKit and AI SDK, so these will need to be installed as well.
npm install @coinbase/agentkit ai
Finally, install the model provider you want to use. For example, to use OpenAI, install the @ai-sdk/openai
package. See here for a list of supported model providers.
npm install @ai-sdk/openai
The main export of this package is the getVercelAITools
function. This function takes an AgentKit instance and returns an object containing the tools for the AgentKit agent. This object can then be passed to AI SDK.
Here's a snippet of code that shows how to use the getVercelAITools
function to get the tools for the AgentKit agent.
import { getVercelAITools } from "@coinbase/agentkit-vercel-ai-sdk";
import { AgentKit } from "@coinbase/agentkit";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
// Get your Coinbase Developer Platform API key from the Portal: https://portal.cdp.coinbase.com/
// Or, check out one of the other supported wallet providers: https://github.com/coinbase/agentkit/tree/main/typescript/agentkit
const agentKit = await AgentKit.from({
cdpApiKeyName: process.env.CDP_API_KEY_NAME,
cdpApiKeyPrivateKey: process.env.CDP_API_KEY_PRIVATE_KEY,
});
const tools = await getVercelAITools(agentKit);
// There are multiple methods to generate text with AI SDK.
// See here for more information: https://sdk.vercel.ai/docs/ai-sdk-core/generating-text
const { text } = await generateText({
model: openai("gpt-4o-mini"), // Make sure to have OPENAI_API_KEY set in your environment variables
system: "You are an onchain AI assistant with access to a wallet.",
prompt: "Print wallet details",
tools,
// Allow multi-step tool usage
// See: https://sdk.vercel.ai/docs/foundations/agents#multi-step-tool-usage
maxSteps: 10,
});
console.log(text);
For a full example, see the AgentKit AI SDK Chatbot Example.
We welcome contributions of all kinds! Please see our Contributing Guide for detailed setup instructions and contribution guidelines.
FAQs
Vercel AI SDK extension of CDP Agentkit
The npm package @coinbase/agentkit-vercel-ai-sdk receives a total of 196 weekly downloads. As such, @coinbase/agentkit-vercel-ai-sdk popularity was classified as not popular.
We found that @coinbase/agentkit-vercel-ai-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.