Documentation Index
Fetch the complete documentation index at: https://docs.sprinter.tech/llms.txt
Use this file to discover all available pages before exploring further.
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.Before You Start
The human operator needs to set up the credit position and delegation before the agent can operate:- Choose an account type — EOA + Operator (simplest) or Smart Account (tightest guardrails). See Credit Accounts.
- Set up a Credit Operator — deploy or use an existing Operator contract that authorizes the agent as a caller.
- Lock collateral — the human locks assets to activate the credit line. See the Credit Draw quickstart for the lock flow.
Human Operator Setup
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.Deploy Operator & Authorize Agent
Deploy an 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.
ExclusiveOperator with the agent’s address as the authorized caller. Then the human opts in.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:| Tool | Description | Used by |
|---|---|---|
sprinter-health-check | API health check | Agent |
sprinter-protocol-config | Supported chains, collateral assets, LTV ratios | Agent |
sprinter-credit-info | Account credit position — capacity, debt, health factor | Agent |
sprinter-lock-collateral | Build calldata to lock collateral | Human (setup) |
sprinter-draw-credit | Build calldata to borrow (draw) | Agent |
sprinter-repay-debt | Build calldata to repay debt | Agent |
sprinter-unlock-collateral | Build calldata to unlock collateral | Human |
Setup
Add to your MCP client config (Claude Desktop, Cursor, etc.):Direct API (No MCP)
If your agent doesn’t use MCP, the same flow works with plain HTTP:Check Credit Capacity
remainingCreditCapacity — this is how much the agent can draw. The account is the human’s address (the collateral owner).Draw Credit
receiver can be a DEX router, bridge contract, or any address the human pre-approved.Use the Funds
The agent does its work — swap via LI.FI, bridge to another chain, settle a trade, enter a yield position, etc.
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
| Scenario | How it works |
|---|---|
| Cross-chain swap | Human delegates credit on Base. Agent borrows → bridges via LI.FI → repays when the swap settles. |
| Just-in-time settlement | Human backs a card program. Agent receives authorization → borrows to settle → repays when billing cycle ends. |
| Arbitrage | Human provides collateral. Agent spots a price difference → borrows → executes the arb → repays from profits. |
| Yield farming | Human delegates a credit line. Agent borrows to enter a short-term yield opportunity → repays when it unwinds. |
| DCA / Recurring buys | Human sets up an Operator with daily caps. Agent draws small amounts on schedule to accumulate a position. |
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.Related
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.