Skip to content

feat: support custom action provider - #214

Merged
0xRAG merged 1 commit into
0.1.0-releasefrom
chore/custom-action-provider
Feb 1, 2025
Merged

0xRAG merged 1 commit into
0.1.0-releasefrom
chore/custom-action-provider

Conversation

@0xRAG

@0xRAG 0xRAG commented Feb 1, 2025 •

Copy link
Copy Markdown
Contributor

What changed? Why?

Adds ability for devs to easily add a custom action provider:

    const custom = customActionProvider<EvmWalletProvider>({
      name: "custom_action",
      description: "This action does XYZ cool thing",
      schema: z.object({
        arg1: z.string(),
        arg2: z.string(),
      }),
      invoke: async (walletProvider, args: any) => {
        const { arg1, arg2 } = args;
        const address = walletProvider.getAddress();
        return `Invoked with ${arg1} and ${arg2} from ${address}`;
      },
    });

    const agentKit = await AgentKit.from({
      walletProvider,
      actionProviders: [custom],
    });

Comment thread cdp-agentkit-core/typescript/src/action-providers/actionDecorator.ts Outdated
@0xRAG
0xRAG force-pushed the chore/custom-action-provider branch 5 times, most recently from cc4dce3 to 327d5c4 Compare February 1, 2025 00:56
@0xRAG
0xRAG marked this pull request as ready for review February 1, 2025 00:57
@0xRAG
0xRAG force-pushed the chore/custom-action-provider branch from 327d5c4 to 7a6fdf1 Compare February 1, 2025 01:08
@0xRAG
0xRAG merged commit d2bf34c into 0.1.0-release Feb 1, 2025
@0xRAG
0xRAG deleted the chore/custom-action-provider branch February 1, 2025 01:11
John-peterson-coinbase added a commit that referenced this pull request Feb 1, 2025
* 0.1.0 initial scaffolding (#175)

* chore: fix lint (#177)

* chore: migrate basename action (#176)

* chore: CDP, Farcaster, ERC721 action providers (#181)

* CDP, Farcaster, ERC721 ActionProvider

* README erc721

* chore: migrate erc20 action (#182)

* 0.1.0(ts): morpho actions (#184)

* chore: migrate erc20 getBalance (#186)

* chore: fix npm scripts, linting and bump lint packages (#179)

* chore: migrate erc721 getBalance (#188)

* chore: migrate wrap eth action (#189)

* chore: langchain helper to convert actions to tools (#190)

* 0.1.0(ts): wow actions (#191)

* chore: migrate get wallet details (#192)

* 0.1.0(ts): twitter actions (#193)

* chore: eslint import order (#194)

* chore: map chainId to networkId (#196)

* chore: fix typo (#197)

* chore: migrate deploy token (#198)

* 0.1.0(ts): deploy contract (#201)

* first pass adding deploy contract cdp action

* linting

* the lost file

* tests

* 0.1.0(ts): adding eth balance to wallet details (#199)

* feat: Client side metrics (#195)

* 0.1.0(ts): deploy nft (#200)

* chore: rename typescript files and folders (#203)

* chore: split out cdp wallet and cdp api actions (#204)

* chore: migrate trade action (#208)

* twitter chatbot example (#205)

* 0.1.0(ts): farcaster example (#206)

* chore: cdpApiActionProvider usage (#211)

* chore: prefix action name (#210)

* chore: set default action provider to wallet action provider (#212)

* 0.1.0(ts): wallet native token transfer (#213)

Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>

* fix: use prefix notation that plays nicely with langchain (#217)

* feat: support custom action provider (#214)

* 0.1.0(ts): cdp wallet provider (#218)

Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>

* feat: CdpWalletProvider sendTransaction

* fix cdp provider config fields

* docs + dir structure refactor

* add language level readmes

* release ready!

* fix agentkit-langchain unit tests

* fix python unit test GHA poetry relative paths

* update poetry lock files

---------

Co-authored-by: Ryan Gilbert <ryangilbert7926@gmail.com>
Co-authored-by: Chris Gerber <csgerber@gmail.com>
murrlincoln pushed a commit to murrlincoln/agentkit that referenced this pull request Feb 8, 2025
* 0.1.0 initial scaffolding (coinbase#175)

* chore: fix lint (coinbase#177)

* chore: migrate basename action (coinbase#176)

* chore: CDP, Farcaster, ERC721 action providers (coinbase#181)

* CDP, Farcaster, ERC721 ActionProvider

* README erc721

* chore: migrate erc20 action (coinbase#182)

* 0.1.0(ts): morpho actions (coinbase#184)

* chore: migrate erc20 getBalance (coinbase#186)

* chore: fix npm scripts, linting and bump lint packages (coinbase#179)

* chore: migrate erc721 getBalance (coinbase#188)

* chore: migrate wrap eth action (coinbase#189)

* chore: langchain helper to convert actions to tools (coinbase#190)

* 0.1.0(ts): wow actions (coinbase#191)

* chore: migrate get wallet details (coinbase#192)

* 0.1.0(ts): twitter actions (coinbase#193)

* chore: eslint import order (coinbase#194)

* chore: map chainId to networkId (coinbase#196)

* chore: fix typo (coinbase#197)

* chore: migrate deploy token (coinbase#198)

* 0.1.0(ts): deploy contract (coinbase#201)

* first pass adding deploy contract cdp action

* linting

* the lost file

* tests

* 0.1.0(ts): adding eth balance to wallet details (coinbase#199)

* feat: Client side metrics (coinbase#195)

* 0.1.0(ts): deploy nft (coinbase#200)

* chore: rename typescript files and folders (coinbase#203)

* chore: split out cdp wallet and cdp api actions (coinbase#204)

* chore: migrate trade action (coinbase#208)

* twitter chatbot example (coinbase#205)

* 0.1.0(ts): farcaster example (coinbase#206)

* chore: cdpApiActionProvider usage (coinbase#211)

* chore: prefix action name (coinbase#210)

* chore: set default action provider to wallet action provider (coinbase#212)

* 0.1.0(ts): wallet native token transfer (coinbase#213)

Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>

* fix: use prefix notation that plays nicely with langchain (coinbase#217)

* feat: support custom action provider (coinbase#214)

* 0.1.0(ts): cdp wallet provider (coinbase#218)

Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>

* feat: CdpWalletProvider sendTransaction

* fix cdp provider config fields

* docs + dir structure refactor

* add language level readmes

* release ready!

* fix agentkit-langchain unit tests

* fix python unit test GHA poetry relative paths

* update poetry lock files

---------

Co-authored-by: Ryan Gilbert <ryangilbert7926@gmail.com>
Co-authored-by: Chris Gerber <csgerber@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants