Skip to content

feat: npm cli - generate core primitives - #589

Merged
CarsonRoscoe merged 29 commits into
mainfrom
feat/npm-cli-generate
Mar 25, 2025
Merged

feat: npm cli - generate core primitives#589
CarsonRoscoe merged 29 commits into
mainfrom
feat/npm-cli-generate

Conversation

@CarsonRoscoe

@CarsonRoscoe CarsonRoscoe commented Mar 19, 2025

Copy link
Copy Markdown
Contributor

Description

This PR adds a suite of generative tools to generate the core building blocks for AgentKit. The use-case for these tools is to easily add AgentKit to an existing application.

The base npm create onchain-agent behavior is unchanged. It remains the quickstart CLI.

After installing create-onchain-agent, a second cli, agentkit, will be installed alongside it. This allows you to access the following 4 new commands:

This PR adds the following 4 new commands:

  • agentkit generate wallet-provider will generate a custom wallet provider (e.g. turnkeyWalletProvider.ts)
  • agentkit generate action-provider will generate a custom action provider (e.g.baseActionProvider.ts)
  • agentkit generate prepare will generate a prepareAgentkit.ts file that will do all the framework-agnostic Agentkit work. This function will return the the results from Agentkit.from(walletProvider, actionProviders) along with the associated walletProvider.
  • agentkit generate create-agent will generate a createAgent.ts file that is framework-specific. It assumes the existence of an associated prepareAgentkit.ts file.

Tests

  1. create onchain-agent regression tests worked and are unchanged in behavior
Screenshot 2025-03-19 at 3 43 30 PM
  1. agentkit generate prepare cases
Screenshot 2025-03-19 at 3 55 12 PM Screenshot 2025-03-19 at 3 44 13 PM
  1. agentkit generate create-agent cases
Screenshot 2025-03-19 at 3 44 32 PM Screenshot 2025-03-19 at 3 44 34 PM
  1. agentkit generate wallet-provider case
Screenshot 2025-03-19 at 3 49 14 PM Screenshot 2025-03-19 at 3 49 25 PM
  1. agentkit generate action-provider case
Screenshot 2025-03-19 at 3 50 02 PM Screenshot 2025-03-19 at 3 50 13 PM

Checklist

A couple of things to include in your PR for completeness:

  • Added documentation to all relevant README.md files
  • Added a changelog entry

@cb-heimdall

cb-heimdall commented Mar 19, 2025

Copy link
Copy Markdown

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions github-actions Bot added typescript documentation Improvements or additions to documentation labels Mar 19, 2025
@cb-heimdall

Copy link
Copy Markdown

Review Error for pattiscott973 @ 2025-03-19 20:47:42 UTC
User must have write permissions to review

@CarsonRoscoe
CarsonRoscoe force-pushed the feat/npm-cli-generate branch from 599408a to 6bbd7bb Compare March 19, 2025 21:47
@CarsonRoscoe
CarsonRoscoe marked this pull request as ready for review March 19, 2025 22:55
Comment thread typescript/create-onchain-agent/README.md Outdated
Comment thread typescript/create-onchain-agent/src/generate.ts
Comment thread typescript/create-onchain-agent/src/generate.ts Outdated
Comment thread typescript/create-onchain-agent/src/generate.ts Outdated
Comment thread typescript/create-onchain-agent/src/generate.ts Outdated
Comment thread typescript/create-onchain-agent/src/actions/createActionProvider.ts Outdated
Comment thread typescript/create-onchain-agent/templates/actionProvider/actionProvider.njk Outdated
@CarsonRoscoe
CarsonRoscoe requested a review from 0xRAG March 24, 2025 16:28
Comment thread typescript/create-onchain-agent/src/actions/createActionProvider.ts
Comment thread typescript/create-onchain-agent/templates/walletProvider/walletProvider.njk Outdated
Comment thread typescript/create-onchain-agent/templates/actionProvider/schema.njk Outdated
Comment thread typescript/create-onchain-agent/templates/actionProvider/actionProvider.njk Outdated
@0xRAG

0xRAG commented Mar 24, 2025

Copy link
Copy Markdown
Contributor

@CarsonRoscoe Looking great, I've ran a few generate commands and left some more nits

@CarsonRoscoe
CarsonRoscoe requested a review from 0xRAG March 25, 2025 12:41
Comment thread typescript/.changeset/wide-lions-fly.md
@CarsonRoscoe
CarsonRoscoe requested a review from 0xRAG March 25, 2025 16:06

@0xRAG 0xRAG left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

4 participants