# Brain

## Brain

- [Welcome to Brain 🧠](https://docs.brain.fi/welcome-to-brain.md): AI that runs finance for you. Brain is the financial intelligence layer for businesses, transforming financial activity into memory, intelligence, and autonomous execution.
- [Quickstart](https://docs.brain.fi/introduction/quickstart.md): Five minutes from npm install to a working integration.
- [The Wiki Layer vs. RAG and Graph](https://docs.brain.fi/introduction/the-wiki-layer-vs.-rag-and-graph.md)
- [Overview](https://docs.brain.fi/build/overview.md): Task-shaped guides. The patterns most apps need in their first hour.
- [Sign Up and Onboard](https://docs.brain.fi/build/sign-up-and-onboard.md): Go from zero to an authenticated sandbox tenant. Human login or a wallet-based agent.
- [Read a Financial Picture](https://docs.brain.fi/build/read-a-financial-picture.md): Pull balances, transactions, obligations, and counterparties for a tenant.
- [Pay an Invoice Safely](https://docs.brain.fi/build/pay-an-invoice-safely.md): Propose a payment, route to approval if needed, execute, get a receipt.
- [Give an Agent a Spending Limit](https://docs.brain.fi/build/give-an-agent-a-spending-limit.md): Define a policy in plain English. Brain enforces it on every proposed action.
- [Audit Every Action](https://docs.brain.fi/build/audit-every-action.md): Pull a verifiable trail of what your agent (or user) did.
- [Let an External Agent In](https://docs.brain.fi/build/let-an-external-agent-in.md): Authorize an MCP-compatible agent to read and propose on a tenant's behalf.
- [Overview](https://docs.brain.fi/concepts/overview.md): The mental model in five minutes.
- [Memory](https://docs.brain.fi/concepts/memory.md): What Brain knows about a tenant, where it came from, and how to query it.
- [Policy](https://docs.brain.fi/concepts/policy.md): The rules a tenant signed. How decisions are made.
- [Agents](https://docs.brain.fi/concepts/agents.md): Who can read, propose, and act. Internal and external.
- [Internal Agents](https://docs.brain.fi/concepts/internal-agents.md): Brain-shipped agents are first-class participants, not a parallel system.
- [Proof](https://docs.brain.fi/concepts/proof.md): Why every claim Brain makes is verifiable.
- [Overview](https://docs.brain.fi/protocol/overview.md)
- [The Six-Layer Stack](https://docs.brain.fi/protocol/the-six-layer-stack.md)
- [Raw and Ledger](https://docs.brain.fi/protocol/raw-and-ledger.md)
- [The Wiki](https://docs.brain.fi/protocol/the-wiki.md)
- [Policy and Permissioning](https://docs.brain.fi/protocol/policy-and-permissioning.md)
- [Agents](https://docs.brain.fi/protocol/agents.md)
- [Payment Intents](https://docs.brain.fi/protocol/payment-intents.md)
- [The Pre-Execution Gate](https://docs.brain.fi/protocol/the-pre-execution-gate.md)
- [M2M and x402](https://docs.brain.fi/protocol/m2m-and-x402.md)
- [Audit and Proof](https://docs.brain.fi/protocol/audit-and-proof.md)
- [Agent Contributions](https://docs.brain.fi/protocol/agent-contributions.md)
- [System Overview](https://docs.brain.fi/architecture/system-overview.md)
- [Data Flow](https://docs.brain.fi/architecture/data-flow.md)
- [Write Paths](https://docs.brain.fi/architecture/write-paths.md)
- [Tenant Isolation](https://docs.brain.fi/architecture/tenant-isolation.md)
- [Security and Compliance](https://docs.brain.fi/architecture/security-and-compliance.md)
- [Risks and Mitigations](https://docs.brain.fi/architecture/risks-and-mitigations.md)
- [Readiness Summary](https://docs.brain.fi/architecture/readiness-summary.md)
- [Enterprise Readiness](https://docs.brain.fi/architecture/enterprise-readiness.md)
- [Overview](https://docs.brain.fi/api-reference/overview.md)
- [Authentication](https://docs.brain.fi/api-reference/authentication.md)
- [Onboarding](https://docs.brain.fi/api-reference/onboarding-api.md)
- [Sources and Raw Ingestion](https://docs.brain.fi/api-reference/sources-api.md)
- [Ledger API](https://docs.brain.fi/api-reference/ledger-api.md)
- [Wiki API](https://docs.brain.fi/api-reference/wiki-api.md)
- [Policy API](https://docs.brain.fi/api-reference/policy-api.md)
- [Agents API](https://docs.brain.fi/api-reference/agents-api.md)
- [Payment Intents API](https://docs.brain.fi/api-reference/payment-intents-api.md)
- [Audit API](https://docs.brain.fi/api-reference/audit-api.md)
- [Proof API](https://docs.brain.fi/api-reference/proof-api.md)
- [Tenants API (GDPR deletion)](https://docs.brain.fi/api-reference/tenants-api.md)
- [Webhooks](https://docs.brain.fi/api-reference/webhooks-api.md)
- [MCP Server (API Reference)](https://docs.brain.fi/api-reference/mcp-server-api-reference.md)
- [Overview](https://docs.brain.fi/mcp-server/overview.md)
- [Tools](https://docs.brain.fi/mcp-server/tools.md)
- [Resources](https://docs.brain.fi/mcp-server/resources.md)
- [Prompts](https://docs.brain.fi/mcp-server/prompts.md)
- [MCP Authentication](https://docs.brain.fi/mcp-server/mcp-authentication.md)
- [Overview](https://docs.brain.fi/smart-contracts/overview.md)
- [BrainAuditAnchor](https://docs.brain.fi/smart-contracts/brainauditanchor.md)
- [BrainPolicyRegistry](https://docs.brain.fi/smart-contracts/brainpolicyregistry.md)
- [BrainSmartAccount](https://docs.brain.fi/smart-contracts/brainsmartaccount.md)
- [BrainMCPAgentRegistry](https://docs.brain.fi/smart-contracts/brainmcpagentregistry.md)
- [BrainReputationRegistry](https://docs.brain.fi/smart-contracts/brainreputationregistry.md)
- [Escrow and X402](https://docs.brain.fi/smart-contracts/escrow-and-x402.md)
- [Errors](https://docs.brain.fi/resources/errors.md)
- [Changelog](https://docs.brain.fi/resources/changelog.md)
- [Support](https://docs.brain.fi/resources/support.md)
- [Privacy Policy](https://docs.brain.fi/legal/privacy-policy.md)
- [Terms of Service](https://docs.brain.fi/legal/terms-of-service.md)
- [Disclaimer](https://docs.brain.fi/legal/disclaimer.md)


---

# 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, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on a page URL with the `ask` query parameter:
```
GET https://docs.brain.fi/welcome-to-brain.md?ask=<question>
```
The question should be specific, self-contained, and written in natural language.
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.
