Skip to content

Commit a807d99

Browse files
committed
feat: add Floe credit action provider
Adds FloeActionProvider — working capital for AI agents on Base. Financial independence is the precursor to agent autonomy. Long-running agents can't do anything meaningful without their own fundable balance sheet. Floe gives them one. 3,000+ secured working capital lines issued. Zero defaults. 8 actions: Read: getMarkets, checkStatus, getBalance, checkHealth Write: instantBorrow, repay, grantDelegation, x402Fetch Deposit USDC, borrow up to 95% as a credit line. Fixed rates, per-loan isolated escrow, gas-free for delegated agents. Fund with a bank account or card — no crypto experience needed. Built-in x402 payment proxy. Includes: - Full test suite with mocked wallet and API - Example agent (typescript/examples/floe-credit-agent/) - Provider README Network: Base Mainnet Contract: 0x17946cD3e180f82e632805e5549EC913330Bb175
1 parent 0fe026b commit a807d99

11 files changed

Lines changed: 1284 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Floe Working Capital Provider
2+
3+
Financial independence is the precursor to agent autonomy. Long-running agents can't do anything meaningful without their own fundable balance sheet. Floe gives them one.
4+
5+
**3,000+ secured working capital lines issued. Zero defaults.**
6+
7+
Deposit USDC, borrow up to 95% as a credit line. Fixed rates, per-loan isolated escrow, gas-free. Fund with a bank account or card — no crypto experience needed.
8+
9+
## Actions
10+
11+
| Action | Type | Description |
12+
|--------|------|-------------|
13+
| `getMarkets` | Read | List available lending markets |
14+
| `instantBorrow` | Write | Deposit USDC, borrow up to 95% working capital — auto-selects best lender |
15+
| `repay` | Write | Repay a loan (deposit returns automatically) |
16+
| `checkStatus` | Read | Loan health, balance, accrued interest, time to expiry |
17+
| `getBalance` | Read | Credit balance for facilitator-delegated agents |
18+
| `checkHealth` | Read | On-chain LTV and liquidation risk |
19+
| `grantDelegation` | Write | Delegate credit to Floe facilitator for gas-free x402 payments (one-time) |
20+
| `x402Fetch` | Write | Call any x402 API — Floe handles payment automatically |
21+
22+
## Setup
23+
24+
```typescript
25+
import { AgentKit } from "@coinbase/agentkit";
26+
import { getVercelAITools } from "@coinbase/agentkit-vercel-ai-sdk";
27+
import { FloeActionProvider } from "@coinbase/agentkit";
28+
29+
const agentkit = await AgentKit.from({
30+
walletProvider,
31+
actionProviders: [new FloeActionProvider()],
32+
});
33+
34+
// Use with Vercel AI SDK, LangChain, or any framework
35+
const tools = getVercelAITools(agentkit);
36+
```
37+
38+
## Why agents need credit
39+
40+
100M+ x402 machine payments since May 2025. 100,000+ agents with onchain identity. Zero credit outstanding to any of them.
41+
42+
Every economy runs on credit. Agents don't have FICO — but they have something better: deterministic cashflows and verifiable execution history. Floe is the credit bureau and capital rail for AI agents.
43+
44+
## Network
45+
46+
- **Base Mainnet** — Coinbase's L2, built for payments
47+
- **Contract:** [`0x17946cD3e180f82e632805e5549EC913330Bb175`](https://basescan.org/address/0x17946cD3e180f82e632805e5549EC913330Bb175)
48+
49+
## Links
50+
51+
- [Docs](https://floe-labs.gitbook.io/docs)
52+
- [Bank Account → First API Call](https://floe-labs.gitbook.io/docs/agents/fiat-to-x402) — fund with fiat, no crypto needed
53+
- [Full npm package (45 actions)](https://www.npmjs.com/package/floe-agent)
54+
- [Dashboard](https://dev-dashboard.floelabs.xyz)
55+
- [Website](https://floelabs.xyz)
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import { type Address } from "viem";
2+
3+
export const SUPPORTED_NETWORKS = ["base-mainnet"];
4+
5+
export const LENDING_MATCHER_ADDRESSES: Record<string, Address> = {
6+
"base-mainnet": "0x17946cD3e180f82e632805e5549EC913330Bb175",
7+
};
8+
9+
export const FACILITATOR_ADDRESSES: Record<string, Address> = {
10+
"base-mainnet": "0x58EDdE022FFDAD3Fb0Fb0E7D51eb05AaF66a31f1",
11+
};
12+
13+
export const FACILITATOR_API = "https://credit-api.floelabs.xyz";
14+
15+
export const TOKEN_ADDRESSES: Record<string, Record<string, Address>> = {
16+
"base-mainnet": {
17+
usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
18+
weth: "0x4200000000000000000000000000000000000006",
19+
cbbtc: "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
20+
},
21+
};
22+
23+
export const USDC_DECIMALS = 6;
24+
25+
export const LENDING_MATCHER_ABI = [
26+
{
27+
inputs: [
28+
{ name: "operator", type: "address" },
29+
{ name: "borrowLimit", type: "uint256" },
30+
{ name: "maxRateBps", type: "uint256" },
31+
{ name: "expiry", type: "uint256" },
32+
{ name: "onBehalfOfRestriction", type: "address" },
33+
],
34+
name: "setOperator",
35+
outputs: [],
36+
stateMutability: "nonpayable",
37+
type: "function",
38+
},
39+
{
40+
inputs: [
41+
{ name: "agent", type: "address" },
42+
{ name: "operator", type: "address" },
43+
],
44+
name: "getOperatorPermission",
45+
outputs: [
46+
{ name: "approved", type: "bool" },
47+
{ name: "borrowLimit", type: "uint256" },
48+
{ name: "borrowed", type: "uint256" },
49+
{ name: "maxRateBps", type: "uint256" },
50+
{ name: "expiry", type: "uint256" },
51+
{ name: "onBehalfOfRestriction", type: "address" },
52+
],
53+
stateMutability: "view",
54+
type: "function",
55+
},
56+
] as const;
57+
58+
export const ERC20_ABI = [
59+
{
60+
inputs: [
61+
{ name: "spender", type: "address" },
62+
{ name: "amount", type: "uint256" },
63+
],
64+
name: "approve",
65+
outputs: [{ name: "", type: "bool" }],
66+
stateMutability: "nonpayable",
67+
type: "function",
68+
},
69+
{
70+
inputs: [{ name: "account", type: "address" }],
71+
name: "balanceOf",
72+
outputs: [{ name: "", type: "uint256" }],
73+
stateMutability: "view",
74+
type: "function",
75+
},
76+
{
77+
inputs: [
78+
{ name: "owner", type: "address" },
79+
{ name: "spender", type: "address" },
80+
],
81+
name: "allowance",
82+
outputs: [{ name: "", type: "uint256" }],
83+
stateMutability: "view",
84+
type: "function",
85+
},
86+
] as const;

0 commit comments

Comments
 (0)