Skip to content

feat(py): hyperbolic action provider #531

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

Merged
merged 3 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion python/coinbase-agentkit/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ifneq (,$(wildcard ./.env))
include .env
endif

export

.PHONY: install
install:
poetry install
Expand Down Expand Up @@ -28,12 +34,20 @@ local-docs: docs

.PHONY: test
test:
poetry run pytest -m "not integration"
poetry run pytest -m "not (e2e or integration)"

.PHONY: test-e2e
test-e2e:
poetry run pytest -m e2e

.PHONY: test-integration
test-integration:
poetry run pytest -m integration

.PHONY: check-description-length
check-description-length:
poetry run check-description-length

.PHONY: generate-action-provider
generate-action-provider:
poetry run generate-action-provider
319 changes: 319 additions & 0 deletions python/coinbase-agentkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ AgentKit is a framework for easily enabling AI agents to take actions onchain. I
- [Adding Actions to your Action Provider](#adding-actions-to-your-action-provider)
- [Adding Actions that use a Wallet Provider](#adding-actions-that-use-a-wallet-provider)
- [Adding an Action Provider to your AgentKit instance](#adding-an-action-provider-to-your-agentkit-instance)
- [Action Providers](#action-providers)
- [Wallet Providers](#wallet-providers)
- [CdpWalletProvider](#cdpwalletprovider)
- [Network Configuration](#network-configuration)
Expand Down Expand Up @@ -206,6 +207,324 @@ agent_kit = AgentKit(AgentKitConfig(
))
```

## Action Providers

This section provides a detailed list of all available action providers and their actions.

<details>
<summary><strong>Basename</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>register_basename</code></td>
<td width="768">Registers a custom .base.eth or .basetest.eth domain name for the wallet address.</td>
</tr>
</table>
</details>

<details>
<summary><strong>CDP Wallet</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>deploy_contract</code></td>
<td width="768">Deploys a custom smart contract using specified Solidity version and constructor arguments.</td>
</tr>
<tr>
<td width="200"><code>deploy_nft</code></td>
<td width="768">Deploys a standard ERC-721 NFT contract with configurable name, symbol, and metadata URI.</td>
</tr>
<tr>
<td width="200"><code>deploy_token</code></td>
<td width="768">Deploys a standard ERC-20 token contract with configurable name, symbol, and initial supply.</td>
</tr>
<tr>
<td width="200"><code>trade</code></td>
<td width="768">Executes a token swap between two assets at current market rates on mainnet networks.</td>
</tr>
</table>
</details>

<details>
<summary><strong>CDP API</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>fetch_price</code></td>
<td width="768">Retrieves the current price of a cryptocurrency from the CDP API.</td>
</tr>
<tr>
<td width="200"><code>fetch_base_scan</code></td>
<td width="768">Fetches on-chain data from Base blockchain explorer via CDP API.</td>
</tr>
</table>
</details>

<details>
<summary><strong>Compound</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>supply</code></td>
<td width="768">Supplies collateral assets (WETH, CBETH, CBBTC, WSTETH, or USDC) to Compound.</td>
</tr>
<tr>
<td width="200"><code>withdraw</code></td>
<td width="768">Withdraws previously supplied collateral assets from Compound.</td>
</tr>
<tr>
<td width="200"><code>borrow</code></td>
<td width="768">Borrows base assets (WETH or USDC) from Compound using supplied collateral.</td>
</tr>
<tr>
<td width="200"><code>repay</code></td>
<td width="768">Repays borrowed assets back to Compound.</td>
</tr>
<tr>
<td width="200"><code>get_portfolio</code></td>
<td width="768">Retrieves portfolio details including collateral balances and borrowed amounts.</td>
</tr>
</table>
</details>

<details>
<summary><strong>ERC20</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>get_balance</code></td>
<td width="768">Retrieves the token balance for a specified address and ERC-20 contract.</td>
</tr>
<tr>
<td width="200"><code>transfer</code></td>
<td width="768">Transfers a specified amount of ERC-20 tokens to a destination address.</td>
</tr>
</table>
</details>

<details>
<summary><strong>ERC721</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>get_balance</code></td>
<td width="768">Retrieves the NFT balance for a specified address and ERC-721 contract.</td>
</tr>
<tr>
<td width="200"><code>transfer</code></td>
<td width="768">Transfers ownership of a specific NFT token to a destination address.</td>
</tr>
<tr>
<td width="200"><code>mint</code></td>
<td width="768">Creates a new NFT token and assigns it to a specified destination address.</td>
</tr>
</table>
</details>

<details>
<summary><strong>Hyperbolic</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>generate_text</code></td>
<td width="768">Generate text using AI models.</td>
</tr>
<tr>
<td width="200"><code>generate_image</code></td>
<td width="768">Generate images using AI models.</td>
</tr>
<tr>
<td width="200"><code>generate_audio</code></td>
<td width="768">Generate text-to-speech audio.</td>
</tr>
<tr>
<td width="200"><code>get_available_gpus</code></td>
<td width="768">Get available GPU resources.</td>
</tr>
<tr>
<td width="200"><code>get_available_gpus_by_type</code></td>
<td width="768">Get GPUs filtered by model type.</td>
</tr>
<tr>
<td width="200"><code>get_available_gpus_types</code></td>
<td width="768">Get list of available GPU types.</td>
</tr>
<tr>
<td width="200"><code>get_gpu_status</code></td>
<td width="768">Check status of GPU resources.</td>
</tr>
<tr>
<td width="200"><code>rent_compute</code></td>
<td width="768">Rent GPU compute resources.</td>
</tr>
<tr>
<td width="200"><code>terminate_compute</code></td>
<td width="768">Terminate a rented GPU compute instance.</td>
</tr>
<tr>
<td width="200"><code>get_current_balance</code></td>
<td width="768">Get current account balance.</td>
</tr>
<tr>
<td width="200"><code>get_purchase_history</code></td>
<td width="768">Get purchase history.</td>
</tr>
<tr>
<td width="200"><code>get_spend_history</code></td>
<td width="768">Get spending history.</td>
</tr>
<tr>
<td width="200"><code>link_wallet_address</code></td>
<td width="768">Link a wallet address to your account.</td>
</tr>
</table>
</details>

<details>
<summary><strong>Morpho</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>deposit</code></td>
<td width="768">Deposits a specified amount of assets into a designated Morpho Vault.</td>
</tr>
<tr>
<td width="200"><code>withdraw</code></td>
<td width="768">Withdraws a specified amount of assets from a designated Morpho Vault.</td>
</tr>
</table>
</details>

<details>
<summary><strong>Pyth</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>fetch_price</code></td>
<td width="768">Retrieves current price data from a specified Pyth price feed.</td>
</tr>
<tr>
<td width="200"><code>fetch_price_feed_id</code></td>
<td width="768">Retrieves the unique price feed identifier for a given token symbol.</td>
</tr>
</table>
</details>

<details>
<summary><strong>SSH</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>ssh_connect</code></td>
<td width="768">Establishes an SSH connection to a remote server.</td>
</tr>
<tr>
<td width="200"><code>remote_shell</code></td>
<td width="768">Executes shell commands on a remote server via SSH.</td>
</tr>
<tr>
<td width="200"><code>ssh_status</code></td>
<td width="768">Checks status of SSH connections.</td>
</tr>
<tr>
<td width="200"><code>ssh_list_connections</code></td>
<td width="768">Lists active SSH connections.</td>
</tr>
<tr>
<td width="200"><code>ssh_disconnect</code></td>
<td width="768">Disconnects from an SSH server.</td>
</tr>
<tr>
<td width="200"><code>ssh_add_host_key</code></td>
<td width="768">Adds an SSH host key to known_hosts.</td>
</tr>
<tr>
<td width="200"><code>sftp_upload</code></td>
<td width="768">Uploads files to a remote server via SFTP.</td>
</tr>
<tr>
<td width="200"><code>sftp_download</code></td>
<td width="768">Downloads files from a remote server via SFTP.</td>
</tr>
</table>
</details>

<details>
<summary><strong>Superfluid</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>create_flow</code></td>
<td width="768">Creates a new token streaming flow to a recipient address.</td>
</tr>
<tr>
<td width="200"><code>delete_flow</code></td>
<td width="768">Deletes an existing token streaming flow.</td>
</tr>
<tr>
<td width="200"><code>get_flow</code></td>
<td width="768">Gets details of an existing token streaming flow.</td>
</tr>
</table>
</details>

<details>
<summary><strong>Twitter</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>account_details</code></td>
<td width="768">Fetches profile information and metadata for the authenticated Twitter account.</td>
</tr>
<tr>
<td width="200"><code>account_mentions</code></td>
<td width="768">Retrieves recent mentions and interactions for the authenticated account.</td>
</tr>
<tr>
<td width="200"><code>post_tweet</code></td>
<td width="768">Creates a new tweet on the authenticated Twitter account.</td>
</tr>
<tr>
<td width="200"><code>post_tweet_reply</code></td>
<td width="768">Creates a reply to an existing tweet using the tweet's unique identifier.</td>
</tr>
</table>
</details>

<details>
<summary><strong>Wallet</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>get_wallet_details</code></td>
<td width="768">Retrieves wallet address, network info, balances, and provider details.</td>
</tr>
<tr>
<td width="200"><code>get_balance</code></td>
<td width="768">Gets the native currency balance of the connected wallet.</td>
</tr>
<tr>
<td width="200"><code>native_transfer</code></td>
<td width="768">Transfers native blockchain tokens (e.g., ETH) to a destination address.</td>
</tr>
</table>
</details>

<details>
<summary><strong>WETH</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>wrap_eth</code></td>
<td width="768">Converts native ETH to Wrapped ETH (WETH) on supported networks.</td>
</tr>
</table>
</details>

<details>
<summary><strong>WOW</strong></summary>
<table width="100%">
<tr>
<td width="200"><code>buy_token</code></td>
<td width="768">Purchases WOW tokens from a contract using ETH based on bonding curve pricing.</td>
</tr>
<tr>
<td width="200"><code>create_token</code></td>
<td width="768">Creates a new WOW memecoin with bonding curve functionality via Zora factory.</td>
</tr>
<tr>
<td width="200"><code>sell_token</code></td>
<td width="768">Sells WOW tokens back to the contract for ETH based on bonding curve pricing.</td>
</tr>
</table>
</details>

## Wallet Providers

AgentKit supports the following wallet providers:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added: Hyperbolic action providers for AI, Billing, Marketplace, and Settings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added: SSH action provider for connecting, running remote commands, downloading and uploading
Loading