Skip to Content

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

LBTC
TypeYield-bearing Bitcoin
Yield sourceBabylon + approved sources
Chains10+ native chains
DeFi reach70+ protocols
Best for: Earning passive yield + DeFi collateral
BTC.b
TypeNeutral bridged Bitcoin
Yield sourceNone (pure 1:1 BTC)
OriginAcquired from Ava Labs (Oct 2025, $400M+)
Custody14-member Security Consortium
Best for: Cross-chain BTC without yield overlay

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 ai
import { 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 zod
import { 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

No custody of user keys. sdk-agent returns prepared transactions; the user wallet signs. sdk-agentkit signs through the AgentKit WalletProvider you supply.
Allowances are explicit. Approvals are scoped per action and verified before each transaction.
Fee authorization is EIP-712. Where required (Ethereum, Sepolia), the user signs a typed message, never a plain eth_sign. See Fee Authorization.
Errors are sanitized. RPC URLs and sensitive details are stripped from messages returned to the model.
Last updated on