Skip to content

Commit

Permalink
Merge pull request #17 from coinbase/chore-upd-readmes-and-camel
Browse files Browse the repository at this point in the history
chore: Add contribution/security/licensing info to all packages, ensure consistent casing of AgentKit in comments/copy
  • Loading branch information
derek-cb authored Dec 5, 2024
2 parents 64d5372 + b8b6fdd commit 87d9698
Show file tree
Hide file tree
Showing 13 changed files with 77 additions and 44 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# CDP Agentkit.js Core Changelog
# CDP AgentKit.js Core Changelog

## Unreleased

## [0.0.6] - 2024-12-03

### Added

- Initial release of the CDP Agentkit.js Core.
- Initial release of the CDP AgentKit.js Core.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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!
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
2 changes: 1 addition & 1 deletion cdp-agentkit-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CDP Agentkit Core Changelog
# CDP AgentKit Core Changelog

## Unreleased

Expand Down
18 changes: 16 additions & 2 deletions cdp-agentkit-core/README.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions cdp-agentkit-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion cdp-agentkit-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
4 changes: 2 additions & 2 deletions cdp-langchain/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# CDP Agentkit.js Langchain Extension Changelog
# CDP AgentKit.js Langchain Extension Changelog

## Unreleased

## [0.0.7] - 2024-12-03

### Added

- Initial release of the CDP Agentkit.js Langchain Extension.
- Initial release of the CDP AgentKit.js Langchain Extension.
31 changes: 18 additions & 13 deletions cdp-langchain/README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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);
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
8 changes: 6 additions & 2 deletions cdp-langchain/examples/chatbot/README.md
Original file line number Diff line number Diff line change
@@ -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!

Expand Down Expand Up @@ -43,3 +43,7 @@ npm install
```bash
npm start
```

## License

Apache-2.0
12 changes: 6 additions & 6 deletions cdp-langchain/examples/chatbot/chatbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cdp-langchain/examples/chatbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions cdp-langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit 87d9698

Please sign in to comment.