Skip to content

Conversation

kylexqian
Copy link

What changed?

  • Documentation
  • Bug fix
  • New Action
  • New Action Provider
  • Other

Why was this change implemented?

OpenGradient is a Decentralized AI platform that enables end-to-end model storage and secure inference on the OpenGradient blockchain (currently in testnet).

We hope to add a few tools to the coinbase action provider repository:

  • Hard-coded quantitative models (live volatility forecasting and price returns for BTC, ETH, SOL, etc.)

These can be used in financial based AI agents with goals like optimizing a defi portfolio, using volatility to automatically adjust buy / sell stops, lending USDC, yield farming, etc.

  • OpenGradient network LLM access (on-chain LLM prompting to models such as SentientAGI/Dobby-Mini-Unhinged-Llama-3.1-8B and Qwen/Qwen2.5-72B-Instruct)

Allow users to access different on-chain LLMs from the current LLM used by the agent itself. This can eventually include custom system prompts, but currently set as Dobby (who is great for creative-writing and general humor) and Qwen. These independent LLMs can even interact with one another!

All of these tools will be run through the OpenGradient blockchain, allowing for transaction tracking through our block explorer.

We are hoping this PR can act as a stepping stone to add OpenGradient agent toolkit functions (see Notes at the end for more details).

Network support

  • All EVM
  • Base
  • Base Sepolia
  • Other

Wallet support

  • CDP Wallet
  • EVM Wallet
  • Other

Checklist

  • Changelog updated
  • Commits are signed. See instructions
  • Doc strings
  • Readme updates
  • Rebased against master
  • Relevant exports added (Added OpenGradient to poetry.lock as it's necessary to use the OpenGradient SDK. Our SDK is open-sourced here, PyPI link here).

How has it been tested?

  • Agent tested
  • Unit tests

Unit tests added under tests/action_providers/opengradient

Example usecase of quantitative model:

Prompt: How will the price of Bitcoin change in an hour?

-------------------
5.0650831312%
Block Explorer: https://explorer.opengradient.ai/address/0x5DbC2b798501d08cF2957f005e25a5C34FAC2b1c
-------------------
The model predicts that the price of Bitcoin will increase by approximately 5.07% over the next hour. You can view the details of this forecast on the [block explorer](https://explorer.opengradient.ai/address/0x5DbC2b798501d08cF2957f005e25a5C34FAC2b1c).
-------------------

Prompt: How will the price of Ethereum change in the next hour?

-------------------
6.7401513457%
Block Explorer: https://explorer.opengradient.ai/address/0x2064718C8AB2b725Ff54bdAdB1A007A8C0420316
-------------------
The model predicts that the price of Ethereum will increase by approximately 6.74% over the next hour. You can view the details of this forecast on the [block explorer](https://explorer.opengradient.ai/address/0x2064718C8AB2b725Ff54bdAdB1A007A8C0420316).
-------------------

Prompt: How will the price of Solana change in the next hour?

-------------------
11.3267429173%
Block Explorer: https://explorer.opengradient.ai/address/0x7b7833492BcC9F76dc27a3D7AF2eAD1885E327d5
-------------------
The model predicts that the price of Solana will increase by approximately 11.33% over the next hour. You can view the details of this forecast on the [block explorer](https://explorer.opengradient.ai/address/0x7b7833492BcC9F76dc27a3D7AF2eAD1885E327d5).
-------------------

Example usecase of LLM prompting (From Agent test):

Prompt: Ask Dobby how the weather is

-------------------
It’s fucking hot, bro. Like, "I forgot water exists" hot. Stay hydrated or cry later.
Block Explorer: https://explorer.opengradient.ai/tx/0xbd26ecedcab775f0f387fdc63f7fcfbc8dc9a15b8b099e38449b16a4aeb012f3
-------------------
Dobby says: "It’s fucking hot, bro. Like, 'I forgot water exists' hot. Stay hydrated or cry later."

You can check the transaction on the block explorer: [Link](https://explorer.opengradient.ai/tx/0xbd26ecedcab775f0f387fdc63f7fcfbc8dc9a15b8b099e38449b16a4aeb012f3)
-------------------

Prompt: Ask Qwen how the weather is

-------------------
I don't have real-time data access, so I can't check the current weather. However, you can easily find out by checking a weather app or website like Weather.com, or by asking a smart home device like an Amazon Echo or Google Home. If you tell me your location, I can suggest a good source for local weather updates!
Block Explorer: https://explorer.opengradient.ai/tx/0xba508cee9eaff80e57df9f5f2fb0d88a678d615c4347fc90aeb01bb60f0c4e98
-------------------
Qwen says: "I don't have real-time data access, so I can't check the current weather. However, you can easily find out by checking a weather app or website like Weather.com, or by asking a smart home device like an Amazon Echo or Google Home. If you tell me your location, I can suggest a good source for local weather updates!"

You can check the transaction on the block explorer: [Link](https://explorer.opengradient.ai/tx/0xba508cee9eaff80e57df9f5f2fb0d88a678d615c4347fc90aeb01bb60f0c4e98)
-------------------

Prompt: Ask Dobby what it thinks of Qwen's answer

-------------------
Qwen’s answer is solid as fuck. No bullshit, no excuses—just practical solutions. If you’re looking for real-time weather, check a fucking app or ask your smart home device, simple as that. Bonus points for offering to help with local updates if you share your location. That’s what I call a win for clarity and utility.
Block Explorer: https://explorer.opengradient.ai/tx/0x48623302395f09b337344018daedf1db08da097a7c4268062231dbb812afa0fa
-------------------
Dobby says: "Qwen’s answer is solid as fuck. No bullshit, no excuses—just practical solutions. If you’re looking for real-time weather, check a fucking app or ask your smart home device, simple as that. Bonus points for offering to help with local updates if you share your location. That’s what I call a win for clarity and utility."

You can check the transaction on the block explorer: [Link](https://explorer.opengradient.ai/tx/0x48623302395f09b337344018daedf1db08da097a7c4268062231dbb812afa0fa)
-------------------

Prompt: 

Developer note: The Dobby model is pretty funny

Notes to reviewers

Using any of these OpenGradient tools will require an OpenGradient private key (this can be generated through our SDK, generally users should have their own).

Question

For the README Update under the checklist, we may need some guidance on how you want our logos formatted under the providers list? Is there other updates needed for this file?

Future features

We're hoping to eventually include AlphaSense into the coinbase agent kit.

Alphasense is OpenGradient's langchain compatible toolkit for developing OG based tools. The reasoning behind providing this developer tool is that model inferences can end up being huge. For example, if your input is a 1000 int array that needs to be copied into the AI agent, it can easily pollute agent context window. By adding these tools in the coinbase agent kit we hope to allow users to write custom (essentially hard-coded) tools similar to the ones added in this PR.

Let us know what you think of this!

Overwriting all commits in order to make them verified. Here's a sum of the list of changes that lead up to this commit:
- Add OpenGradient action provider
- Add hard-coded OpenGradient tool functions for ML workflow
- Add prompt OpenGradient tools for Dobby and Qwen
- Add unit tests for OpenGradient tools
- Add block explorer links to each tool output
- Update CHANGELOG
- Add OpenGradient logo asset (might need to fix)
- Add OpenGradient to poetry.lock
Still need to update their function descriptions, but the unit tests are added and passing.
@cb-heimdall
Copy link

🟡 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 documentation Improvements or additions to documentation action provider New action provider wallet provider New wallet provider example New example agent python needs triage labels Feb 27, 2025
@murrlincoln
Copy link
Contributor

Thanks for contributing! Taking a look through this over the coming days and will provide any feedback

@github-actions github-actions bot removed the wallet provider New wallet provider label Mar 7, 2025
@0xRAG 0xRAG removed the needs triage label Mar 7, 2025
@phdargen
Copy link
Contributor

Hi @kylexqian , thanks for your contribution! Could you please rebase against main, then I will do some testing. A few initial comments below

## 🔒 Legal and Privacy

The AgentKit software is novel and experimental, and is therefore provided on an AS-IS basis. The software is intended to be used only for the purposes of assisting with designing blockchain transactions and enabling other API integrations using natural language inputs, and is not intended to provide (i) an offer, or solicitation of an offer, to invest in, or to buy or sell, any interests or shares, or to participate in any investment or trading strategy, (ii) accounting, legal, tax advice, investment recommendations or other professional advice or (iii) an official statement of Coinbase. Acts proposed or performed by an agent through AgentKit software are NOT acts of Coinbase. You should consult with a professional advisor before making any decisions based on the information provided by the software. You are not permitted to use the proceeds of loans or credit to purchase digital assets on or through coinbase.com, Coinbase's APIs, the Coinbase mobile application, or any other Coinbase website or product, including AgentKit. No representation or warranty is made, expressed or implied, with respect to the accuracy, completeness, reliability, security, or suitability of the software or to any information provided in connection with the software. The risk of loss through use of the software can be substantial, and you assume any and all risks of loss and liability. The software may produce output that is inaccurate, incorrect, unpredictable or undesirable, and it is the user’s exclusive responsibility to evaluate the output and the use-case and determine whether it is appropriate. The right to use the software is contingent on your agreement to the [CDP Terms of Service](https://www.coinbase.com/legal/developer-platform/terms-of-service) (except to the extent it conflicts with the Apache-2.0 license).
The AgentKit software is novel and experimental, and is therefore provided on an AS-IS basis. The software is intended to be used only for the purposes of assisting with designing blockchain transactions and enabling other API integrations using natural language inputs, and is not intended to provide (i) an offer, or solicitation of an offer, to invest in, or to buy or sell, any interests or shares, or to participate in any investment or trading strategy, (ii) accounting, legal, tax advice, investment recommendations or other professional advice or (iii) an official statement of Coinbase. Acts proposed or performed by an agent through AgentKit software are NOT acts of Coinbase. You should consult with a professional advisor before making any decisions based on the information provided by the software. You are not permitted to use the proceeds of loans or credit to purchase digital assets on or through coinbase.com, Coinbase's APIs, the Coinbase mobile application, or any other Coinbase website or product, including AgentKit. No representation or warranty is made, expressed or implied, with respect to the accuracy, completeness, reliability, security, or suitability of the software or to any information provided in connection with the software. The risk of loss through use of the software can be substantial, and you assume any and all risks of loss and liability. The software may produce output that is inaccurate, incorrect, unpredictable or undesirable, and it is the user’s exclusive responsibility to evaluate the output and the use-case and determine whether it is appropriate. The right to use the software is contingent on your agreement to the [CDP Terms of Service](https://www.coinbase.com/legal/developer-platform/terms-of-service) (except to the extent it conflicts with the Apache-2.0 license).
Copy link
Contributor

Choose a reason for hiding this comment

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

please revert


<!-- towncrier release notes start -->
## Unreleased
- Added `read_eth_usdt_one_hour_volatility_forecast` to read live volatility forecasts using OpenGradient's ML workflow
Copy link
Contributor

@phdargen phdargen Aug 12, 2025

Choose a reason for hiding this comment

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

please revert and add changlog entry as described here https://github.com/coinbase/agentkit/blob/main/CONTRIBUTING-PYTHON.md#changelog

@phdargen
Copy link
Contributor

Please revert all changes in langchain-cdp-chatbot, only commit the new action provider

@phdargen
Copy link
Contributor

Could you please add a README for the action provider, see eg erc20/README.md?.

This should also include how/where to get a OpenGradient private key. Where is this actually used in the code? Or does it mean it requires a wallet created with your sdk?

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

Labels

action provider New action provider banana documentation Improvements or additions to documentation example New example agent python

Development

Successfully merging this pull request may close these issues.

5 participants