Skip to main content

Overview

AI agents need on-demand liquidity — to settle a swap, bridge funds, or execute a trade. But agents shouldn’t need to manage collateral themselves. With Sprinter Credit, a human operator pledges collateral and delegates credit access to an agent. The agent draws and repays within the bounds the human defines. This skill works with any agent framework. We provide:
  • An MCP server for agents that speak Model Context Protocol (LI.FI, Claude, Cursor, ChatGPT, etc.)
  • A direct API pattern for agents using plain HTTP

Example Repo

Full MCP server + demo agent script — clone and run.

How It Works

The credit lifecycle is split between two roles: the human operator who manages collateral, and the agent who uses the credit line.
The human retains full control of the collateral — the agent can only draw credit to pre-approved addresses and can never touch or withdraw the underlying collateral. See Credit Operators for how the delegation model works.

Before You Start

The human operator needs to set up the credit position and delegation before the agent can operate:
  1. Choose an account type — EOA + Operator (simplest) or Smart Account (tightest guardrails). See Credit Accounts.
  2. Set up a Credit Operator — deploy or use an existing Operator contract that authorizes the agent as a caller.
  3. Lock collateral — the human locks assets to activate the credit line. See the Credit Draw quickstart for the lock flow.
Once this is done, the agent can operate autonomously within the delegated bounds.

Human Operator Setup

1

Lock Collateral

The human locks collateral to activate the credit line. This is the collateral the agent’s credit draws will be backed by.
Returns { calls: ContractCall[] } — the human signs and submits.
2

Deploy Operator & Authorize Agent

Deploy an ExclusiveOperator with the agent’s address as the authorized caller. Then the human opts in.
The agent can now draw credit — but only to whitelisted receivers. See Credit Operators for custom operators with amount caps, time windows, and co-sign requirements.

Agent Operations

Once the human has set up the credit position and delegation, the agent operates with these tools:

MCP Integration

The Sprinter MCP server exposes 7 tools that any MCP-compatible agent can discover and call:

Setup

Add to your MCP client config (Claude Desktop, Cursor, etc.):
Or if you also use LI.FI’s MCP server, the agent gets both tool sets:
Now the agent can use LI.FI for routing/bridging and Sprinter for credit — borrowing liquidity just-in-time for a cross-chain swap.

Direct API (No MCP)

If your agent doesn’t use MCP, the same flow works with plain HTTP:
1

Check Credit Capacity

Response includes remainingCreditCapacity — this is how much the agent can draw. The account is the human’s address (the collateral owner).
2

Draw Credit

The agent draws USDC to a whitelisted receiver address via the Operator contract. The receiver can be a DEX router, bridge contract, or any address the human pre-approved.
3

Use the Funds

The agent does its work — swap via LI.FI, bridge to another chain, settle a trade, enter a yield position, etc.
4

Repay

Repaying restores credit capacity. The agent can draw again immediately.

Implementation

A minimal agent that draws from a delegated credit line, uses funds, and repays:
The useFunds callback is where the agent plugs in its own logic — call LI.FI’s API to bridge, execute a DEX swap, settle a trade, etc. The borrow/repay lifecycle wraps around whatever the agent needs to do.

When to Use This

Agent-Owned Credit (Advanced)

In some cases, an agent may manage its own collateral and credit line directly — without human delegation. This model is suited for fully autonomous agents that hold their own assets.
This follows the same API calls but the agent’s wallet is both the collateral owner and the borrower. No Operator setup needed — the agent signs everything directly.
Agent-owned credit means the agent has full control over collateral. This model requires strong safeguards in the agent’s logic to prevent collateral loss. For most use cases, human-delegated credit is safer — the agent can draw credit but never touch collateral.

Health Monitor

Pair with the health monitor to auto-repay if the position gets risky.

Credit Operators

How operators work, existing operators, and how to build custom ones.

Credit Accounts

EOA vs Smart Account — choosing the right account type for agent delegation.