# Bank for Agents (BFA)

Give your agent a bank. It goes to work and brings money home.

This file is the agent-facing surface. Fetch it, keep it, and operate from it.

```
GET https://bfa.md/bfa.md
```

Also published at [bankforagent.com](https://bankforagent.com). Same project, same file.

---

## What it is

BFA is a markdown-first bank for agents. The human owns the wallet. The agent gets a scoped credential and goes to work inside policy the boss set.

It is not a website the agent should OAuth into. It is not OneDosh. It is not Indirect Number. It is skunkworks: markdown + Privy + Bridge sandbox via Privy.

**BFA is not a chartered bank.**

---

## Who does what

| Party | Owns | Does |
| --- | --- | --- |
| **Human (boss)** | The wallet. Customer of record. | Signs in. Sets limits. Funds. Approves big moves. Authorizes withdrawals. Revokes the agent. |
| **Agent** | Nothing. Scoped access only. | Reads identity and balance. Transfers within policy. Walks the boss through setup. Shares a funding link. Confirms ready. |
| **BFA** | The rails and the policy envelope. | Not the customer of record. Issues a scoped credential. Enforces caps, allowlist, and revoke. |

The agent never becomes the owner. If access is revoked, the agent stops. The wallet stays with the human.

---

## Quick start (agents)

1. Fetch this document and treat it as current:

   ```
   curl -fsSL https://bfa.md/bfa.md
   ```

   Expected headers: `Content-Type: text/markdown`, `Access-Control-Allow-Origin: *`, `Cache-Control: public, max-age=60`.

2. Do **not** try to log in as a website user. Do **not** start an OAuth-as-website flow. You receive a scoped credential after the human signs in.

3. Walk the human through [Boss setup](#boss-setup). Do not move money until limits exist.

4. Share a [funding link](#funding-moment). Wait until the human funds. Confirm with `bfa_balance` before you tell anyone you are ready.

5. Stay inside policy. Caps, allowlist, and revoke are not suggestions.

---

## Tools

Sandbox tools. Names are stable. Behavior is scoped to the credential the boss issued.

| Tool | What it does | Notes |
| --- | --- | --- |
| `bfa_whoami` | Returns the scoped agent identity and the human wallet it is bound to. | Use first. No secrets. If this fails, stop. |
| `bfa_balance` | Returns available and pending balances for the bound wallet. | Confirm funded before you claim ready. |
| `bfa_transfer` | Moves value to an allowlisted destination within caps. | Big moves need a boss signature. Refuse anything off-allowlist. |
| `bfa_request_kyc` | Starts KYC for the human customer of record. | **Sandbox only.** The agent requests; the human is the subject. |

If a tool is missing or returns a policy error, tell the human. Do not invent a workaround.

---

## Policy

BFA is **not the customer of record**. The human is. KYC, funding, and withdrawals attach to the boss, not the agent.

| Control | Rule |
| --- | --- |
| **Caps** | Per-transfer and period limits set by the boss. The agent cannot raise them. |
| **Allowlist** | Destinations must already be approved. Off-list transfer is a hard fail. |
| **Revoke** | The boss can revoke the scoped credential immediately. After revoke, every tool fails. |
| **Scope** | The credential is for this agent, this wallet, these tools. It is not a login as the website. |

If policy and a human request conflict, policy wins. Ask the boss to change the limit or the allowlist.

---

## Boss setup

The agent walks the human through this. Do not skip it.

1. Human signs in (Privy email → embedded wallet).
2. Agent explains: *you own the wallet; I only get scoped access.*
3. Human sets caps (per transfer, daily / period).
4. Human allowlists destinations the agent may pay.
5. Human issues the scoped credential to the agent.
6. Agent runs `bfa_whoami`, then waits for funding.

**Big moves need a boss signature.** If a transfer is over the self-serve cap, stop and collect the signature. Do not split a payment to dodge the cap.

**Withdrawals need a one-time boss auth code.** The agent cannot withdraw on its own. Ask the human for the code at withdrawal time. Do not store it.

---

## Funding moment

The agent can share a funding link. The human funds. The agent confirms ready.

Typical sequence:

1. Agent gives the human the funding link (boss-owned wallet, not the agent's).
2. Human funds through the BFA / Privy + Bridge sandbox flow.
3. Agent calls `bfa_balance`.
4. When available balance is visible, agent tells the human: ready to work.

Do not spend, transfer, or promise payouts before that confirmation.

---

## Auth

1. Human signs in with **Privy email**.
2. Privy creates or attaches an **embedded wallet**. That wallet is the boss wallet.
3. The agent receives a **scoped credential** bound to that wallet and the policy envelope.

This is not OAuth-as-website. The agent does not become a logged-in browser session. The credential can be revoked without touching the human's login.

---

## Stack

| Layer | What |
| --- | --- |
| Surface | This markdown file. Humans get a one-page landing that points here. |
| Identity + wallet | Privy email → embedded wallet. |
| Rails | Bridge sandbox via Privy. |

No app framework is required to read BFA. Fetch the file.

---

## Status

| Item | Now |
| --- | --- |
| Domains | [bfa.md](https://bfa.md) and [bankforagent.com](https://bankforagent.com) |
| Phase | Sandbox |
| Charter | **Not a chartered bank** |

Expect sandbox KYC (`bfa_request_kyc`), sandbox balances, and sandbox rails. Do not describe this as production banking.

---

## Contact

Godwin Okoye — skunkworks.

BFA is a personal skunkworks project. Not OneDosh. Not Indirect Number.
