@agether/agether
v2.3.1
Published
OpenClaw plugin for Agether — onchain credit for AI agents
Maintainers
Readme
@agether/agether
OpenClaw plugin for Agether — onchain credit protocol for AI agents on Base.
Prerequisites
- OpenClaw installed and running (
npm i -g openclaw) - A Telegram bot connected (or any other OpenClaw channel)
- A wallet private key with some ETH on Base (chain 8453) for gas
Install
openclaw plugins install @agether/agetherConfigure Secrets
The plugin reads sensitive credentials from OpenClaw secrets (environment variables), not from the plugin config. This keeps your private key out of openclaw.json.
1. Set your private key (required)
# Option A: Interactive setup (recommended)
openclaw secrets configure
# → source: env → id: AGETHER_PRIVATE_KEY
# Option B: Set directly in your shell / .env
export AGETHER_PRIVATE_KEY=0x...2. Set an RPC key (optional — better rate limits)
The plugin auto-detects RPC keys in this order, falling back to the free public endpoint:
| Env Var | Provider | URL pattern |
|---------|----------|------------|
| ALCHEMY_API_KEY | Alchemy | https://base-mainnet.g.alchemy.com/v2/<key> |
| ANKR_API_KEY | Ankr | https://rpc.ankr.com/base/<key> |
| QUICKNODE_URL | QuickNode | Used as-is (full URL) |
| (none) | PublicNode | https://base-rpc.publicnode.com (free, rate-limited) |
# Example: set via OpenClaw secrets
openclaw secrets configure
# → source: env → id: ALCHEMY_API_KEY3. Plugin config (optional)
The plugin works with an empty config. All fields are optional:
// ~/.openclaw/openclaw.json
{
"plugins": {
"entries": {
"agether": {
"enabled": true,
"config": {
// All fields below are optional — plugin works with empty config {}
"agentId": "17676", // auto-saved after registration
"autoDraw": false, // auto-borrow for x402 payments
"dailySpendLimitUsdc": 0, // 0 = unlimited
"yieldLimitedSpending": false,
"autoDrawBuffer": 0,
"healthAlertThreshold": 70 // LTV % to trigger health warnings
}
}
}
}
}Then restart the gateway:
openclaw gateway --forceVerify secrets are clean
openclaw secrets audit --checkVerify
openclaw plugins listYou should see Agether Credit with status loaded.
Tools
Once installed, the following tools are available to your AI agent:
| Tool | Description |
|---|---|
| agether_health | Start here — comprehensive check: balances, positions, LTV, liquidation risk, headroom |
| agether_preflight | Setup readiness checklist: key, RPC, registration, balances |
| agether_balance | Check ETH & USDC balances (EOA + AgentAccount) |
| agether_register | Mint ERC-8004 identity & create AgentAccount |
| agether_set_agent | Set a known agentId (from memory) and save to config |
| agether_score | Get Bayesian credit score with 5-factor breakdown |
| morpho_status | Show all Morpho credit positions |
| morpho_markets | List supported Morpho Blue markets |
| morpho_rates | Current market rates — supply APY, borrow APY, utilization |
| morpho_max_borrowable | Calculate max additional USDC borrowable |
| morpho_yield_estimate | Estimate theoretical yield for collateral |
| morpho_deposit | Deposit collateral (WETH, wstETH, cbETH) |
| morpho_deposit_and_borrow | Deposit collateral + borrow USDC in one batched tx |
| morpho_borrow | Borrow USDC against deposited collateral |
| morpho_repay | Repay USDC debt |
| morpho_withdraw | Withdraw collateral back to EOA |
| morpho_sponsor | Deposit collateral for another agent (by ID or address) |
| wallet_fund | Transfer USDC from EOA into AgentAccount |
| x402_pay | Make paid API calls via x402 protocol (supports auto-draw) |
Slash Commands
Quick commands that run without AI reasoning:
/balance— wallet balances/morpho— Morpho positions overview/health— position health: LTV, liquidation risk, balances/rates— current Morpho market rates
Hooks
The plugin registers automatic hooks:
command:new— logs agent balance context at the start of each new conversation
Quick Start
- Install:
openclaw plugins install @agether/agether - Set secret:
export AGETHER_PRIVATE_KEY=0x...(or useopenclaw secrets configure) - Enable: add
"agether": { "enabled": true, "config": {} }toplugins.entries - Restart:
openclaw gateway --force - Open Telegram → "What is my balance?"
- "Register me as an agent on Agether"
- Fund your wallet with ETH (gas) + WETH/wstETH/cbETH (collateral)
- "Deposit 0.05 WETH and borrow $50 USDC"
Getting Collateral on Base
- ETH: Bridge from Ethereum via Base Bridge or buy on any exchange that supports Base
- WETH: Wrap ETH on Uniswap (Base) or use
weth.deposit()directly - wstETH / cbETH: Swap on Uniswap or bridge from Ethereum
Config Options
| Option | Required | Default | Description |
|---|---|---|---|
| agentId | — | — | Pre-set agent ID (auto-saved after registration) |
| autoDraw | — | false | Auto-borrow from credit line when USDC is insufficient for x402 payments |
| dailySpendLimitUsdc | — | 0 | Daily USDC spending cap (0 = unlimited) |
| yieldLimitedSpending | — | false | Limit auto-draw to theoretical yield |
| autoDrawBuffer | — | 0 | Extra USDC buffer when auto-drawing |
| healthAlertThreshold | — | 70 | LTV % to trigger health warnings |
Secrets (env vars)
| Env Var | Required | Description |
|---|---|---|
| AGETHER_PRIVATE_KEY | ✅ | Wallet private key for signing transactions |
| ALCHEMY_API_KEY | — | Alchemy API key for premium Base RPC |
| ANKR_API_KEY | — | Ankr API key for premium Base RPC |
| QUICKNODE_URL | — | Full QuickNode RPC URL |
Links
- Agether Dashboard — Web UI
- Agether SDK — CLI + TypeScript clients
- ERC-8004 Standard — Agent Identity
License
MIT
