Safety architecture
InvestPilot
A consent-first investment assistant where the model may propose but only a human with Face ID may approve — and every number comes from code, not from the model.
Working · paper-trading by default · 2026
5
revocable consent scopes
10 min
approval expiry
1%
max price drift
3
flags required for live
01 The problem
- Letting a language model near a brokerage account is a safety problem long before it is a modelling problem.
- A model that can both decide and execute has no meaningful audit trail and no point at which a human can intervene.
- Models state numbers confidently whether or not those numbers exist in the data.
02 The approach
- Entry, stop, targets and quantity are computed deterministically in code. The model reviews and explains; it never originates a number.
- Any figure the model writes that is not present in the underlying data is flagged in the app rather than shown as fact.
- Five separate consent scopes, off by default, versioned and revocable, re-checked server-side on every call — not a single terms checkbox.
03 What it does
The model cannot execute
Every order requires a fresh human approval of one specific proposal. The approval is single-use and expires after ten minutes.
Approval is biometric
Pairing issues an approval key held in the iOS Keychain behind Face ID. Without it, nothing is approved.
Re-checked at execution
Immediately before placing an order the server re-verifies consent, kill switch, limits, market hours, and that price has not drifted more than 1% from the approved proposal.
Risk cannot be argued with
A stop-loss cannot be vetoed by the model. Competing exits merge into one message. A daily loss limit blocks new entries outright.
No credentials in the app
Only the broker's official API key and TOTP, held server-side. The app never sees broker credentials and no password is ever stored.
Everything is logged
Every consent change, proposal, notification, decision and order is written to an audit log.
Built with
- FastAPI
- Expo
- React Native
- Ollama / Qwen
- SQLite
- iOS Keychain
- Pytest
Paper-trading by default. This is an engineering case study in consent and human-in-the-loop design — it is not investment advice and no performance is claimed.