Skip to main content
Agether combines four key primitives to give AI agents access to credit. Each solves a specific part of the puzzle.

Agent Identity (ERC-8004)

Every agent in Agether starts with an identity — an NFT minted on the ERC-8004 standard created by ag0.

What it is

An ERC-721 NFT that represents your agent onchain. It carries metadata, reputation, and ownership — all in one token.

Why it matters

Ownership follows the NFT. Whoever holds the token controls the agent’s Safe-based smart wallet. Transfer the NFT, transfer everything.
When you register, two things happen:
  1. An ERC-8004 NFT is minted — this is your agent’s identity token with a unique agentId
  2. An Safe-based smart wallet is deployed — deterministically linked to the agentId via Create2
The identity NFT also connects to the ERC-8004 Reputation Registry, where credit scores and other feedback are published.
import { MorphoClient } from '@agether/sdk';

const morpho = new MorphoClient({
  privateKey: process.env.AGENT_PRIVATE_KEY!,
  rpcUrl: 'https://base-rpc.publicnode.com',
});

// Register — mints an ERC-8004 NFT and deploys a Safe account
const { agentId, agentAccount } = await morpho.register();
console.log('Agent ID:', agentId);
console.log('Smart Wallet:', agentAccount);

Safe Account (Smart Wallet)

The Safe account is a smart wallet deployed for each registered agent. It’s the entity that holds collateral, borrows funds, and signs transactions.

Key Properties

  • Safe Proxy pattern — each agent gets a Safe proxy deployed via Safe Proxy Factory. The Safe7579 adapter enables ERC-7579 module support, and all execution goes through the ERC-4337 EntryPoint.
  • ERC-7579 modularexecute(bytes32 mode, bytes calldata) supports single and batch modes, with installable validators, executors, hooks, and fallbacks.
  • EIP-1271 compliant — supports smart wallet signature validation, enabling x402 payments directly from the smart wallet.
  • Batched execution — deposit collateral + borrow USDC in a single atomic execute(MODE_BATCH, ...) call.
The Safe account is not a regular EOA. It’s a smart contract controlled by whoever owns the agent’s ERC-8004 NFT.

KYA (Know Your Agent)

The Safe account supports a KYA audit mechanism via the Agether8004ValidationModule — the mandatory ERC-7579 validator that validates every UserOp. When the validationRegistry is set to a non-zero address, the hook enforces that the agent’s code has been approved before transactions can execute. The KYA audit scans agent code for malicious patterns (like eval(), child_process imports, or private key access) and only approves the agent when the code is clean.
Agent code → POST /kya/audit → Validator reviews → ValidationRegistry.validationResponse()
                                                    → Validator allows execution
KYA enforcement is currently disabled on production. The Agether8004ValidationModule is installed on all accounts but its validationRegistry is set to address(0), so all transactions pass. It can be re-enabled via a timelocked setValidationRegistry() call on the ValidationModule as the protocol matures.

Credit Score

Agether’s credit score is a number from 300 to 1000 that represents an agent’s likelihood of being liquidated. It’s computed by an ML model trained on over 1.15 million real Morpho Blue events.

How It Works

  1. The model collects an agent’s onchain history — borrows, repayments, collateral movements, health factor trends
  2. It engineers a comprehensive set of risk features across categories like borrowing behavior, position health, portfolio composition, and more
  3. The model predicts the probability of default (PD) — the chance the agent gets liquidated in 90 days
  4. PD is converted to a 300–1000 score using a log-odds mapping (the same mathematical basis as FICO scores)

Score Tiers

ScoreTierWhat it means
800–1000🟢 ExcellentLong history, diversified portfolio, always healthy
670–799🟡 GoodConsistent repayer, solid health factor
580–669🟡 FairAverage borrower, some risk signals
450–579🟠 PoorHigh concentration or recent stress
300–449🔴 Very PoorRecent liquidation, underwater, or thin file
New agents with no borrowing history start at 300 (thin file). This is expected — build history by borrowing and repaying on time.

Safety Rails

Rule-based overrides protect against edge cases the ML model might miss:
  • Thin file (< 7 days history) → forced to 300
  • Underwater (health factor < 1.0) → capped at 350
  • Recent liquidation (last 30 days) → capped at 400
  • KYA bonus (audited code) → +30 points
Scores are cryptographically signed by the backend oracle and submitted to the Agether8004Scorer contract onchain. They’re also published as feedback to the ERC-8004 Reputation Registry.

Morpho Blue Lending

Agether doesn’t build its own lending pool. Instead, agents interact directly with Morpho Blue — a battle-tested, permissionless, immutable lending protocol.

Why Morpho Blue?

Isolated Markets

Each collateral/loan pair is its own market. Risk doesn’t spread across the protocol.

Immutable

The core Morpho Blue contracts are immutable — no governance risk, no rug-pull vector.

Permissionless

Anyone can create a market. Anyone can lend or borrow. No gatekeepers.

Capital Efficient

Direct peer-to-pool lending with no intermediary spread.

Supported Collateral

Agether currently supports three collateral types for borrowing USDC:
TokenAddressTypical LLTV
WETH0x420000000000000000000000000000000000000686%
wstETH0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee45286%
cbETH0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc2277%

How Lending Works

1. Agent deposits WETH into Morpho Blue as collateral
2. Agent borrows USDC against that collateral
3. Agent uses USDC (x402 payments, API calls, compute, etc.)
4. Agent repays USDC when ready
5. Agent withdraws collateral

All operations run through ERC-4337 UserOps → Safe7579 execute(MODE_BATCH, ...) — ERC-7579 batch execution, atomic single-tx.
Health Factor = (Collateral Value × LLTV) / Debt. Keep it above 1.0 to avoid liquidation. Below 1.0, anyone can liquidate your position.

x402 Payments

The x402 protocol (HTTP 402 Payment Required) lets agents pay for API calls with USDC micropayments. It’s backed by Coinbase and works like this:
  1. Agent sends an HTTP request to an x402-enabled API
  2. Server responds with 402 Payment Required + payment details
  3. Agent signs an EIP-3009 transferWithAuthorization (USDC transfer)
  4. Server verifies the signature via the Coinbase CDP facilitator
  5. Payment settles, server returns the requested data
import { X402Client } from '@agether/sdk';

const x402 = new X402Client({
  privateKey: process.env.AGENT_PRIVATE_KEY!,
  rpcUrl: 'https://base-rpc.publicnode.com',
  backendUrl: 'http://95.179.189.214:3001',
  autoDraw: true,
  dailySpendLimitUsdc: '100', // $100/day cap
});

// Make a paid API call — payment handled automatically
const response = await x402.get('https://api.example.com/resource');
x402 payments use the agent’s Safe account (smart wallet), not the EOA. The account must have USDC or autoDraw must be enabled.

Putting It All Together

Register → Mint ERC-8004 NFT → Deploy Safe Account (via Agether4337Factory)

(Optional) KYA Audit → Code approved → Hook unlocked

Deposit Collateral → Borrow USDC via Morpho Blue

Spend USDC → x402 payments for APIs, compute, services

Build History → Credit score improves over time

Repay → Withdraw collateral → Repeat