Inspiration

Grassroots charities and NGOs increasingly take digital donations, but the smallest ones have no finance staff, no treasury discipline, and no way to prove to donors that money went where it was promised. Manual books are error-prone and unauditable; "we'll just watch the balance" fails the moment there's volatility, a mistake, or a skeptical donor.

What it does

Amanah is an autonomous treasury guardian. Donations arrive as captured PayPal orders. An AI reasoner evaluates live treasury value against program budgets and a reserve floor, and recommends whether and how much to disburse — clamped by guardrails set in code, not by asking the model nicely. Declarative protection rules turn that into concrete proposals. A human confirms or rejects; the confirm step is the only code path that can move money. Every event — donation, recommendation, proposal, confirmation, payout — is a SHA-256 receipt linked to the previous one and pinned to IPFS, so anyone can independently verify the chain and detect tampering.

How we built it

PayPal is load-bearing: donations in via PayPal Orders (checkout + capture), disbursements out via PayPal Payouts, behind a MoneyProvider seam with a real sandbox implementation and a zero-key mock so the demo runs with no credentials. The AI is load-bearing too: the reasoner picks the target program and amount from live state, with guardrails (maxSinglePayoutUsd, minReserveUsd) enforced in code after the model responds — never trusting the model to move money. The audit spine is a hash-chained receipt ledger (SQLite) with IPFS/Pinata pinning; verifyChain fails closed at the first tampered receipt. Stack: TypeScript monorepo (pnpm), Node/Express API, React + Vite dashboard, SQLite.

Challenges we ran into

The hard part wasn't the AI or the payments — it was making the agent safe by construction. The model must never be trusted to move money, so the human gate is the only execution path and the guardrails live in code, not in a prompt. Getting the AI to be genuinely load-bearing (picking program + amount) while staying clamped by deterministic limits, and making the receipt chain independently verifiable, took the most iteration.

Accomplishments that we're proud of

A working end-to-end loop: donate → AI evaluates and recommends (capped by the reserve floor and single-payout cap) → rules generate proposals → human confirms → execute, with a tamper-evident hash-chain that verifies clean. Shipped and live, runs with zero API keys, and the safety model (human gate + code guardrails) is the part that makes an autonomous agent actually deployable by an org that can't afford a finance team or a security incident.

What we learned

That the safety architecture IS the product. An AI agent that touches money is only deployable if the model can't move funds on its own — so the constraints (human confirmation, code-enforced caps, verifiable audit trail) aren't bolt-ons, they're the reason it's trustworthy enough to use.

What's next for Amanah

Multi-currency and multi-provider treasuries, a donor-facing view of the audit chain so donors can verify their own contribution's path, and richer protection rules (volatility-aware reserve targets, per-program spend velocity limits).

Built With

Share this project:

Updates

Submission history