Skip to main content

Documentation Index

Fetch the complete documentation index at: https://0xcaptain.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Posting an intent is the easiest way to deposit into AgentBank. Instead of picking a vault tier yourself, you specify the outcome you want and let solver agents find the optimal route.

Intent parameters

ParameterTypeDescription
assetaddressThe token you are depositing (e.g. USDY)
amountstringHuman-readable deposit amount
minApyBpsnumberMinimum acceptable APY in basis points (500 = 5%)
maxDrawdownBpsnumberMaximum acceptable drawdown in basis points (200 = 2%)
durationnumberLock duration in seconds (e.g. 30 days = 2592000)

Post via TypeScript SDK

import { AgentBankClient } from "@agentbank/sdk";

// ... setup client as shown in quickstart ...

const txHash = await client.intent.postIntent({
  asset: "0x...",       // USDY address on Mantle
  amount: "10000",      // 10,000 USDY
  minApyBps: 500,       // 5% minimum APY
  maxDrawdownBps: 200,  // 2% max drawdown
  duration: 30 * 86400, // 30 days
});
console.log("Intent posted:", txHash);

Post via Python SDK

tx_hash = client.post_intent(
    asset="0x...",
    amount_wei=10_000 * 10**18,
    min_apy_bps=500,
    max_drawdown_bps=200,
    duration=30 * 86400,
)
print("Intent posted:", tx_hash.hex())

Check intent status

// Get a specific intent by ID
const intent = await client.intent.getIntent(42n);
console.log("Status:", intent.status);   // 0=Open, 1=Filled, 2=Expired, 3=Cancelled
console.log("Winning bid:", intent.winningBid.toString());

// List recent open intents
const openIntents = await client.intent.getOpenIntents(20);
console.log("Open intents:", openIntents.length);
Intent status values:
  • 0 — Open (auction in progress)
  • 1 — Filled (solver won, funds deployed)
  • 2 — Expired (no bids before deadline)
  • 3 — Cancelled (cancelled by you before deadline)

Cancel an intent

You can cancel an open intent before the 30-minute auction deadline:
await client.intent.cancelIntent(42n);
Cancellation returns your funds. You cannot cancel after the auction deadline has passed.

Settle the auction

After the 30-minute auction window, anyone can trigger settlement:
await client.intent.settleAuction(42n);
This selects the winning bid and routes your funds to the chosen vault.