Quickstart
This section covers what the SDK does, how to choose between the two packages, and how to install and run your first Bitcoin agent action.
Integrate Bitcoin into AI agents
The Lombard Agent SDK gives AI agents the ability to hold, stake, earn yield on, and borrow against Bitcoin, without the agent ever touching user keys.
Two assets power the SDK
Two packages expose these assets to agents
@lombard.finance/sdk-agent
Adapters for Vercel AI SDK and LangChain. Returns prepared transactions that any EIP-1193 wallet (MetaMask, WalletConnect, Privy, Dynamic, RainbowKit, etc.) can sign.
The agent never signs; your app dispatches the prepared tx and surfaces the hash back.
@lombard.finance/sdk-agentkit
A Coinbase AgentKit ActionProvider that executes transactions through AgentKit’s WalletProvider (CDP wallet, server wallet, or viem-wrapped EIP-1193 wallet).
The provider signs and executes through the wallet you supply; your agent code gets back the tx hash directly.
Pick a package
sdk-agent
For: Vercel AI SDK, LangChain, or any custom agent loop.
Wallet compatibility: Any EIP-1193 wallet (MetaMask, WalletConnect, Privy, Dynamic, RainbowKit).
Signs transactions? No, returns prepared txs for the user wallet to sign.
Surface area: Full Lombard surface (BTC, BTC.b, vaults, Morpho).
System prompt included: Yes, LOMBARD_SYSTEM_PROMPT.
sdk-agentkit
For: Agents built on Coinbase AgentKit.
Wallet compatibility: AgentKit WalletProvider (CDP wallet, server wallet, or viem-wrapped EIP-1193).
Signs transactions? Yes, executes through AgentKit’s WalletProvider.
Surface area: Curated subset of what AgentKit wallets can sign end-to-end.
System prompt included: No, use tool descriptions.
Install and quickstart
sdk-agent (Vercel AI SDK)
npm install @lombard.finance/sdk-agent viem aiimport { lombardTools } from '@lombard.finance/sdk-agent/vercel';
import { LOMBARD_SYSTEM_PROMPT } from '@lombard.finance/sdk-agent';
import { streamText } from 'ai';
const result = streamText({
model: yourModel,
system: LOMBARD_SYSTEM_PROMPT,
tools: lombardTools,
messages,
});LangChain wiring: see the sdk-agent README .
sdk-agentkit (Coinbase AgentKit)
npm install @lombard.finance/sdk-agentkit @coinbase/agentkit viem zodimport { AgentKit } from '@coinbase/agentkit';
import { lombardActionProvider } from '@lombard.finance/sdk-agentkit';
const agentkit = await AgentKit.from({
walletProvider,
actionProviders: [lombardActionProvider()],
});
const actions = agentkit.getActions();Read vs write
Tools follow a strict contract:
Read tools
get_* tools execute immediately and return current on-chain or API state.
Examples: get_lbtc_balance, get_exchange_rate, get_deposit_status.
Write tools
prepare_* tools (in sdk-agent) and named actions (in sdk-agentkit) return ready-to-sign transaction parameters.
The user wallet performs the actual signing; the agent never holds keys.
Security model
WalletProvider you supply.eth_sign. See Fee Authorization.