Coinbase AgentKit ActionProvider for Floe DeFi lending protocol on Base
Project description
floe-agentkit-actions
Coinbase AgentKit ActionProvider for the Floe DeFi lending protocol on Base.
23 AI-agent actions for intent-based lending, flash loan arbitrage, and loan management.
Installation
pip install floe-agentkit-actions
# With CLI support
pip install floe-agentkit-actions[cli]
# With LangChain integration
pip install floe-agentkit-actions[langchain]
Quick Start
As an AgentKit Provider
from coinbase_agentkit import AgentKit, AgentKitConfig
from floe_agentkit_actions import floe_action_provider
agentkit = AgentKit(AgentKitConfig(
wallet_provider=wallet_provider,
action_providers=[floe_action_provider()],
))
Standalone Usage
from floe_agentkit_actions import floe_action_provider
floe = floe_action_provider()
result = floe.get_price(wallet_provider, {
"collateral_token": "0x4200000000000000000000000000000000000006", # WETH
"loan_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", # USDC
})
print(result)
CLI
floe-agent
Interactive AI-powered DeFi agent with support for OpenAI, Claude, and Ollama.
Actions (23)
Read (8)
get_markets— Query lending market infoget_loan— Get loan detailsget_my_loans— All loans for connected walletcheck_loan_health— Health status and liquidation distanceget_price— Oracle price (Chainlink + Pyth)get_accrued_interest— Interest accrued on a loanget_liquidation_quote— Liquidation profit/loss breakdownget_intent_book— Look up on-chain intent by hash
Write (7)
post_lend_intent— Post lending offer at fixed ratepost_borrow_intent— Post borrow request with collateralmatch_intents— Match lend + borrow intents to create loanrepay_loan— Fully or partially repay loanadd_collateral— Add collateral to improve healthwithdraw_collateral— Withdraw excess collateralliquidate_loan— Liquidate unhealthy loan
Flash Loans (5)
get_flash_loan_fee— Query protocol flash feeestimate_flash_arb_profit— Simulate multi-leg arb profitflash_loan— Raw flash loan (receiver must be smart contract)flash_arb— Flash arb via FlashArbReceiverget_flash_arb_balance— Check accumulated profit
Deploy (3)
deploy_flash_arb_receiver— Deploy FlashArbReceiver with pre-flight checkscheck_flash_arb_readiness— Environment readiness checkverify_flash_arb_receiver— Validate receiver configuration
Wallet Providers
| Provider | Use Case |
|---|---|
Private Key (EvmWalletProvider) |
Development / scripting |
CDP (CdpWalletProvider) |
Production agents (MPC) |
Framework Integrations
LangChain
from floe_agentkit_actions.integrations.langchain import get_floe_langchain_tools
tools = get_floe_langchain_tools(wallet_provider)
OpenAI Function Calling
from floe_agentkit_actions.integrations.openai_agents import get_floe_openai_tools
tools = get_floe_openai_tools(wallet_provider)
Environment Variables
PRIVATE_KEY=0x... # Wallet private key
CDP_API_KEY_NAME=... # Coinbase CDP API key name
CDP_API_KEY_PRIVATE_KEY=... # Coinbase CDP API secret
OPENAI_API_KEY=sk-... # OpenAI (for CLI)
ANTHROPIC_API_KEY=sk-ant-... # Anthropic (for CLI)
BASE_RPC_URL=https://... # Custom Base RPC (recommended)
Development
pip install -e ".[dev]"
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file floe_agentkit_actions-0.2.0.tar.gz.
File metadata
- Download URL: floe_agentkit_actions-0.2.0.tar.gz
- Upload date:
- Size: 89.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b76c79f4e58326f3336c54cb0e7505e6f5bf966633dbde89f14fb59fb1321fe2
|
|
| MD5 |
135d5087115c53d78dc60036570ed9ee
|
|
| BLAKE2b-256 |
7d538fc71bc7210d86fb28395e981ac9517eb4fad690ae7879264f6f7db4c032
|
File details
Details for the file floe_agentkit_actions-0.2.0-py3-none-any.whl.
File metadata
- Download URL: floe_agentkit_actions-0.2.0-py3-none-any.whl
- Upload date:
- Size: 64.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de05f8bd3d7900b5c545d66d30190395f4e3917c7344d6c17b8bd4cd5ef2de6e
|
|
| MD5 |
4e200164549ed8e13639bcd2568d8622
|
|
| BLAKE2b-256 |
8d302951c0b2559584e183734ca4b9410b4e2bd2b2cad79116d48a22beaef2f2
|