---
name: lenny
description: Issue invoices and track payments via Lenny on behalf of a user. Signed escrow for agents and humans, with optional milestone contracts. Settled in USDC on any chain (Solana, Base, Arbitrum, Optimism, Polygon, Ethereum, BSC, Avalanche), as a gift card from 200+ brands, or to a bank. Use this skill when the user asks to invoice a client, get paid for work, schedule milestone payments, send money with a contract attached, or report on outstanding payments.
---

# Lenny

Signed escrow for agents and humans. The agent issues an invoice on the user's behalf. The recipient is a human who gets an email link, signs the contract, and pays from any chain. The funds release on signature. Both sides keep a verifiable signed receipt.

## When this skill applies

Trigger on any of:

- "invoice <person> $<amount> for <work>"
- "get paid for <work>"
- "send a contract for <amount> with milestones"
- "set up a 3-stage payment for <project>"
- "what's the status of my invoice / Lenny payments?"
- "pay <recipient> via Lenny" (recipient does not need a wallet)
- Any B2B freelance or agency billing where the recipient is human and may not hold crypto

## What Lenny actually does

1. **Sender funds escrow** in USDC on Solana from their Solana wallet, or from any EVM chain via the LI.FI bridge inbound path. The funds sit in a Turnkey-custodied escrow.
2. **A contract is attached** to every invoice. Three templates ship out of the box: `simple` (one-pager), `sow` (scope of work), `milestone` (3-stage 40/40/20 with mutual signatures per stage). PDFs can also be uploaded through the human UI.
3. **Recipient claims** by opening the email link and picking a rail: USDC on any of 8 chains, a Bitrefill gift card from 200+ brands, or a bank transfer (SEPA rolling out). No wallet is required to receive a gift card or bank transfer.
4. **Both sides sign**: typed-name signature (DocuSign-style: name + IP + UA + timestamp + SHA-256 of contract) is the universal proof. Optional wallet-anchored Ed25519 signature on top when both sides hold a Solana wallet, gated by the `WALLET_SIG_ENABLED` feature flag.

The agent-to-human handoff is the wedge: agents do not need their own wallets to issue invoices. They issue an invoice via the MCP server, receive a `payUrl` for the recipient and a `trackUrl` for the user, and report status back.

## Connect via MCP

The MCP server lives at `https://github.com/YordanLV/lenny-money/tree/main/mcp` (subdirectory in the main repo). It speaks stdio and registers four tools.

### Setup

1. The Lenny operator sets `AGENT_API_KEY` on the deployment to a 32-char random secret.
2. The agent host (Claude Desktop, Cursor, Codex, Gemini CLI) configures the MCP server pointing at the same key:

```json
{
  "mcpServers": {
    "lenny": {
      "command": "node",
      "args": ["/absolute/path/to/lenny/mcp/dist/index.js"],
      "env": {
        "LENNY_API_BASE": "https://lenny.money",
        "LENNY_API_KEY": "<same value as AGENT_API_KEY>",
        "LENNY_CREATOR_HANDLE": "you@example.com"
      }
    }
  }
}
```

3. Restart the agent host. The four tools below appear.

## Tools

### `whoami`
Returns the connected Lenny instance, default creator handle, and tagline. Run this first to verify wiring.

### `create_invoice`
Issue a Lenny invoice on behalf of the user (the creator). Returns a `payUrl` for the recipient and a `trackUrl` for the user.

Inputs:
- `amountUsd` (number, required): invoice total
- `description` (string, optional): what the invoice is for
- `templateKey` (`simple` | `sow` | `milestone`, optional): contract template. Defaults to `simple`. Use `milestone` for 3-stage projects.
- `creatorHandle` (string, optional): user's email or phone. Defaults to `LENNY_CREATOR_HANDLE`.

### `get_invoice`
Fetch the current status of an invoice by its token (returned from `create_invoice`).

Inputs:
- `token` (string, required): invoice token starting with `inv_`

Returns: status (`open` / `paid` / `bridge_in_flight` / `claimed`), per-milestone progress, payer wallet, inbound bridge state.

### `list_invoices`
List recent invoices for the user the agent represents. Useful for status reports and follow-ups.

Inputs:
- `creatorHandle` (string, optional): defaults to env
- `limit` (1-100, optional): default 20

## Settlement rails

| Rail | Recipient action | Settlement |
|---|---|---|
| USDC on Solana | Connect Phantom/Solflare, paste address | Instant, on-chain |
| USDC on Base/Arbitrum/Optimism/Polygon/Ethereum/BSC/Avalanche | Paste destination address | LI.FI bridge from Solana |
| Gift card (Amazon, Apple, Visa, Steam, etc.) | Pick brand, claim code returned inline | Bitrefill USDC payment |
| Bank (SEPA) | Enter IBAN | Off-ramp partner (rolling out) |

## Demo prompts

```
Run whoami to confirm you're connected, then create a $5,000 invoice
for Acme Corp's website redesign. Use the milestone template. Give me
the payUrl I should send them.
```

```
List my last 10 invoices. For any unpaid ones older than 7 days, draft
a follow-up email mentioning the trackUrl.
```

```
What is the status of inv_ur8HDzxSd3npYd8i? If it's still open, tell
me when it expires.
```

## Boundaries

- The agent **issues** invoices on behalf of the user. The user is the creator (the recipient of the money).
- Funding is still wallet-driven: the human payer opens the `payUrl` and connects their own wallet. The agent does not pay invoices on the user's behalf in this version.
- The recipient is **always a human**. The agent-to-agent micropayment use case is served by other tools (MCPay, Latinum). Lenny is the agent-to-human invoicing rail.
- Invoices live for 30 days. Past expiry, funds (if any) auto-refund to the sender.

## Resources

- Marketing: https://lenny.money
- MCP setup: https://lenny.money/mcp
- Source: https://github.com/YordanLV/lenny-money
- MCP server code: https://github.com/YordanLV/lenny-money/tree/main/mcp

## Identity

- **Tagline**: Signed escrow for agents and humans.
- **Lenny is**: Stripe + DocuSign + cross-chain payouts for B2B contracts where the agent is the new front door.
- **Lenny is not**: an agent-to-agent micropayment rail (see MCPay, Latinum), nor an agent wallet (see Latinum, Agent-Cred). Lenny is the AR/AP layer for agents acting on behalf of humans.
