EVM (Ethereum Virtual Machine)

EvmTools enable an Agent to send ETH transactions on Ethereum and EVM-compatible blockchains.

Prerequisites

The EVM tools require the web3 Python package and a funded wallet.

uv pip install agno web3 openai
export EVM_PRIVATE_KEY=0x***
export EVM_RPC_URL=***

Example

The following agent can interact with Ethereum blockchain:

from agno.agent import Agent
from agno.tools.evm import EvmTools

agent = Agent(
    instructions=[
        "You are a blockchain assistant that helps with Ethereum transactions",
        "Help users send ETH transactions to the address they provide",
        "Always verify transaction details before executing",
        "Report the transaction hash once the transaction completes",
    ],
    tools=[EvmTools()],
)

agent.print_response("Send 0.01 ETH to 0x742d35Cc6634C0532925a3b8D4034DfA8e5D5C4B", stream=True)

Toolkit Params

ParameterTypeDefaultDescription
private_keyOptional[str]NonePrivate key for signing transactions. Uses EVM_PRIVATE_KEY.
rpc_urlOptional[str]NoneRPC URL for blockchain connection. Uses EVM_RPC_URL.
enable_send_transactionboolTrueEnable transaction sending functionality.
allboolFalseEnable all functionality.

Toolkit Functions

FunctionDescription
send_transactionSend ETH to an address, signed with the configured private key.

Transfer scope

send_transaction sends the chain's native currency using an integer amount_in_wei. It uses a fixed 21,000 gas limit and EIP-1559 fee fields, then waits for a receipt. Use an RPC endpoint that supports those fee fields. This method is for simple native-currency transfers; it does not encode token transfers or arbitrary contract calls. Replace example wallet, recipient, and RPC values with the accounts and network you intend to use.

Developer Resources