Finance.
What you're building
A budgeting app that records spending as memory (durable facts about the user) and surfaces patterns they can act on. The payoff is trust through restraint: this recipe holds the strictest least-scope discipline of any, because finance is the data users scrutinize most.
You have a connection token from the connect flow with these scopes (one permission each): memory:write:finance.* and memory:read:finance.*. Request the narrowest finance sub-scopes you actually need.
Scopes to request
| Scope | Why |
|---|---|
memory:write:finance.* | record purchases and budget signals |
memory:read:finance.* | analyze and surface spending patterns |
The user sees finance.* on the consent screen. Request only the finance sub-scopes you truly need, and never write raw account or card numbers into memory — store categories and amounts, not identifiers. See security and permissions.
What to write
Remember spending and habits as durable memory — plain natural-language content in a finance scope, no LLM required to write. To also notify other apps of a transaction in real time, emit a signal — that part isn't memory.
// A purchase the user made — durable memory in the finance scope.await pambase.remember({content: "Spent $64.20 on groceries.",kind: "event",scope: "spending",});// A spending habit worth keeping.await pambase.remember({content: "Cooks at home on weekdays.",kind: "preference",scope: "finance",});// → { accepted: true, memoryIds: ["mem_…"] }// To notify other apps of a transaction in real time (not memory), emit a signal instead:await pambase.emitSignal({ type: "transaction.recorded", payload: { amount: 64.2, category: "groceries" } });
How to read — recall ranked memories
recall returns relevance-ranked memories so your LLM can summarize. Scope it to finance and read the content field on each.
const { memories } = await pambase.recall({query: "dining out this month",scope: "finance",limit: 25,});// memories → [{ id, type, scope, content, importance, occurredAt, sourceApp? }, …]// content is text — extract the amount you stored, then total it:const total = memories.reduce((sum, m) => {const amount = Number(m.content.match(/[\d.]+/)?.[0] ?? 0);return sum + amount;}, 0);// total → e.g. 142.6
Proactive (optional)
Call schedule() to set a monthly budget check-in; PAMbase fires a schedule.fired webhook back at that time. See webhooks & scheduling.
Asking for memory:read:finance.budget instead of all of finance.* raises consent rates noticeably. See the Catalog for the standard finance vocabulary.
Next
- Security — handling sensitive financial data.
- Permissions — scopes and least-privilege.
- Catalog — standard finance event and memory shapes.