-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Vercel AI SDK framework support #227
base: main
Are you sure you want to change the base?
Conversation
🟡 Heimdall Review Status
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonhedman Thanks for the contribution! Overall LGTM. Left a few comments around branding and package naming.
const account = privateKeyToAccount( | ||
"0x4c0883a69102937d6231471b5dbb6208ffd70c02a813d7f2da1c54f2e3be9f38", | ||
); | ||
|
||
const client = createWalletClient({ | ||
account, | ||
chain: baseSepolia, | ||
transport: http(), | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the default wallet provider CdpWalletProvider
|
||
CDP integration with Vercel AI SDK to enable agentic workflows using the core primitives defined in `cdp-agentkit-core`. | ||
|
||
This toolkit contains tools that enable an LLM agent to interact with the [Coinbase Developer Platform](https://docs.cdp.coinbase.com/) through Vercel AI SDK. The toolkit provides a wrapper around the CDP SDK, allowing agents to perform onchain operations like transfers, trades, and smart contract interactions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modify language to enable onchain actions. AgentKit is not only for interactions with CDP
import { getVercelAITools } from "@coinbase/cdp-vercel-ai-sdk"; | ||
import { CdpAgentkit } from "@coinbase/cdp-agentkit-core"; | ||
|
||
// Initialize CDP AgentKit | ||
const agentkit = await CdpAgentkit.configureWithWallet(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use 0.1.x
packages. @coinbase/agentkit
Please add test snippets for the example to the PR description |
We require all commits to be signed before merging to master. Please rebase and follow these instructions |
Co-authored-by: John Peterson <[email protected]>
Co-authored-by: John Peterson <[email protected]>
Co-authored-by: John Peterson <[email protected]>
ee56c98
to
a97d157
Compare
@John-peterson-coinbase all of your comments should be addressed and I signed each of my commits |
@jasonhedman - the changes look reasonable. When I test locally, I receive Are you able to make tool calls successfully? Please update to resolve and paste snippets of successful example tool calls in the PR description. Thanks! |
What changed? Why?
Added
vercel-ai-sdk
folder intypescript/framework-extensions
to support the Vercel AI SDK framework.Added associated
vercel-ai-sdk-cdp-chatbot
folder intypescript/examples
to demonstrate the package's functionality.Both packages aim to mirror the analagous
langchain
andlangchain-cdp-chatbot
packages.Qualified Impact
This addition will primarily facilitate the use of AgentKit in the Next.js web framework.
The
vercel-ai-sdk-cdp-chatbot
package depends on thevercel-ai-sdk
package. Errors invercel-ai-sdk
would only affectvercel-ai-sdk-cdp-chatbot
.Example