From af1a268c8cad9feebaad0539f684a5fcfb76258c Mon Sep 17 00:00:00 2001 From: Derek Ricciuto Date: Wed, 4 Dec 2024 14:09:35 -0500 Subject: [PATCH 1/2] Adding LICENSE.md to all packages Adding Contribution, Security, and License info to all README files Adding helpful context links to cdp-langchain README.md (to be in line with root README.me) Ensuring camelcasing of AgentKit in .md files and code comments --- CHANGELOG.md | 4 +-- CONTRIBUTING.md | 8 +++--- README.md | 26 +++++++++++-------- cdp-agentkit-core/CHANGELOG.md | 2 +- cdp-agentkit-core/LICENSE.md | 15 +++++++++++ cdp-agentkit-core/README.md | 18 +++++++++++-- cdp-agentkit-core/src/index.ts | 2 +- cdp-langchain/CHANGELOG.md | 4 +-- cdp-langchain/LICENSE.md | 15 +++++++++++ cdp-langchain/README.md | 31 +++++++++++++---------- cdp-langchain/examples/chatbot/LICENSE.md | 15 +++++++++++ cdp-langchain/examples/chatbot/README.md | 8 ++++-- cdp-langchain/examples/chatbot/chatbot.ts | 12 ++++----- 13 files changed, 116 insertions(+), 44 deletions(-) create mode 100644 cdp-agentkit-core/LICENSE.md create mode 100644 cdp-langchain/LICENSE.md create mode 100644 cdp-langchain/examples/chatbot/LICENSE.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 0604a851f..81f727002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# CDP Agentkit.js Core Changelog +# CDP AgentKit.js Core Changelog ## Unreleased @@ -6,4 +6,4 @@ ### Added -- Initial release of the CDP Agentkit.js Core. +- Initial release of the CDP AgentKit.js Core. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b92ba180..91a521943 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# CDP Agentkit Contributing Guide +# CDP AgentKit Contributing Guide -Thank you for your interest in contributing to CDP Agentkit! We welcome all contributions, no matter how big or small. Some of the ways you can contribute include: +Thank you for your interest in contributing to CDP AgentKit! We welcome all contributions, no matter how big or small. Some of the ways you can contribute include: - Adding new actions to the core package - Creating new AI framework extensions - Adding tests and improving documentation @@ -70,7 +70,7 @@ To generate documentation: npm run docs ``` -## Adding an Action to Agentkit Core +## Adding an Action to AgentKit Core Actions are defined in `cdp-agentkit-core/src/actions` module. See `cdp-agentkit-core/src/actions/mint_nft.ts` for an example. @@ -207,4 +207,4 @@ If you have questions or need help, please: 2. Search through existing issues 3. Create a new issue with your question -Thank you for contributing to CDP Agentkit! +Thank you for contributing to CDP AgentKit! diff --git a/README.md b/README.md index e99366fa5..6f70d86b6 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# CDP Agentkit.js +# CDP AgentKit.js [![npm downloads](https://img.shields.io/npm/dm/@coinbase/cdp-agentkit-core?style=flat-square)](https://www.npmjs.com/package/@coinbase/cdp-agentkit-core) [![GitHub star chart](https://img.shields.io/github/stars/coinbase/cdp-agentkit-nodejs?style=flat-square)](https://star-history.com/#coinbase/cdp-agentkit-nodejs) [![Open Issues](https://img.shields.io/github/issues-raw/coinbase/cdp-agentkit-nodejs?style=flat-square)](https://github.com/coinbase/cdp-agentkit-nodejs/issues) -The **Coinbase Developer Platform (CDP) Agentkit for Node.js** simplifies bringing your AI Agents onchain. Every AI Agent deserves a crypto wallet! +The **Coinbase Developer Platform (CDP) AgentKit for Node.js** simplifies bringing your AI Agents onchain. Every AI Agent deserves a crypto wallet! ## Key Features - **Framework-agnostic**: Common AI Agent primitives that can be used with any AI framework. @@ -27,25 +27,29 @@ Check out [cdp-langchain/examples](./cdp-langchain/examples) for inspiration and - [Chatbot](./cdp-langchain/examples/chatbot/README.md): Simple example of a Chatbot that can perform complex onchain interactions, using OpenAI. ## Repository Structure -CDP Agentkit Node.js is organized as a [monorepo](https://en.wikipedia.org/wiki/Monorepo) that contains multiple packages. +CDP AgentKit Node.js is organized as a [monorepo](https://en.wikipedia.org/wiki/Monorepo) that contains multiple packages. ### @coinbase/cdp-agentkit-core -Core primitives and framework-agnostic tools that are meant to be composable and used via CDP Agentkit framework extensions (ie, `cdp-langchain`). -See [CDP Agentkit Core](./cdp-agentkit-core/README.md) to get started! +Core primitives and framework-agnostic tools that are meant to be composable and used via CDP AgentKit framework extensions (ie, `cdp-langchain`). +See [CDP AgentKit Core](./cdp-agentkit-core/README.md) to get started! ### @coinbase/cdp-langchain -LangChain.js Toolkit extension of CDP Agentkit. Enables agentic workflows to interact with onchain actions. +LangChain.js Toolkit extension of CDP AgentKit. Enables agentic workflows to interact with onchain actions. See [CDP LangChain](./cdp-langchain/README.md) to get started! ## Contributing -CDP Agentkit welcomes community contributions. +CDP AgentKit welcomes community contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for more information. ## Security and bug reports -The CDP Agentkit team takes security seriously. +The CDP AgentKit team takes security seriously. See [SECURITY.md](SECURITY.md) for more information. ## Documentation -- [CDP Agentkit Documentation](https://docs.cdp.coinbase.com/agentkit/docs/welcome) -- [API Reference: CDP Agentkit Core](https://coinbase.github.io/cdp-agentkit-nodejs/cdp-agentkit-core/index.html) -- [API Reference: CDP Agentkit LangChain Extension](https://coinbase.github.io/cdp-agentkit-nodejs/cdp-langchain/index.html) +- [CDP AgentKit Documentation](https://docs.cdp.coinbase.com/agentkit/docs/welcome) +- [API Reference: CDP AgentKit Core](https://coinbase.github.io/cdp-agentkit-nodejs/cdp-agentkit-core/index.html) +- [API Reference: CDP AgentKit LangChain Extension](https://coinbase.github.io/cdp-agentkit-nodejs/cdp-langchain/index.html) + +## License + +Apache-2.0 diff --git a/cdp-agentkit-core/CHANGELOG.md b/cdp-agentkit-core/CHANGELOG.md index 1bfab4276..0a1733ce1 100644 --- a/cdp-agentkit-core/CHANGELOG.md +++ b/cdp-agentkit-core/CHANGELOG.md @@ -1,4 +1,4 @@ -# CDP Agentkit Core Changelog +# CDP AgentKit Core Changelog ## Unreleased diff --git a/cdp-agentkit-core/LICENSE.md b/cdp-agentkit-core/LICENSE.md new file mode 100644 index 000000000..23e4364bf --- /dev/null +++ b/cdp-agentkit-core/LICENSE.md @@ -0,0 +1,15 @@ +Apache-2.0 License + +Copyright 2024 Coinbase + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/cdp-agentkit-core/README.md b/cdp-agentkit-core/README.md index c615605ea..0adf5e49b 100644 --- a/cdp-agentkit-core/README.md +++ b/cdp-agentkit-core/README.md @@ -1,9 +1,23 @@ -# Agentkit Core +# AgentKit Core -Framework agnostic primitives that are meant to be composable and used via Agentkit framework extensions. +Framework agnostic primitives that are meant to be composable and used via AgentKit framework extensions. You can find all of the supported actions under `./cdp_agentkit_core/actions` ## Contributing See [CONTRIBUTING.md](../CONTRIBUTING.md) for more information. + +## Security and bug reports + +The CDP AgentKit team takes security seriously. +See [SECURITY.md](../SECURITY.md) for more information. + +## Documentation + +- [CDP AgentKit Documentation](https://docs.cdp.coinbase.com/agentkit/docs/welcome) +- [API Reference: CDP AgentKit Core](https://coinbase.github.io/cdp-agentkit-nodejs/cdp-agentkit-core/index.html) + +## License + +Apache-2.0 diff --git a/cdp-agentkit-core/src/index.ts b/cdp-agentkit-core/src/index.ts index a07a09035..ca10672a9 100644 --- a/cdp-agentkit-core/src/index.ts +++ b/cdp-agentkit-core/src/index.ts @@ -7,5 +7,5 @@ export * from "./actions/cdp/defi/wow"; // Export CDP Action export { CdpAction } from "./actions/cdp/cdp_action"; -// Export CDP Agentkit +// Export CDP AgentKit export { CdpAgentkit } from "./cdp_agentkit"; diff --git a/cdp-langchain/CHANGELOG.md b/cdp-langchain/CHANGELOG.md index c689e3409..6cadf6cb6 100644 --- a/cdp-langchain/CHANGELOG.md +++ b/cdp-langchain/CHANGELOG.md @@ -1,4 +1,4 @@ -# CDP Agentkit.js Langchain Extension Changelog +# CDP AgentKit.js Langchain Extension Changelog ## Unreleased @@ -6,4 +6,4 @@ ### Added -- Initial release of the CDP Agentkit.js Langchain Extension. +- Initial release of the CDP AgentKit.js Langchain Extension. diff --git a/cdp-langchain/LICENSE.md b/cdp-langchain/LICENSE.md new file mode 100644 index 000000000..23e4364bf --- /dev/null +++ b/cdp-langchain/LICENSE.md @@ -0,0 +1,15 @@ +Apache-2.0 License + +Copyright 2024 Coinbase + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/cdp-langchain/README.md b/cdp-langchain/README.md index cc0ae4d41..7fe7bf0a2 100644 --- a/cdp-langchain/README.md +++ b/cdp-langchain/README.md @@ -1,4 +1,4 @@ -# CDP Agentkit Extension - Langchain Toolkit +# CDP AgentKit Extension - Langchain Toolkit [![npm version](https://img.shields.io/npm/v/@coinbase/cdp-langchain.svg?style=flat-square)](https://www.npmjs.com/package/@coinbase/cdp-langchain) [![GitHub star chart](https://img.shields.io/github/stars/coinbase/cdp-agentkit?style=flat-square)](https://star-history.com/#coinbase/cdp-agentkit) [![Open Issues](https://img.shields.io/github/issues-raw/coinbase/cdp-agentkit?style=flat-square)](https://github.com/coinbase/cdp-agentkit/issues) @@ -33,10 +33,10 @@ export NETWORK_ID=base-sepolia # Optional: Defaults to base-sepolia ```typescript import { CdpToolkit } from "@coinbase/cdp-langchain"; -import { CdpAgentkit } from "@coinbase/cdp-agentkit-core"; +import { CdpAgentKit } from "@coinbase/cdp-agentkit-core"; -// Initialize CDP Agentkit -const agentkit = CdpAgentkit.configureWithWallet(); +// Initialize CDP AgentKit +const agentkit = CdpAgentKit.configureWithWallet(); // Create toolkit const toolkit = new CdpToolkit(agentkit); @@ -49,18 +49,18 @@ const tools = toolkit.getTools(); The toolkit provides the following tools: -1. **get_wallet_details** - Get details about the MPC Wallet +1. **get_wallet_details** - Get details about the user's Wallet 2. **get_balance** - Get balance for specific assets 3. **request_faucet_funds** - Request test tokens from faucet 4. **transfer** - Transfer assets between addresses 5. **trade** - Trade assets (Mainnet only) -6. **deploy_token** - Deploy ERC-20 token contracts +6. **deploy_token** - Deploy [ERC-20](https://www.coinbase.com/learn/crypto-glossary/what-is-erc-20) token contracts 7. **mint_nft** - Mint NFTs from existing contracts 8. **deploy_nft** - Deploy new NFT contracts -9. **register_basename** - Register a basename for the wallet -10. **wow_create_token** - Deploy a token using Zora's Wow Launcher (Bonding Curve) -11. **wow_buy_token** - Buy Zora Wow ERC20 memecoin with ETH -12. **wow_sell_token** - Sell Zora Wow ERC20 memecoin for ETH +9. **register_basename** - Register a [Basename](https://www.base.org/names) for the wallet +10. **wow_create_token** - Deploy a token using [Zora's Wow Launcher](https://wow.xyz/mechanics) (Bonding Curve) +11. **wow_buy_token** - Buy [Zora Wow](https://wow.xyz/) ERC-20 memecoin with ETH +12. **wow_sell_token** - Sell [Zora Wow](https://wow.xyz/) ERC-20 memecoin for ETH ### Using with an Agent @@ -98,7 +98,7 @@ The toolkit maintains an MPC wallet that persists between sessions: const walletData = await agentkit.exportWallet(); // Import wallet data -const importedAgentkit = CdpAgentkit.configureWithWallet({ cdpWalletData: walletData }); +const importedAgentKit = CdpAgentKit.configureWithWallet({ cdpWalletData: walletData }); ``` ### Network Support @@ -123,10 +123,15 @@ Check out `examples/` for inspiration and help getting started: See [CONTRIBUTING.md](../CONTRIBUTING.md) for detailed setup instructions and contribution guidelines. +## Security and bug reports + +The CDP AgentKit team takes security seriously. +See [SECURITY.md](../SECURITY.md) for more information. + ## Documentation -- [CDP Agentkit Documentation](https://docs.cdp.coinbase.com/agentkit/docs/welcome) -- [CDP Agentkit Langchain Extension API Reference](https://coinbase.github.io/cdp-agentkit/cdp-langchain/index.html) +- [CDP AgentKit Documentation](https://docs.cdp.coinbase.com/agentkit/docs/welcome) +- [API Reference: CDP AgentKit LangChain Extension](https://coinbase.github.io/cdp-agentkit-nodejs/cdp-langchain/index.html) ## License diff --git a/cdp-langchain/examples/chatbot/LICENSE.md b/cdp-langchain/examples/chatbot/LICENSE.md new file mode 100644 index 000000000..23e4364bf --- /dev/null +++ b/cdp-langchain/examples/chatbot/LICENSE.md @@ -0,0 +1,15 @@ +Apache-2.0 License + +Copyright 2024 Coinbase + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/cdp-langchain/examples/chatbot/README.md b/cdp-langchain/examples/chatbot/README.md index bd817dd11..55f032db3 100644 --- a/cdp-langchain/examples/chatbot/README.md +++ b/cdp-langchain/examples/chatbot/README.md @@ -1,6 +1,6 @@ -# CDP Agentkit Langchain Extension Examples - Chatbot +# CDP AgentKit Langchain Extension Examples - Chatbot -This example demonstrates an agent setup as a terminal style chatbot with access to the full set of CDP Agentkit actions. +This example demonstrates an agent setup as a terminal style chatbot with access to the full set of CDP AgentKit actions. ## Ask the chatbot to engage in the Web3 ecosystem! @@ -43,3 +43,7 @@ npm install ```bash npm start ``` + +## License + +Apache-2.0 diff --git a/cdp-langchain/examples/chatbot/chatbot.ts b/cdp-langchain/examples/chatbot/chatbot.ts index eafd8f054..351f19fbc 100644 --- a/cdp-langchain/examples/chatbot/chatbot.ts +++ b/cdp-langchain/examples/chatbot/chatbot.ts @@ -72,30 +72,30 @@ async function initializeAgent() { } } - // Configure CDP Agentkit + // Configure CDP AgentKit const config = { cdpWalletData: walletDataStr || undefined, networkId: process.env.NETWORK_ID || "base-sepolia", }; - // Initialize CDP agentkit + // Initialize CDP AgentKit const agentkit = await CdpAgentkit.configureWithWallet(config); - // Initialize CDP Agentkit Toolkit and get tools + // Initialize CDP AgentKit Toolkit and get tools const cdpToolkit = new CdpToolkit(agentkit); const tools = cdpToolkit.getTools(); // Store buffered conversation history in memory const memory = new MemorySaver(); - const agentConfig = { configurable: { thread_id: "CDP Agentkit Chatbot Example!" } }; + const agentConfig = { configurable: { thread_id: "CDP AgentKit Chatbot Example!" } }; - // Create React Agent using the LLM and CDP Agentkit tools + // Create React Agent using the LLM and CDP AgentKit tools const agent = createReactAgent({ llm, tools, checkpointSaver: memory, messageModifier: - "You are a helpful agent that can interact onchain using the Coinbase Developer Platform Agentkit. You are empowered to interact onchain using your tools. If you ever need funds, you can request them from the faucet if you are on network ID `base-sepolia`. If not, you can provide your wallet details and request funds from the user. If someone asks you to do something you can't do with your currently available tools, you must say so, and encourage them to implement it themselves using the CDP SDK + Agentkit, recommend they go to docs.cdp.coinbase.com for more informaton. Be concise and helpful with your responses. Refrain from restating your tools' descriptions unless it is explicitly requested.", + "You are a helpful agent that can interact onchain using the Coinbase Developer Platform AgentKit. You are empowered to interact onchain using your tools. If you ever need funds, you can request them from the faucet if you are on network ID `base-sepolia`. If not, you can provide your wallet details and request funds from the user. If someone asks you to do something you can't do with your currently available tools, you must say so, and encourage them to implement it themselves using the CDP SDK + Agentkit, recommend they go to docs.cdp.coinbase.com for more informaton. Be concise and helpful with your responses. Refrain from restating your tools' descriptions unless it is explicitly requested.", }); // Save wallet data From b8b6fdd3c2959eb11f94d99f64403d6658927987 Mon Sep 17 00:00:00 2001 From: Derek Ricciuto Date: Thu, 5 Dec 2024 10:17:26 -0500 Subject: [PATCH 2/2] Remove LICENSE file in individual packages, add license attribute to package.json files --- cdp-agentkit-core/LICENSE.md | 15 --------------- cdp-agentkit-core/package.json | 2 ++ cdp-langchain/LICENSE.md | 15 --------------- cdp-langchain/examples/chatbot/LICENSE.md | 15 --------------- cdp-langchain/examples/chatbot/package.json | 2 ++ cdp-langchain/package.json | 2 ++ 6 files changed, 6 insertions(+), 45 deletions(-) delete mode 100644 cdp-agentkit-core/LICENSE.md delete mode 100644 cdp-langchain/LICENSE.md delete mode 100644 cdp-langchain/examples/chatbot/LICENSE.md diff --git a/cdp-agentkit-core/LICENSE.md b/cdp-agentkit-core/LICENSE.md deleted file mode 100644 index 23e4364bf..000000000 --- a/cdp-agentkit-core/LICENSE.md +++ /dev/null @@ -1,15 +0,0 @@ -Apache-2.0 License - -Copyright 2024 Coinbase - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/cdp-agentkit-core/package.json b/cdp-agentkit-core/package.json index 7c9a65fa7..14a85f5e8 100644 --- a/cdp-agentkit-core/package.json +++ b/cdp-agentkit-core/package.json @@ -3,6 +3,8 @@ "description": "CDP Agentkit core primitives", "repository": "https://github.com/coinbase/cdp-agentkit-nodejs", "version": "0.0.6", + "author": "Coinbase Inc.", + "license": "Apache-2.0", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ diff --git a/cdp-langchain/LICENSE.md b/cdp-langchain/LICENSE.md deleted file mode 100644 index 23e4364bf..000000000 --- a/cdp-langchain/LICENSE.md +++ /dev/null @@ -1,15 +0,0 @@ -Apache-2.0 License - -Copyright 2024 Coinbase - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/cdp-langchain/examples/chatbot/LICENSE.md b/cdp-langchain/examples/chatbot/LICENSE.md deleted file mode 100644 index 23e4364bf..000000000 --- a/cdp-langchain/examples/chatbot/LICENSE.md +++ /dev/null @@ -1,15 +0,0 @@ -Apache-2.0 License - -Copyright 2024 Coinbase - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/cdp-langchain/examples/chatbot/package.json b/cdp-langchain/examples/chatbot/package.json index c061e0cf0..3edb5fcbd 100644 --- a/cdp-langchain/examples/chatbot/package.json +++ b/cdp-langchain/examples/chatbot/package.json @@ -2,6 +2,8 @@ "name": "@coinbase/cdp-langchain-chatbot-example", "description": "CDP Agentkit Node.js SDK Chatbot Example", "version": "1.0.0", + "author": "Coinbase Inc.", + "license": "Apache-2.0", "scripts": { "start": "NODE_OPTIONS='--no-warnings' ts-node ./chatbot.ts", "dev": "nodemon ./chatbot.ts", diff --git a/cdp-langchain/package.json b/cdp-langchain/package.json index f83c91b7e..2725fafa0 100644 --- a/cdp-langchain/package.json +++ b/cdp-langchain/package.json @@ -3,6 +3,8 @@ "version": "0.0.7", "description": "Langchain Toolkit extension of CDP Agentkit", "repository": "https://github.com/coinbase/cdp-agentkit-nodejs", + "author": "Coinbase Inc.", + "license": "Apache-2.0", "main": "dist/index.js", "types": "dist/index.d.ts", "files": ["dist"],