Skip to content
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

feat: npm cli - generate core primitives #589

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

CarsonRoscoe
Copy link
Contributor

@CarsonRoscoe CarsonRoscoe commented Mar 19, 2025

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
Copy link

cb-heimdall commented Mar 19, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/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

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
@CarsonRoscoe CarsonRoscoe requested a review from 0xRAG March 21, 2025 17:39
@CarsonRoscoe CarsonRoscoe force-pushed the feat/npm-cli-generate branch from 99c7c37 to fc60dac Compare March 21, 2025 17:50
@CarsonRoscoe CarsonRoscoe requested a review from 0xRAG March 24, 2025 16:28
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