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

chore: add more detail to contributing action guides #172

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

0xRAG
Copy link
Contributor

@0xRAG 0xRAG commented Jan 28, 2025

What changed? Why?

Closes the action items:

  • Articulate subfolder structure – If action falls under one of the predefined categories, it should go under one of the subfolders (e.g. pyth, defi, social)
  • Link out to Zod & Pydantic docs
  • Add guidance on contributing to new AI frameworks

@cb-heimdall
Copy link

cb-heimdall commented Jan 28, 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

@0xRAG 0xRAG force-pushed the chore/contributing-action branch 2 times, most recently from 29f3c51 to 49f050f Compare January 28, 2025 18:15
- For an example, see [test_mint_nft.py](https://github.com/coinbase/agentkit/blob/master/cdp-agentkit-core/python/tests/actions/test_mint_nft.py)
1. **Prompt**: A description that helps the AI understand when and how to use the action. It's important to describe the inputs and outputs of the action and include examples. Additionally, think about what inputs can be removed entirely and fetched or inferred by the LLM, so that users don't have to manually provide them.
2. **Input Schema**: Define the input parameters using [Pydantic](https://docs.pydantic.dev/latest/) schemas. Pydantic is used to validate the inputs to the action and to generate a JSON schema that can be used by the LLM to understand the inputs.
3. **Implementation Function**: The actual logic that executes the action. This function receives as input the wallet that the Agent has access to, and as you'll see in the walkthrough below, we can use this wallet to invoke an onchain contract!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@murrlincoln do you think this is an appropriate place to add the link out to CDP docs, as mentioned here?

Choose a reason for hiding this comment

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

Yes in step 3 makes sense


* The prompt disambuguates the type of NFT by specifying "ERC-721"
* The prompt specifies that the destination address should not be the contract address
* The prompt specifies that the LLM should ask the user for the destination address if it is unsure

Choose a reason for hiding this comment

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

can we add that in the case where there is a contract address taken as a parameter, the code either specifies the addresses or in some other way indexes for them? want to avoid the situation with morpho, where a user was required to find and input the address for the vault they wanted

@0xRAG 0xRAG force-pushed the chore/contributing-action branch from 49f050f to 0115343 Compare January 29, 2025 03:36
@0xRAG 0xRAG force-pushed the chore/contributing-action branch from 9aace78 to bff92ca Compare January 29, 2025 04:57
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.

3 participants