# AgentKit
AgentKit is a framework for easily enabling AI agents to take actions onchain. It is designed to be framework-agnostic, so you can use it with any AI framework, and wallet-agnostic, so you can use it with any wallet.
## Table of Contents
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Usage](#usage)
- [Create an AgentKit instance](#create-an-agentkit-instance)
- [Create an AgentKit instance with a specified wallet provider](#create-an-agentkit-instance-with-a-specified-wallet-provider)
- [Create an AgentKit instance with specified action providers](#create-an-agentkit-instance-with-specified-action-providers)
- [Use with a framework extension (e.g., LangChain + OpenAI)](#use-with-a-framework-extension)
- [Creating an Action Provider](#creating-an-action-provider)
- [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)
- [Wallet Providers](#wallet-providers)
- [CdpWalletProvider](#cdpwalletprovider)
- [Network Configuration](#network-configuration)
- [Configuring from an existing CDP API Wallet](#configuring-from-an-existing-cdp-api-wallet)
- [Configuring from a mnemonic phrase](#configuring-from-a-mnemonic-phrase)
- [Exporting a wallet](#exporting-a-wallet)
- [Importing a wallet from WalletData JSON string](#importing-a-wallet-from-walletdata-json-string)
- [Configuring gas parameters](#configuring-cdpwalletprovider-gas-parameters)
- [EthAccountWalletProvider](#ethaccountwalletprovider)
- [Configuring gas parameters](#configuring-ethaccountwalletprovider-gas-parameters)
- [Contributing](#contributing)
## Getting Started
*Prerequisites*:
- [Python 3.10+](https://www.python.org/downloads/)
- [CDP Secret API Key](https://docs.cdp.coinbase.com/get-started/docs/cdp-api-keys#creating-secret-api-keys)
## Installation
```bash
pip install coinbase-agentkit
```
## Usage
### Create an AgentKit instance
If no wallet or action providers are specified, the agent will use the `CdpWalletProvider` and `WalletActionProvider` action provider by default.
```python
from coinbase_agentkit import AgentKit, AgentKitConfig
agent_kit = AgentKit()
```
### Create an AgentKit instance with a specified wallet provider
```python
from coinbase_agentkit import (
AgentKit,
AgentKitConfig,
CdpWalletProvider,
CdpWalletProviderConfig
)
wallet_provider = CdpWalletProvider(CdpWalletProviderConfig(
api_key_name="CDP API KEY NAME",
api_key_private="CDP API KEY PRIVATE KEY",
network_id="base-mainnet"
))
agent_kit = AgentKit(AgentKitConfig(
wallet_provider=wallet_provider
))
```
### Create an AgentKit instance with specified action providers
```python
from coinbase_agentkit import (
AgentKit,
AgentKitConfig,
cdp_api_action_provider,
pyth_action_provider
)
agent_kit = AgentKit(AgentKitConfig(
wallet_provider=wallet_provider,
action_providers=[
cdp_api_action_provider(
api_key_name="CDP API KEY NAME",
api_key_private="CDP API KEY PRIVATE KEY"
),
pyth_action_provider()
]
))
```
### Use with a framework extension
Example using LangChain + OpenAI:
*Prerequisites*:
- [OpenAI API Key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key)
- Set `OPENAI_API_KEY` environment variable
```bash
poetry add coinbase-agentkit-langchain langchain-openai langgraph
```
```python
from coinbase_agentkit_langchain import get_langchain_tools
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
tools = get_langchain_tools(agent_kit)
llm = ChatOpenAI(model="gpt-4")
agent = create_react_agent(
llm=llm,
tools=tools
)
```
## Creating an Action Provider
Action providers define the actions that an agent can take. They are created by subclassing the `ActionProvider` abstract class.
```python
from coinbase_agentkit import ActionProvider, WalletProvider, Network
class MyActionProvider(ActionProvider[WalletProvider]):
def __init__(self):
super().__init__("my-action-provider", [])
# Define if the action provider supports the given network
def supports_network(self, network: Network) -> bool:
return True
```
### Adding Actions to your Action Provider
Actions are defined using the `@create_action` decorator. They can optionally use a wallet provider and must return a string.
1. Define the action schema using Pydantic:
```python
from pydantic import BaseModel
class MyActionSchema(BaseModel):
my_field: str
```
2. Define the action:
```python
from coinbase_agentkit import ActionProvider, WalletProvider, Network, create_action
class MyActionProvider(ActionProvider[WalletProvider]):
def __init__(self):
super().__init__("my-action-provider", [])
@create_action(
name="my-action",
description="My action description",
schema=MyActionSchema
)
def my_action(self, args: dict[str, Any]) -> str:
return args["my_field"]
def supports_network(self, network: Network) -> bool:
return True
def my_action_provider():
return MyActionProvider()
```
### Adding Actions that use a Wallet Provider
Actions that need access to a wallet provider can include it as their first parameter:
```python
from coinbase_agentkit import ActionProvider, WalletProvider, create_action
class MyActionProvider(ActionProvider[WalletProvider]):
@create_action(
name="my-action",
description="My action description",
schema=MyActionSchema
)
def my_action(self, wallet_provider: WalletProvider, args: dict[str, Any]) -> str:
return wallet_provider.sign_message(args["my_field"])
```
### Adding an Action Provider to your AgentKit instance
```python
agent_kit = AgentKit(AgentKitConfig(
cdp_api_key_name="CDP API KEY NAME",
cdp_api_key_private="CDP API KEY PRIVATE KEY",
action_providers=[my_action_provider()]
))
```
## Wallet Providers
AgentKit supports the following wallet providers:
EVM:
- [CdpWalletProvider](https://github.com/coinbase/agentkit/blob/master/python/coinbase_agentkit/wallet_providers/cdp_wallet_provider.py) - Uses the Coinbase Developer Platform (CDP) API Wallet
- [EthAccountWalletProvider](https://github.com/coinbase/agentkit/blob/master/python/coinbase_agentkit/wallet_providers/eth_account_wallet_provider.py) - Uses a local private key for any EVM-compatible chain
### CdpWalletProvider
The `CdpWalletProvider` is a wallet provider that uses the Coinbase Developer Platform (CDP) [API Wallet](https://docs.cdp.coinbase.com/wallet-api/docs/welcome).
#### Network Configuration
The `CdpWalletProvider` can be configured to use a specific network by passing the `network_id` parameter to the `CdpWalletProviderConfig`. The `network_id` is the ID of the network you want to use. You can find a list of [supported networks on the CDP API docs](https://docs.cdp.coinbase.com/cdp-apis/docs/networks).
```python
from coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig
wallet_provider = CdpWalletProvider(CdpWalletProviderConfig(
api_key_name="CDP API KEY NAME",
api_key_private="CDP API KEY PRIVATE KEY",
network_id="base-mainnet",
))
```
#### Configuring from an existing CDP API Wallet
If you already have a CDP API Wallet, you can configure the `CdpWalletProvider` by passing the `wallet` parameter to the `configureWithWallet` method.
```python
from coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig
from cdp import Wallet
wallet_provider = CdpWalletProvider(CdpWalletProviderConfig(
wallet=wallet,
api_key_name="CDP API KEY NAME",
api_key_private="CDP API KEY PRIVATE KEY",
))
```
#### Configuring from a mnemonic phrase
The `CdpWalletProvider` can be configured from a mnemonic phrase by passing the `mnemonic_phrase` and `network_id` parameters to the `CdpWalletProviderConfig`. If `network_id` is not defined, the `CdpWalletProvider` will fall back to the env var `NETWORK_ID`, and if that is not defined, it will default to `base-sepolia`.
```python
from coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig
wallet_provider = CdpWalletProvider(CdpWalletProviderConfig(
mnemonic_phrase="MNEMONIC PHRASE",
network_id="base-sepolia",
))
```
#### Exporting a wallet
The `CdpWalletProvider` can export a wallet by calling the `export_wallet` method.
```python
from coinbase_agentkit import CdpWalletProvider
wallet_provider = CdpWalletProvider(CdpWalletProviderConfig(
mnemonic_phrase="MNEMONIC PHRASE",
network_id="base-sepolia",
))
wallet_data = wallet_provider.export_wallet()
```
#### Importing a wallet from `WalletData` JSON string
The `CdpWalletProvider` can import a wallet from a `WalletData` JSON string by passing the `cdp_wallet_data` parameter to the `CdpWalletProviderConfig`.
```python
from coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig
wallet_provider = CdpWalletProvider(CdpWalletProviderConfig(
wallet_data="WALLET DATA JSON STRING",
api_key_name="CDP API KEY NAME",
api_key_private="CDP API KEY PRIVATE KEY",
))
```
#### Configuring `CdpWalletProvider` gas parameters
The `CdpWalletProvider` also exposes parameters for effecting the gas calculations.
```python
from coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig
wallet_provider = CdpWalletProvider(CdpWalletProviderConfig(
wallet_data="WALLET DATA JSON STRING",
api_key_name="CDP API KEY NAME",
api_key_private="CDP API KEY PRIVATE KEY",
gas={
"gas_limit_multiplier": 2.0, # Adjusts gas limit estimation
"fee_per_gas_multiplier": 2.0 # Adjusts max fee per gas
}
))
```
**Note**: Gas parameters only impact the `wallet_provider.send_transaction` behavior. Actions that do not rely on direct transaction calls, such as `deploy_token`, `deploy_contract`, and `native_transfer`, remain unaffected.
### EthAccountWalletProvider
Example usage with a private key:
```python
import os
from eth_account import Account
from coinbase_agentkit import (
AgentKit,
AgentKitConfig,
EthAccountWalletProvider,
EthAccountWalletProviderConfig
)
# See here for creating a private key:
# https://web3py.readthedocs.io/en/stable/web3.eth.account.html#creating-a-private-key
private_key = os.environ.get("PRIVATE_KEY")
assert private_key is not None, "You must set PRIVATE_KEY environment variable"
assert private_key.startswith("0x"), "Private key must start with 0x hex prefix"
account = Account.from_key(private_key)
wallet_provider = EthAccountWalletProvider(
config=EthAccountWalletProviderConfig(
account=account,
chain_id="84532",
)
)
agent_kit = AgentKit(AgentKitConfig(
wallet_provider=wallet_provider
))
```
#### Configuring `EthAccountWalletProvider` gas parameters
The `EthAccountWalletProvider` also exposes parameters for effecting the gas calculations.
```python
import os
from eth_account import Account
from coinbase_agentkit import (
AgentKit,
AgentKitConfig,
EthAccountWalletProvider,
EthAccountWalletProviderConfig
)
private_key = os.environ.get("PRIVATE_KEY")
assert private_key is not None, "You must set PRIVATE_KEY environment variable"
assert private_key.startswith("0x"), "Private key must start with 0x hex prefix"
account = Account.from_key(private_key)
wallet_provider = EthAccountWalletProvider(
config=EthAccountWalletProviderConfig(
account=account,
chain_id="84532",
gas={
"gas_limit_multiplier": 2,
"fee_per_gas_multiplier": 2
}
)
)
agent_kit = AgentKit(AgentKitConfig(
wallet_provider=wallet_provider
))
```
## Contributing
See [CONTRIBUTING.md](https://github.com/coinbase/agentkit/blob/master/CONTRIBUTING.md) for more information.
Raw data
{
"_id": null,
"home_page": null,
"name": "coinbase-agentkit",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "coinbase, sdk, crypto, cdp, agentkit, ai, agent",
"author": "John Peterson",
"author_email": "john.peterson@coinbase.com",
"download_url": "https://files.pythonhosted.org/packages/bb/30/60501aa8618faa07a1ad8d94004683cbf8bc34efe41c561e47409eb134ad/coinbase_agentkit-0.1.3.tar.gz",
"platform": null,
"description": "# AgentKit\n\nAgentKit is a framework for easily enabling AI agents to take actions onchain. It is designed to be framework-agnostic, so you can use it with any AI framework, and wallet-agnostic, so you can use it with any wallet.\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [Installation](#installation)\n- [Usage](#usage)\n - [Create an AgentKit instance](#create-an-agentkit-instance)\n - [Create an AgentKit instance with a specified wallet provider](#create-an-agentkit-instance-with-a-specified-wallet-provider)\n - [Create an AgentKit instance with specified action providers](#create-an-agentkit-instance-with-specified-action-providers)\n - [Use with a framework extension (e.g., LangChain + OpenAI)](#use-with-a-framework-extension)\n- [Creating an Action Provider](#creating-an-action-provider)\n - [Adding Actions to your Action Provider](#adding-actions-to-your-action-provider)\n - [Adding Actions that use a Wallet Provider](#adding-actions-that-use-a-wallet-provider)\n - [Adding an Action Provider to your AgentKit instance](#adding-an-action-provider-to-your-agentkit-instance)\n- [Wallet Providers](#wallet-providers)\n - [CdpWalletProvider](#cdpwalletprovider)\n - [Network Configuration](#network-configuration)\n - [Configuring from an existing CDP API Wallet](#configuring-from-an-existing-cdp-api-wallet)\n - [Configuring from a mnemonic phrase](#configuring-from-a-mnemonic-phrase)\n - [Exporting a wallet](#exporting-a-wallet)\n - [Importing a wallet from WalletData JSON string](#importing-a-wallet-from-walletdata-json-string)\n - [Configuring gas parameters](#configuring-cdpwalletprovider-gas-parameters)\n - [EthAccountWalletProvider](#ethaccountwalletprovider)\n - [Configuring gas parameters](#configuring-ethaccountwalletprovider-gas-parameters)\n- [Contributing](#contributing)\n## Getting Started\n\n*Prerequisites*:\n- [Python 3.10+](https://www.python.org/downloads/)\n- [CDP Secret API Key](https://docs.cdp.coinbase.com/get-started/docs/cdp-api-keys#creating-secret-api-keys)\n\n## Installation\n\n```bash\npip install coinbase-agentkit\n```\n\n## Usage\n\n### Create an AgentKit instance\n\nIf no wallet or action providers are specified, the agent will use the `CdpWalletProvider` and `WalletActionProvider` action provider by default.\n\n```python\nfrom coinbase_agentkit import AgentKit, AgentKitConfig\n\nagent_kit = AgentKit()\n```\n\n### Create an AgentKit instance with a specified wallet provider\n\n```python\nfrom coinbase_agentkit import (\n AgentKit, \n AgentKitConfig, \n CdpWalletProvider, \n CdpWalletProviderConfig\n)\n\nwallet_provider = CdpWalletProvider(CdpWalletProviderConfig(\n api_key_name=\"CDP API KEY NAME\",\n api_key_private=\"CDP API KEY PRIVATE KEY\",\n network_id=\"base-mainnet\"\n))\n\nagent_kit = AgentKit(AgentKitConfig(\n wallet_provider=wallet_provider\n))\n```\n\n### Create an AgentKit instance with specified action providers\n\n```python\nfrom coinbase_agentkit import (\n AgentKit,\n AgentKitConfig,\n cdp_api_action_provider,\n pyth_action_provider\n)\n\nagent_kit = AgentKit(AgentKitConfig(\n wallet_provider=wallet_provider,\n action_providers=[\n cdp_api_action_provider(\n api_key_name=\"CDP API KEY NAME\",\n api_key_private=\"CDP API KEY PRIVATE KEY\"\n ),\n pyth_action_provider()\n ]\n))\n```\n\n### Use with a framework extension\n\nExample using LangChain + OpenAI:\n\n*Prerequisites*:\n- [OpenAI API Key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key)\n- Set `OPENAI_API_KEY` environment variable\n\n```bash\npoetry add coinbase-agentkit-langchain langchain-openai langgraph\n```\n\n```python\nfrom coinbase_agentkit_langchain import get_langchain_tools\nfrom langgraph.prebuilt import create_react_agent\nfrom langchain_openai import ChatOpenAI\n\ntools = get_langchain_tools(agent_kit)\n\nllm = ChatOpenAI(model=\"gpt-4\")\n\nagent = create_react_agent(\n llm=llm,\n tools=tools\n)\n```\n\n## Creating an Action Provider\n\nAction providers define the actions that an agent can take. They are created by subclassing the `ActionProvider` abstract class.\n\n```python\nfrom coinbase_agentkit import ActionProvider, WalletProvider, Network\n\nclass MyActionProvider(ActionProvider[WalletProvider]):\n def __init__(self):\n super().__init__(\"my-action-provider\", [])\n \n # Define if the action provider supports the given network\n def supports_network(self, network: Network) -> bool:\n return True\n```\n\n### Adding Actions to your Action Provider\n\nActions are defined using the `@create_action` decorator. They can optionally use a wallet provider and must return a string.\n\n1. Define the action schema using Pydantic:\n\n```python\nfrom pydantic import BaseModel\n\nclass MyActionSchema(BaseModel):\n my_field: str\n```\n\n2. Define the action:\n\n```python\nfrom coinbase_agentkit import ActionProvider, WalletProvider, Network, create_action\n\nclass MyActionProvider(ActionProvider[WalletProvider]):\n def __init__(self):\n super().__init__(\"my-action-provider\", [])\n\n @create_action(\n name=\"my-action\",\n description=\"My action description\",\n schema=MyActionSchema\n )\n def my_action(self, args: dict[str, Any]) -> str:\n return args[\"my_field\"]\n\n def supports_network(self, network: Network) -> bool:\n return True\n\ndef my_action_provider():\n return MyActionProvider()\n```\n\n### Adding Actions that use a Wallet Provider\n\nActions that need access to a wallet provider can include it as their first parameter:\n\n```python\nfrom coinbase_agentkit import ActionProvider, WalletProvider, create_action\n\nclass MyActionProvider(ActionProvider[WalletProvider]):\n @create_action(\n name=\"my-action\",\n description=\"My action description\",\n schema=MyActionSchema\n )\n def my_action(self, wallet_provider: WalletProvider, args: dict[str, Any]) -> str:\n return wallet_provider.sign_message(args[\"my_field\"])\n```\n\n### Adding an Action Provider to your AgentKit instance\n\n```python\nagent_kit = AgentKit(AgentKitConfig(\n cdp_api_key_name=\"CDP API KEY NAME\",\n cdp_api_key_private=\"CDP API KEY PRIVATE KEY\",\n action_providers=[my_action_provider()]\n))\n```\n\n## Wallet Providers\n\nAgentKit supports the following wallet providers:\n\nEVM:\n- [CdpWalletProvider](https://github.com/coinbase/agentkit/blob/master/python/coinbase_agentkit/wallet_providers/cdp_wallet_provider.py) - Uses the Coinbase Developer Platform (CDP) API Wallet\n- [EthAccountWalletProvider](https://github.com/coinbase/agentkit/blob/master/python/coinbase_agentkit/wallet_providers/eth_account_wallet_provider.py) - Uses a local private key for any EVM-compatible chain\n\n### CdpWalletProvider\n\nThe `CdpWalletProvider` is a wallet provider that uses the Coinbase Developer Platform (CDP) [API Wallet](https://docs.cdp.coinbase.com/wallet-api/docs/welcome).\n\n#### Network Configuration\n\nThe `CdpWalletProvider` can be configured to use a specific network by passing the `network_id` parameter to the `CdpWalletProviderConfig`. The `network_id` is the ID of the network you want to use. You can find a list of [supported networks on the CDP API docs](https://docs.cdp.coinbase.com/cdp-apis/docs/networks).\n\n```python\nfrom coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig\n\nwallet_provider = CdpWalletProvider(CdpWalletProviderConfig(\n api_key_name=\"CDP API KEY NAME\",\n api_key_private=\"CDP API KEY PRIVATE KEY\",\n network_id=\"base-mainnet\",\n))\n```\n\n#### Configuring from an existing CDP API Wallet\n\nIf you already have a CDP API Wallet, you can configure the `CdpWalletProvider` by passing the `wallet` parameter to the `configureWithWallet` method.\n\n```python\nfrom coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig\nfrom cdp import Wallet\n\nwallet_provider = CdpWalletProvider(CdpWalletProviderConfig(\n wallet=wallet,\n api_key_name=\"CDP API KEY NAME\",\n api_key_private=\"CDP API KEY PRIVATE KEY\",\n))\n```\n\n#### Configuring from a mnemonic phrase\n\nThe `CdpWalletProvider` can be configured from a mnemonic phrase by passing the `mnemonic_phrase` and `network_id` parameters to the `CdpWalletProviderConfig`. If `network_id` is not defined, the `CdpWalletProvider` will fall back to the env var `NETWORK_ID`, and if that is not defined, it will default to `base-sepolia`.\n\n\n```python\nfrom coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig\n\nwallet_provider = CdpWalletProvider(CdpWalletProviderConfig(\n mnemonic_phrase=\"MNEMONIC PHRASE\",\n network_id=\"base-sepolia\",\n))\n```\n\n#### Exporting a wallet\n\nThe `CdpWalletProvider` can export a wallet by calling the `export_wallet` method.\n\n```python\nfrom coinbase_agentkit import CdpWalletProvider\n\nwallet_provider = CdpWalletProvider(CdpWalletProviderConfig(\n mnemonic_phrase=\"MNEMONIC PHRASE\",\n network_id=\"base-sepolia\",\n))\n\nwallet_data = wallet_provider.export_wallet()\n```\n\n#### Importing a wallet from `WalletData` JSON string\n\nThe `CdpWalletProvider` can import a wallet from a `WalletData` JSON string by passing the `cdp_wallet_data` parameter to the `CdpWalletProviderConfig`.\n\n```python\nfrom coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig\n\nwallet_provider = CdpWalletProvider(CdpWalletProviderConfig(\n wallet_data=\"WALLET DATA JSON STRING\",\n api_key_name=\"CDP API KEY NAME\",\n api_key_private=\"CDP API KEY PRIVATE KEY\",\n))\n```\n\n#### Configuring `CdpWalletProvider` gas parameters\n\nThe `CdpWalletProvider` also exposes parameters for effecting the gas calculations.\n\n```python\nfrom coinbase_agentkit import CdpWalletProvider, CdpWalletProviderConfig\n\nwallet_provider = CdpWalletProvider(CdpWalletProviderConfig(\n wallet_data=\"WALLET DATA JSON STRING\",\n api_key_name=\"CDP API KEY NAME\",\n api_key_private=\"CDP API KEY PRIVATE KEY\",\n gas={\n \"gas_limit_multiplier\": 2.0, # Adjusts gas limit estimation\n \"fee_per_gas_multiplier\": 2.0 # Adjusts max fee per gas\n }\n))\n```\n\n**Note**: Gas parameters only impact the `wallet_provider.send_transaction` behavior. Actions that do not rely on direct transaction calls, such as `deploy_token`, `deploy_contract`, and `native_transfer`, remain unaffected.\n\n### EthAccountWalletProvider\n\nExample usage with a private key:\n\n```python\nimport os\nfrom eth_account import Account\n\nfrom coinbase_agentkit import (\n AgentKit, \n AgentKitConfig, \n EthAccountWalletProvider, \n EthAccountWalletProviderConfig\n)\n\n# See here for creating a private key:\n# https://web3py.readthedocs.io/en/stable/web3.eth.account.html#creating-a-private-key\nprivate_key = os.environ.get(\"PRIVATE_KEY\")\nassert private_key is not None, \"You must set PRIVATE_KEY environment variable\"\nassert private_key.startswith(\"0x\"), \"Private key must start with 0x hex prefix\"\n\naccount = Account.from_key(private_key)\n\nwallet_provider = EthAccountWalletProvider(\n config=EthAccountWalletProviderConfig(\n account=account,\n chain_id=\"84532\",\n )\n)\n\nagent_kit = AgentKit(AgentKitConfig(\n wallet_provider=wallet_provider\n))\n```\n\n#### Configuring `EthAccountWalletProvider` gas parameters\n\nThe `EthAccountWalletProvider` also exposes parameters for effecting the gas calculations.\n\n```python\nimport os\nfrom eth_account import Account\n\nfrom coinbase_agentkit import (\n AgentKit, \n AgentKitConfig, \n EthAccountWalletProvider, \n EthAccountWalletProviderConfig\n)\n\nprivate_key = os.environ.get(\"PRIVATE_KEY\")\nassert private_key is not None, \"You must set PRIVATE_KEY environment variable\"\nassert private_key.startswith(\"0x\"), \"Private key must start with 0x hex prefix\"\n\naccount = Account.from_key(private_key)\n\nwallet_provider = EthAccountWalletProvider(\n config=EthAccountWalletProviderConfig(\n account=account,\n chain_id=\"84532\",\n gas={\n \"gas_limit_multiplier\": 2,\n \"fee_per_gas_multiplier\": 2\n }\n )\n)\n\nagent_kit = AgentKit(AgentKitConfig(\n wallet_provider=wallet_provider\n))\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/coinbase/agentkit/blob/master/CONTRIBUTING.md) for more information.\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Coinbase AgentKit",
"version": "0.1.3",
"project_urls": null,
"split_keywords": [
"coinbase",
" sdk",
" crypto",
" cdp",
" agentkit",
" ai",
" agent"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e3254d10d3c99bcceeba39edf1b68582094ceae5ec887c15401cad39f5659595",
"md5": "041b8e6ef3d26e4b46248f757d418731",
"sha256": "78b45cc830efb64080e60c7a50f207a105434effe9029e1f7321360bcc522052"
},
"downloads": -1,
"filename": "coinbase_agentkit-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "041b8e6ef3d26e4b46248f757d418731",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 69401,
"upload_time": "2025-02-21T21:42:18",
"upload_time_iso_8601": "2025-02-21T21:42:18.585988Z",
"url": "https://files.pythonhosted.org/packages/e3/25/4d10d3c99bcceeba39edf1b68582094ceae5ec887c15401cad39f5659595/coinbase_agentkit-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bb3060501aa8618faa07a1ad8d94004683cbf8bc34efe41c561e47409eb134ad",
"md5": "ca93682e375d7cdb1f2b729ea596ad0f",
"sha256": "9dd15229eda9caf68a68d9834bed0dc0106a4b3d5f0664372ac69402fbbf4fce"
},
"downloads": -1,
"filename": "coinbase_agentkit-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "ca93682e375d7cdb1f2b729ea596ad0f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 42550,
"upload_time": "2025-02-21T21:42:19",
"upload_time_iso_8601": "2025-02-21T21:42:19.882235Z",
"url": "https://files.pythonhosted.org/packages/bb/30/60501aa8618faa07a1ad8d94004683cbf8bc34efe41c561e47409eb134ad/coinbase_agentkit-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-21 21:42:19",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "coinbase-agentkit"
}