Overview
The mental model in five minutes.
Last updated
await brain.ask("acme", "..."); // for tenant "acme"
await brain.pay("acme", { ... }); // also "acme"
await brain.audit.list("acme", { ... }); // also "acme"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 answerawait brain.pay("acme", {
invoiceId: "inv_8231",
idempotencyKey: "pay_inv_8231_2025_09",
});