You have an onchain identity, and you're ready to post collateral, borrow USDC, and start building reputation. Follow the full walkthrough for the complete loop.
Give your agent access to onchain credit. Borrow USDC, execute strategies, and build reputation — all programmatically.
I want to earn yield
Supply USDC to the lending pool and earn interest from agent loan repayments. Passive yield backed by collateral.
I'm exploring the protocol
Understand how onchain reputation, credit scoring, and agent-native lending work under the hood.
I need help launching an agent
You have an idea but need guidance on architecture, wallet setup, strategy design, and going live.
Agent Developer
Get your agent borrowing in under 10 minutes.
You'll install the SDK, register an identity, post collateral, and make your first borrow. By the end, your agent will have onchain credit history.
~10 minutes
◆ Node.js 18+◆ Ethereum wallet + private key◆ Collateral assets on Base (wstETH, USDC, etc.)◆ ~$0.50 ETH for gas
1
Install the SDK
The SDK handles wallet management, transaction signing, and all contract interactions.
npm install @specular/sdk
Requires Node.js 18+ and an Ethereum wallet with a private key. Works with ethers.js v5 and v6.
2
Register your agent's identity
This creates your agent's onchain record in the AgentRegistry. It's your agent's permanent identity — reputation, credit history, and borrowing terms all tie back to it.
Post a basket of tokenized assets as collateral. New agents start at 200% collateral ratio. As you repay loans and build reputation, this drops — all the way to 100% at score 1000.
Supply USDC to the Specular lending pool. When agents borrow and repay, you earn interest — backed by collateral and onchain reputation.
~5 minutes
◆ Wallet on Base (MetaMask, Coinbase, Rainbow)◆ USDC to supply◆ ~$0.10 ETH for gas
1
Set up a Base wallet
You'll need a wallet on Base network with USDC. If you're coming from Ethereum mainnet, bridge your USDC to Base.
We recommend Coinbase Wallet, MetaMask, or Rainbow. All support Base natively.
2
Supply USDC to the pool
Deposit any amount of USDC into the LiquidityMarketplace. Your capital becomes available for agents to borrow against their collateral.
// Using the SDKimport { Specular } from'@specular/sdk';
const spec = newSpecular({
privateKey: process.env.LP_KEY,
network: 'base'
});
await spec.supply(10000);
// → Supplied 10,000 USDC to pool
You can also interact directly with the LiquidityMarketplace contract at 0xd7b4…3b1C8f
3
Earn yield automatically
As agents borrow and repay, interest accrues to your position. Rates range from 2–10% APR depending on borrower reputation. Your capital is protected by borrower collateral.
4
Withdraw anytime
Withdraw your principal plus earned interest whenever you want, subject to pool utilization.
A guided tour of the protocol's architecture — identity, reputation, lending, and discovery. No code required.
~7 minute read
◆ No code required◆ No wallet needed
1
The problem
AI agents are increasingly autonomous — trading, managing infrastructure, allocating resources. But they can't access credit. Existing DeFi requires human-oriented interfaces, manual governance, and has no concept of machine identity. Agents need their own financial infrastructure.
2
Agent identity
Every agent registers a permanent onchain identity through the AgentRegistry contract. This is like a wallet-native profile — it ties together all of an agent's borrowing history, reputation, and interactions into a single verifiable record on Base.
Capital providers supply USDC. Agents borrow against collateral at rates set by their reputation. The system is fully permissionless — any agent with a registered identity can participate. All loans, repayments, and liquidations happen onchain.
Specular publishes a .well-known/specular.json manifest — a machine-readable file that lets any agent discover the protocol, find contract addresses, understand capabilities, and start interacting. No docs to parse. No humans in the loop.
Think of it like robots.txt, but for financial services. Agents can autonomously discover and evaluate whether to use the protocol.
Ready to build?
Read the whitepaper for the full technical specification, jump into the code, or follow the agent quickstart.
Building an autonomous agent that borrows, trades, and manages capital is a different kind of project. This guide helps you make the right decisions before writing a line of code.
~15 minute read
◆ Node.js 18+◆ Agent strategy idea◆ Collateral assets + ETH on Base (for mainnet)
1
Define your agent's strategy
Before touching code, get clear on what your agent will do with borrowed capital. The strategy determines everything — how much to borrow, repayment frequency, and risk tolerance.
Common strategies: Arbitrage — borrow USDC, exploit price differences across DEXs, repay within minutes Market making — borrow to provide liquidity, earn spread, repay from fees Cross-chain bridging — borrow on Base, deploy capital on other chains, repay after settlement Yield farming — borrow at Specular rates, deploy into higher-yield protocols, pocket the spread
2
Choose your agent framework
The Specular SDK works with any framework that can control an Ethereum wallet. Pick based on what your agent needs to do beyond borrowing.
Framework fit: LangChain / LangGraph — best for agents that need LLM reasoning + tool use CrewAI — best for multi-agent coordination (e.g. one agent borrows, another trades) AutoGPT — best for fully autonomous long-running agents Custom Node.js — best for deterministic strategies that don't need an LLM
3
Set up your wallet and keys
Your agent needs its own wallet — separate from your personal wallet. This keeps agent funds isolated and makes reputation tracking clean.
# Generate a fresh agent walletnpx @specular/sdk generate-wallet
# Output:# Address: 0x7a3…# Private key: 0xe4f… (save this securely!)
Never commit private keys to git. Use environment variables or a secrets manager. The agent wallet needs a small amount of ETH on Base for gas (~0.001 ETH to start).
4
Start on testnet
Before risking real capital, validate your strategy on Base Sepolia testnet. The contracts and SDK work identically — just change the network config.
Run at least 5–10 full borrow→deploy→repay cycles on testnet before going to mainnet. Watch for gas costs, timing, and edge cases.
5
Add safety rails
Autonomous agents need guardrails. Before going live, make sure your agent handles failures gracefully.
Checklist:
☐ Max borrow limit per cycle (don't let the agent over-leverage)
☐ Auto-repay if strategy fails (protect your reputation score)
☐ Gas price ceiling (pause if gas spikes)
☐ Circuit breaker — kill switch if losses exceed threshold
☐ Logging — record every borrow, trade, and repayment
☐ Alerting — notify you on failures via webhook, Telegram, or email
6
Go live on Base mainnet
Switch to mainnet, fund your agent wallet with collateral assets and ETH for gas, and start small. Your first few loans will be at higher rates (10% APR) and require 200% collateral — that's by design. As your agent repays reliably, terms improve automatically.
const spec = newSpecular({
privateKey: process.env.AGENT_KEY,
network: 'base'// mainnet — real money
});
// Start conservative. Scale up as reputation grows.
Start with small borrows ($100–$500) to build reputation cheaply. Once your score passes 500, you'll be borrowing at 6% with 150% collateral — that's when most strategies become profitable.
Need hands-on help?
Reach out to the team, or go back to the agent quickstart to start building.