AI governance is the set of controls that decide what an AI system may do, who approves it and how anyone can check it afterward, and I build those controls into the software itself. In my systems, fixed rules or real data decide the numbers, the AI explains and drafts, a person approves important actions, every action is logged, and evaluations run before launch and on every change.
Human in the loop
The agent proposes and a person approves before anything important happens, as in Posific and Wakeel.
Rules for the numbers
Fixed rules or real data calculate every figure. The model explains and drafts; it does not decide amounts.
AI audit trail
Every action logged, and in Wakeel every step signed into a hash-chained audit trail with a tamper test.
LLM evaluation
Evaluation suites and attack tests that run before launch and again whenever the system changes.
AI guardrails and budgets
Safety checks, spending caps and a daily AI budget per business, so cost stays inside set limits.
List the actions
We write down everything the AI could do and mark the actions that need a person’s approval.
Move the numbers into rules
Figures that must be exact go into fixed rules or come from real data, not from the model.
Log and sign
Every action is logged. Where the stakes are high, steps are signed into a hash-chained audit trail.
Evaluate on every change
An evaluation suite and attack tests run before launch and after each change, and budgets cap AI spend.
Technology
- TypeScript
- Next.js
- Node.js
- PostgreSQL
- Drizzle
- zod
- GitHub Actions CI
- Playwright
AI governance as working controls, not only a policy
A written AI policy says what should happen. Controls in the software make it happen every time and leave a record that it did. I build the second kind, and they make the first kind much easier to keep.
I come to this as an engineer and a CTO: today I’m CTO of four companies, and from 2020 to 2024 I was CTO, and led marketing and business development, at CosmeDocs and MEDACLES, UK healthcare and aesthetics organizations.
Human in the loop: choosing where a person decides
Human in the loop means the AI prepares and a person decides. The skill is choosing where. Put a person on every step and nobody uses the system. Put a person nowhere and the first bad answer goes straight out.
In Posific, my POS and accounting software, the business agent explains the figures and drafts the next step, and any action needs a person’s approval. In Wakeel, my rent-renewal prototype, the agent waits for a person’s approval before it acts.
If a mistake would cost money, mislead a customer or change an official record, a person approves the action. The rest can run on its own, with every action logged.
How a governed agent works: Wakeel
Wakeel is my prototype of a governed AI agent for Dubai rent renewal, in Arabic and English, with Gulf Arabic voice input. Its flow shows the controls working together.
- RequestA person asks in Arabic or English, typed or spoken.
- RulesThe agent calls a fixed rules engine through tools.
- ApprovalIt waits for a person’s approval before acting.
- RecordEvery step is signed into a hash-chained audit trail.
Each control covers a different way things can go wrong, and every step can be checked afterward.
AI guardrails: rules, limits and budgets
Guardrails are the limits around a model, and the strongest ones live outside it, in code the model cannot argue with. In Posific, fixed rules calculate every figure and each business has a daily AI budget. The mustashar.ae shop assistant has safety checks and a spending cap.
Noor AI shows the same idea in a very different subject: it answers from Quran and hadith search with references, inside guardrails, and tracks its costs.
An AI audit trail that shows tampering
Logs are only useful if you can trust them. In a hash-chained audit trail, each entry carries a fingerprint of the one before, so changing or deleting an old entry breaks the chain. Wakeel signs every step into one, and a tamper test checks that changes are caught.
Across my AI systems the simpler rule holds: every action is logged, so you can see what the system did and when.
LLM evaluation before launch and on every change
A system that passed a demo has not been evaluated. Evaluation means a fixed set of scenarios with known good outcomes, run the same way every time, plus attack attempts, so you can tell whether a change made things better or worse.
- Wakeel passed 11 of 11 live evaluation scenarios.
- The mustashar.ae assistant was tested against 240 normal scenarios and 40 attack attempts before launch.
- Posific runs its evaluation suite on every change.
Responsible AI and AI risk management in practice
AI risk management starts with a plain list: what the system can do, what could go wrong, and which control catches it. A wrong figure is caught by fixed rules. A harmful action is stopped at approval. A quiet change in behavior shows up in evaluations. A dispute about what happened is settled by the audit trail.
Regulations such as the EU AI Act raise expectations for human oversight and documentation. Controls like these produce records of oversight as part of normal work. I build the controls; advice on what the law requires of you should come from a lawyer.

Wakeel
A prototype AI agent for Dubai rent renewal that calls a rules engine, waits for a person’s approval and signs every step into a tamper-evident audit trail.
Posific
An offline-first POS and accounting system for UAE shops, on the web, Android and Windows. Its AI business agent explains and drafts, and a person approves every action.
mustashar.ae
A bilingual farm-supply store with 803 products, synced with a POS, and an AI shop assistant that answers from live product data and hands over to agricultural engineers.
What is AI governance?
AI governance is how an organization controls what its AI systems may do, who is accountable for them, and how their behavior is checked. It includes policies, but the part that protects you day to day lives in the software: approvals, fixed rules for exact figures, logs, evaluations and spending limits. I design and build those controls into AI agents and apps.
What is human in the loop?
Human in the loop means a person reviews or approves an AI system’s output before it takes effect. In an AI agent, the agent prepares an action and a person approves it. In Posific, any action the business agent drafts needs a person’s approval, and Wakeel waits for approval before acting. The design question is which actions need it.
What are AI guardrails?
AI guardrails are the limits that keep an AI system on task: rules on what it may say and do, checks on what goes in and comes out, and caps on cost. The most reliable guardrails sit outside the model, in code it cannot talk its way around, such as fixed rules for figures, approval steps and spending caps.
How do you evaluate an LLM application?
Build a set of scenarios with known good outcomes, add attack attempts, and run them the same way before launch and after every change, tracking what passes and what fails. Wakeel passed 11 of 11 live evaluation scenarios, and the mustashar.ae assistant was tested against 240 normal scenarios and 40 attack attempts before launch.
What is an AI audit trail?
An AI audit trail is a step-by-step record of what an AI system did, kept so it can be checked later. A plain log can be edited quietly. A hash-chained trail links each entry to the one before it, so any change to past entries shows. Wakeel signs every step into one and has a tamper test.
How does the EU AI Act relate to AI governance?
Regulations such as the EU AI Act raise expectations for human oversight and documentation of AI systems. I’m an engineer, not a lawyer, so I don’t advise on what the law requires of your business. What I build are the controls that produce oversight and records as part of normal work: approvals, logs, audit trails and evaluations.
AI security
Security-first engineering for AI agents and apps: prompt injection defenses, attack testing before launch, scam detection and secure code.
AI agents
AI agents that work with your tools, data and rules, designed and built end to end, with a person approving the important actions.
Fractional CTO
Part-time technical leadership from a working CTO who still builds: architecture, technical due diligence, hiring and leading developers.
AI training for teams
Hands-on AI training for teams: what AI can and can’t do, how to use it at work, and how to use it safely, taught with real systems I’ve built.
Govtech and AI in government
Govtech and AI in government built to be governed: a rules engine works out the result, a person approves and every step is signed, as in Wakeel, my Dubai prototype.
In depth
Human in the loop AI: how I keep AI agents under control
Where to put a person in an AI workflow, how to design approvals people actually read, and the governance framework I use for agents that handle money and customers.
Nov 7, 2026 · 8 min readHow to evaluate an LLM app before it goes live
A practical LLM evaluation method: define good behavior, build normal and attack scenarios, grade with code where you can, and run it all again on every change.
Nov 7, 2026 · 8 min readWhat is prompt injection? How I test AI agents against it
Prompt injection is the attack every AI agent has to survive. What it is, the kinds to expect, how to contain it, and how I test for it before launch.
An AI agent, an app, a platform or a growth problem. Tell me what you want to achieve and I’ll tell you how I’d build it.
Start a project
















