Added Aave actions support to the AgentKit [PR Contribution]
Prize Pool
The Aave Action Provider integrates Aave V3 lending protocol with AgentKit, enabling AI agents to perform DeFi operations through natural language commands. Currently supports Base network operations for USDC and ETH. Using Aave sdk for protocol interactions and agentkit chatbot for interacting with the ai agent.
The Aave Action Provider integrates Aave V3 lending protocol with AgentKit, enabling AI agents to perform DeFi operations through natural language commands. Currently supports Base network operations for USDC and ETH.
agentkit/src/action-providers/aave/
├── aaveActionProvider.ts # Main provider implementation
├── aaveActionProvider.test.ts # Test suite
├── constants.ts # Protocol addresses & configs
├── schemas.ts # Zod validation schemas
└── index.ts # Public exports
@CreateAction({
name: "supply",
description: "Supply assets to Aave protocol",
schema: SupplySchema,
})
Supports USDC and ETH deposits
Handles token approvals automatically
Converts human amounts to protocol units
@CreateAction({
name: "withdraw",
description: "Withdraw assets from Aave protocol",
schema: WithdrawSchema,
})
Supports USDC and ETH withdrawals
Verifies aToken balances
Manages gas optimization
// examples/langchain-cdp-chatbot/test-aave.ts
const agent = new Agent({
actionProviders: [new AaveActionProvider()],
});
// Natural language command
const result = await agent.chat(`
Supply 100 USDC to Aave on Base network
`);
@aave/contract-helpers: Protocol interactions
@bgd-labs/aave-address-book: Contract addresses
ethers: Web3 provider
viem: Amount handling
Balance verification
Network validation
Transaction failures
Approval errors
Mocked provider interactions
Success and failure scenarios
Balance checks
Network validation
// agentkit/src/index.ts
export { AaveActionProvider } from './action-providers/aave';
// In your agent
import { AaveActionProvider } from 'agentkit';
# examples/langchain-cdp-chatbot/.env
PROVIDER_URL=https://mainnet.base.org
WALLET_KEY=your_private_key
Base network only
USDC and ETH support
Single position management
Multi-network support
Additional assets
Position optimization
Collateral management
This integration enables AI agents to interact with Aave through a secure, type-safe interface while maintaining protocol-level safety checks.