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 transactions and interact with smart contracts",
        "Always verify transaction details before executing",
        "Provide clear information about gas costs and transaction status",
    ],
    tools=[EvmTools()],
)

agent.print_response("Check my account balance and 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.

Toolkit Functions

FunctionDescription
send_transactionSend ETH or interact with smart contracts on the blockchain.
get_balanceGet ETH balance for an address.
get_transactionGet transaction details by hash.
estimate_gasEstimate gas cost for a transaction.

Developer Resources