> For the complete documentation index, see [llms.txt](https://docs.brain.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brain.fi/concepts/overview.md).

# Overview

Brain is one API for autonomous financial operations. Underneath, it does four things, in this order, every time:

```
Remember   →   Decide   →   Execute   →   Prove
```

| Word         | What Brain does                                                                                             | What you call it                       |
| ------------ | ----------------------------------------------------------------------------------------------------------- | -------------------------------------- |
| **Remember** | Pulls in evidence from banks, ERPs, processors, on-chain wallets, and structures it into a queryable record | `brain.ask`, `brain.transactions.list` |
| **Decide**   | Evaluates every proposed action against rules the tenant signed                                             | runs automatically inside `brain.pay`  |
| **Execute**  | Dispatches the action through the right rail (ACH, ERP write, on-chain)                                     | `brain.pay`, `brain.approve`           |
| **Prove**    | Records every step in a tamper-evident log anchored on Base L2                                              | `brain.proof`, `brain.audit.list`      |

Everything else in this documentation is depth on those four steps.

### Why This Matters

Most fintech infrastructure stops at execution. The provider moves the money and confirms it landed. That leaves the integrating application to handle context, rules, and audit on its own. Brain is built around the fact that agents need all four steps, in order, on every action.

| Without remember           | Without decide            | Without execute        | Without prove                     |
| -------------------------- | ------------------------- | ---------------------- | --------------------------------- |
| Agent acts on partial data | Agent acts outside policy | Agent can't move money | Agent's actions can't be verified |

### The Four Ideas in Detail

<table data-view="cards"><thead><tr><th></th><th></th><th data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>🧠 Memory</strong></td><td>What Brain knows about a tenant, where it came from, and how to query it.</td><td><a href="/pages/lj8rT9koqxMc6YXPpcDL">/pages/lj8rT9koqxMc6YXPpcDL</a></td><td></td></tr><tr><td><strong>🛡 Policy</strong></td><td>The rules a tenant signed. How decisions are made.</td><td><a href="/pages/pKaCvQpKvk0xKd6TcXzR">/pages/pKaCvQpKvk0xKd6TcXzR</a></td><td></td></tr><tr><td><strong>🤖 Agents</strong></td><td>Who can read, propose, and act. Internal and external.</td><td><a href="/pages/SKNJp6HT7EckCBOhNHMl">/pages/SKNJp6HT7EckCBOhNHMl</a></td><td></td></tr><tr><td><strong>📜 Proof</strong></td><td>Why every claim Brain makes is verifiable.</td><td><a href="/pages/Fg2F0IzPndDnqtabdkwF">/pages/Fg2F0IzPndDnqtabdkwF</a></td><td></td></tr></tbody></table>

### Tenants

Everything in Brain happens **for a tenant**. A tenant is a customer of yours: a business, a workspace, a user. Brain isolates tenants at the storage, key, and policy layer.

```typescript
await brain.ask("acme", "...");        // for tenant "acme"
await brain.pay("acme", { ... });      // also "acme"
await brain.audit.list("acme", { ... }); // also "acme"
```

Cross-tenant access is impossible by construction. You'll never see one tenant's data accidentally surface in another tenant's response.

### Provenance

Every fact Brain returns carries citations.

```typescript
const answer = await brain.ask("acme", "What did we spend on AWS last month?");

answer.text; // a natural-language answer
answer.citations; // pointers back to the specific transactions, invoices, or evidence that produced the answer
```

You never have to take Brain's word for anything. Every claim links back to source evidence.

### Idempotency

Every mutating call accepts (and most require) an idempotency key.

```typescript
await brain.pay("acme", {
  invoiceId: "inv_8231",
  idempotencyKey: "pay_inv_8231_2025_09",
});
```

Retries with the same key return the existing action, so a network blip never produces a duplicate payment.

### Where the Depth Lives

When you're ready, the protocol underneath has more to offer. Each of those concepts maps to a specific layer.

| Concept | Layer (deep dive)                 |
| ------- | --------------------------------- |
| Memory  | Raw, Ledger, and Wiki             |
| Policy  | Policy and the pre-execution gate |
| Agents  | The Agent layer                   |
| Proof   | Audit and on-chain anchoring      |

You can build with Brain without reading any of those sections. They are there when you want the deeper view.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.brain.fi/concepts/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
