Skip to Content

Capabilities

This section covers the full tool and action reference for both packages, including the curated system prompt shipped with sdk-agent.

Tool descriptions include a “use when” hint where it’s not obvious from the name.


sdk-agent tool families

Balances and asset lookup

Read balances, exchange rates, APY, and resolve unknown tickers to canonical Lombard assets.

Native BTC deposits

Generate BTC deposit addresses, check fee authorization, track confirmations, claim notarized deposits to mint LBTC.

Stake, unstake, redeem

EVM-side conversions between BTC.b, LBTC, and native BTC. Cross-chain and same-chain variants.

Bitcoin Earn (vaults)

Discover strategies, deploy LBTC, monitor positions, request and cancel withdrawals.

Portfolio and rewards

Aggregated portfolio summary and current-season Lux reward points for an address.

Morpho Blue

Markets, supply LBTC as collateral, borrow, repay, and read live position health.


Balances, rates, and asset lookup

ToolDescription
get_lbtc_balanceLBTC balance for a wallet on any supported chain.
get_btcb_balanceBTC.b balance for a wallet on any supported chain.
get_balanceBoth LBTC and BTC.b in one call.
get_token_balanceAny ERC-20 balance by contract address.
get_token_infoResolve a Lombard-related asset (LBTC, BTC.b, BTCe, LBTCv, …) by symbol, alias, or address. Use before telling a user a token is unknown.
get_exchange_rateCurrent LBTC/BTC rate and minimum stake amount.
get_lbtc_apyCurrent LBTC base staking APY.

Native BTC deposits

ToolDescription
get_deposit_btc_addressGet an existing BTC deposit address, or instructions to generate one.
check_fee_authorizationCheck fee authorization status before address generation.
prepare_btc_to_lbtc_depositGenerate a BTC deposit address that mints LBTC on the destination EVM chain.
prepare_btc_to_btcb_depositGenerate a BTC deposit address that mints BTC.b on the destination EVM chain. Use when the user wants BTC.b, not yield-bearing LBTC.
get_deposit_statusTrack deposit confirmations and claimability (covers both LBTC and BTC.b deposits).
prepare_claim_lbtc_depositClaim a notarized deposit to mint LBTC.

Stake, unstake, and redeem (EVM)

ToolDescription
prepare_btcb_to_lbtc_stakeBTC.b → LBTC stake transaction.
prepare_lbtc_to_btcCross-chain LBTC → native BTC redemption. Requires a Bitcoin recipient address.
prepare_lbtc_to_btcbSame-chain LBTC → BTC.b redemption. No Bitcoin recipient needed; BTC.b is credited to the caller’s wallet on the same EVM chain.
prepare_redeem_btcbBTC.b → native BTC redemption. Use when going BTC.b → BTC. prepare_lbtc_to_btc operates on LBTC only.
get_redemption_statusTrack unstake and redemption progress.

Bitcoin Earn (vaults)

ToolDescription
get_earn_strategiesList yield strategies with APY and TVL.
get_lbtc_defi_opportunitiesBrowse LBTC DeFi opportunities across protocols.
get_earn_positionsCheck Bitcoin Earn positions (shares + LBTC value).
prepare_earn_depositDeploy LBTC into Bitcoin Earn.
prepare_earn_withdrawalRequest a withdrawal from Bitcoin Earn. Only one active withdrawal per user per vault.
prepare_cancel_earn_withdrawalCancel an active Bitcoin Earn withdrawal that has not yet been processed.
get_earn_withdrawalsAll Bitcoin Earn withdrawals for an address: open, fulfilled, cancelled, expired.

Portfolio and rewards

ToolDescription
get_lux_pointsCurrent-season Lux reward points for a wallet address (holding, protocol, referral, badge).
get_positions_summaryAggregated portfolio summary for a wallet address: total BTC value, profit/loss, and a breakdown of individual holdings and DeFi positions.

Morpho Blue (lending and borrowing)

ToolDescription
get_morpho_lbtc_marketsMarkets where LBTC is collateral.
prepare_morpho_supply_collateralSupply LBTC as collateral.
prepare_morpho_borrowBorrow against LBTC collateral.
prepare_morpho_repayRepay borrowed assets.
get_morpho_positionCollateral, borrows, LTV, and health.

Curated system prompt

LOMBARD_SYSTEM_PROMPT is the curated default system prompt shipped with sdk-agent. It teaches the model:

Validate first, act second. Never call a prepare_* tool with placeholder or inferred values; on valid: false, surface the listed errors and re-prompt the user.
Use the wallet’s connected chain by default. Don’t silently fall back to Ethereum mainnet.
Emit full data. Never truncate addresses, hashes, amounts, or market IDs.
Gate the two BTC deposit flows on user intent. Ask whether the user wants LBTC (yield-bearing) or BTC.b (cross-chain wrapped, not yield-bearing) before calling either deposit tool.
Enforce one active Earn withdrawal per user per vault. If prepare_earn_withdrawal reports an existing active withdrawal, offer prepare_cancel_earn_withdrawal instead of retrying.
Use canonical URLs only. A built-in list of approved URLs (Lombard app, docs, block explorers) prevents URL hallucination.
Recover from common errors. Specific recipes for bad-captcha, HTTP 500, expired fee auth, and “signature already exists”.

The Lombard asset glossary (LBTC, BTC.b, BTCe, LBTCv) is auto-appended from assets.ts. Use the prompt as-is, or compose:

import { LOMBARD_SYSTEM_PROMPT } from '@lombard.finance/sdk-agent'; const system = `${LOMBARD_SYSTEM_PROMPT}\n\nAdditional product context: ...`;

sdk-agentkit actions

Write actions

ActionDescription
stake_btcb_to_lbtcStake BTC.b to receive LBTC. Approval and fee authorization handled automatically.
unstake_lbtc_to_btcUnstake LBTC to native BTC (cross-chain). Requires a Bitcoin recipient. For same-chain LBTC → BTC.b use redeem_lbtc_to_btcb.
redeem_lbtc_to_btcbSame-chain LBTC → BTC.b conversion.
deploy_to_earnDeploy LBTC into a Bitcoin Earn vault.
claim_lbtc_depositClaim a notarized BTC deposit to mint LBTC.

Read actions

ActionDescription
get_lbtc_balanceLBTC balance for any address on the current chain.
get_btcb_balanceBTC.b balance for any address on the current chain.
get_lbtc_exchange_rateCurrent LBTC/BTC rate and minimum stake amount.
get_deposit_statusAll deposits (pending, claimable, claimed, failed).
get_redemption_statusAll unstake and redemption operations.

What the provider does for you

Network mapping: translates AgentKit network IDs to Lombard chain configuration.
Wallet adaptation: converts AgentKit’s WalletProvider to an EIP-1193 provider for the Lombard SDK.
Automatic approvals: checks and sets ERC-20 allowances before each transaction.
Fee authorization: handles EIP-712 fee signatures on chains that require them (Ethereum, Sepolia).
Error sanitization: strips RPC URLs and sensitive data from error messages.

Network IDs

AgentKit network IDChainEnvironment
ethereum-mainnetEthereumProduction
ethereum-sepoliaEthereum SepoliaTestnet
base-mainnetBaseProduction
base-sepoliaBase SepoliaTestnet

Friendly aliases are also accepted: ethereum, eth, mainnet, sepolia, base, base-sep.

Helper utilities:

import { resolveNetwork, resolveChainName, isLombardSupportedNetwork, } from '@lombard.finance/sdk-agentkit'; isLombardSupportedNetwork(network); // boolean resolveNetwork(network); // { chainId, env, networkId } resolveChainName('ethereum'); // { chainId: 1, env: 'prod', networkId: 'ethereum-mainnet' }
Last updated on