In short
- The foundation under every product: the Secure Agent Platform sits underneath Ebiz Suite, its hosted edition ebz.app, Agent WorkHub and the phone apps. Customers never see it directly; they feel it in every safe sign-in and every protected payment.
- The hard, risky jobs, done once: who is signed in, which business they act for, what they may touch, what changed and who changed it, and how much an AI may spend or do.
- Two layers: the core, and the integration hub that lets outside systems such as accounting software, Power BI or Microsoft Teams connect safely.
- One rule for AI: agents read and draft within their permissions and budget, and a person approves any action that matters.
- Measured against recognized standards: OWASP ASVS Level 2, the OWASP Top 10 lists for web, APIs and AI applications, the NIST Secure Software Development Framework, and privacy law such as Singapore's PDPA.
Part one: overview
The problem: everyone rebuilds the dangerous parts
Every product that serves many businesses must answer the same questions on every click. Who is this person? Which business are they acting for right now? Are they allowed to do this? If two people click at the same moment, which one wins? Who changed this price, and when? If an AI agent is involved, how much can it spend, and can it act on its own? When each product answers these questions in its own code, each gets them slightly wrong in a different place, and security reviews start again for every product.
The Secure Agent Platform answers them once, in one place, behind a clearly written agreement, a contract, that every product must use. A shopping mall is a good comparison: each shop decorates and sells as it likes, but the building, the security desk, the fire doors and the CCTV are shared and built to one standard.
What every product gets on day one
- Passwordless sign-in: passkeys, email codes and Google sign-in, with a fresh passkey demanded for money changes.
- Businesses kept apart: every record belongs to one business, checked before any product code runs.
- Safe storage: two people clicking at once can never both win; every change states the version it expects.
- One-purpose links: QR codes and order links that open exactly one door, never a master key.
- A record of every important change: who, how they signed in, and what changed, saved in the same step as the change.
- An AI gateway: every AI call checked, budgeted and recorded, and stopped at the limit.
- Sealed fields: the most sensitive data encrypted field by field, readable only by the roles that need it.
- Privacy built in: every personal field has a purpose and an expiry, and is deleted on schedule.
- Reliable background work: scheduled jobs with retries, and outgoing messages sent exactly once.
- Safe connections: the integration hub, where outside systems reach a business only with that business's permission.
Who it serves
- Business owners: their customers' data, their money and their records are protected the same way, whichever product they use.
- Product teams: they build features for shops, schools and offices, not security plumbing, and every new product starts secure.
- Security and risk reviewers: one core to review instead of one per product, with the same attack tests run against every change.
- AI agents and the people who supervise them: agents get bounded access and a budget, and people keep the final say.
The map: how the pieces fit

The AI rule: draft freely, act only with approval
AI agents read only what they were granted and prepare drafts within their budget. Anything material, such as sending a message, spending money, ordering stock or changing a record, waits for a person, who approves, edits or rejects it. Every approval is recorded with who approved it and when.

Part two: platform specification
1. Scope and standards
The platform provides identity, tenancy, storage, audit, AI control, privacy, payments intake, background work and integration for every product built on it. It is measured against these standards:
- OWASP ASVS 4.0.3, Level 2: the verification checklist for every app, with each requirement mapped to a test or a recorded "not applicable".
- OWASP Top 10 (2021) and OWASP API Security Top 10 (2023): threat categories for code review and independent retests.
- OWASP Top 10 for LLM Applications (2025): the design basis of the AI gateway.
- NIST Secure Software Development Framework (SP 800-218): the secure development lifecycle.
- Singapore PDPA, GDPR principles, and CCPA/CPRA for US customers: privacy by design.
- PCI DSS v4.0, kept to SAQ A scope: card data never touches the platform's code.
2. The threat it is designed against
A motivated stranger on the internet, with a browser, scripts, many IP addresses and patience, who wants to run up the AI bill or use the AI as a free proxy, read or change someone else's data, take over an owner or staff account, harvest personal data, plant content such as uploads or prompts that attacks other users, or make a product say something false. A lost laptop, a leaked token and a poisoned dependency are also in scope. Defense against an attacker who already controls the cloud accounts is multi-factor authentication, least privilege and alerts.
3. Twelve design principles
- Keys never leave the server. On AWS the AI model is called with the function's own role, so there is no static AI key; on Cloudflare, provider keys are Worker secrets. Secret scanning runs on every commit.
- One AI gateway, and nothing goes around it. Apps cannot import a provider's SDK; a gate test fails if one does.
- Spend is reserved before the call, atomically. No reservation, no call.
- The server owns the prompt. The browser sends a choice or validated data, never a system prompt.
- The model never decides an action. "Approved", "paid" and "booked" come from recorded workflow state; agents act only through allowlisted tools, and any irreversible step needs a person.
- An ID is never a credential. Access comes from a server-checked membership, and the business comes from the session, never from the request.
- Fail closed. A missing key, unreadable configuration, store error or unknown route means refuse.
- Collect less, keep it shorter. Every personal field has a purpose and an expiry.
- Same rules on every runtime. The core is runtime-neutral; adapters supply only storage, secrets and transport.
- Defense in depth. Every money or data control has a second, independent backstop outside the code: budgets, throttles and alarms.
- Every rule is proven by a test that attacks it, and each new guard is deliberately broken once to show its test catches it.
- Independent verification before exposure. No app is shown to a company or the public until an independent review says yes.
4. Use cases
Six kinds of actor use the platform, always through a product or the hub, never directly.

- Business owner: register a business, sign in with a passkey, manage staff and roles, change where money goes (with a fresh passkey), approve AI drafts, grant or revoke a connector, export the business's data.
- Staff member: sign in with their own login or a tablet PIN, work the order board, confirm a payment, read sealed fields only when their role allows.
- Customer: browse a business's pages, order or book through a QR code or link, pay the business directly, open their own order link, ask for their data to be exported or erased.
- AI agent: read granted sources, draft a reply, reorder or summary within its budget, and wait for approval.
- Outside system: an ERP, Power BI, Microsoft Teams or WhatsApp, acting only through a connector and a grant.
- Platform operator: approve, pause or restore a business, extend a trial, and use the whole-site switch, with a passkey only.
5. Architecture
Logical view. Figure 1 shows the three tiers: how people reach the products, the products, and the platform's two layers. Products never call each other's tables; outside systems reach products only through the hub.
Component view. The code is a set of packages with one direction of dependency. Apps depend on shared kits, the kits on the core, and the core only on ports that the cloud adapters implement.

Deployment view. The same core runs on two clouds. Production for ebz.app runs on Cloudflare; the AWS adapter is tested against the same atomic cases, so a product can move without changing its code.

6. The contract
The platform is defined first as a TypeScript contract: the code is the authority, and a written explanation sits beside it. It covers foundation rules, secrets, storage, tenancy, identity, HTTP, limits, AI, rendering, privacy, commerce, media, the outbox and jobs. Implementations are adapters behind it and can change without the products noticing. A change to the contract needs both builders' agreement and an entry in its change log.

- One storage port. Every adapter implements a single atomic store: strongly consistent reads with revisions, an all-or-nothing guarded commit, and partition queries. The core builds every atomic business operation on it once: spend reservation, admission, login claims, payment receipts, sequences, gauges, capability rotation, idempotency records and job leases.
- Minted evidence. Anything that carries authority is created only by the core and checked against a private registry: sessions, completed logins, verified capabilities, human-check proofs, staff and passkey sign-ins, payment events, budget contexts, and safe HTML and URLs. Product code cannot forge any of them.
- Route kinds. read, browser_write, pre_auth_exchange, login_callback, capability, signed_webhook and upload, with a separate operator pipeline. The kind decides the protection; handlers return typed session effects and never touch cookies.
- Ports an adapter supplies: secrets, key version, rate limiter, identity provider, human-check provider, model provider, blob store, image re-encoder and job triggers.
- Invariant families, each with an attack suite: foundation (fixed error text, a runtime log filter, injected time, integer money), secrets, storage, tenancy, identity, HTTP, limits, AI, rendering (one approved DOM sink), privacy, commerce and jobs (leases, fencing and idempotent re-runs).
7. Core services
Sign-in and identity. The core knows each person and their memberships and roles in each business. Owners sign in with passkeys (WebAuthn); people can also use one-time email codes or Google. Every sign-in is a single-use login transaction: a server nonce bound to the browser that started it and consumed atomically, with PKCE where the provider supports it. External identities are keyed by issuer and subject, never by email. A session is a short-lived signed token plus a server record with a revocation version, checked on every protected request, so turning a person off ends their sessions on the next request. Staff use their own login or a tablet PIN, stored with PBKDF2-SHA256 at 600,000 iterations or scrypt and a per-user salt, with lockout, a decoy hash, and the same error for a wrong user or a wrong secret. One daily admission counter covers every way in.
Tenancy. Every row carries its app and its tenant. The repository layer adds the tenant filter from the session, so app code cannot leave it out, and a test tries a cross-tenant read on every repository. Each tenant has a home and an off switch; the operator's suspension and restore are recorded in the same commit as the change.
Atomic storage. Every write states the revision it expects. A unit-of-work runner groups one action's reads and writes and re-runs on conflict, so two staff tapping "Payment received" at the same second can never both win.
Capabilities. Purpose-bound tokens, such as a table QR code or an order key, list exactly which tables they may read or write, for how long, and who may issue them. Purpose identifiers only ever grow, so printed QR codes keep working.
Audit. Privileged writes record who made them, how they signed in and what changed, in the same commit as the change.
Jobs and outbox. Scheduled jobs run under leases with fencing and are safe to re-run. Outgoing events are written to an outbox in the same commit and sent exactly once, with a sweeper that repairs any missed send.
8. The request pipeline
Every route declares its kind, and the core runs the same checks in the same order before any product code sees the request. Product code receives only a verified session or capability, never a raw cookie or token.

- Cookies: __Host- prefixed, HttpOnly, Secure and SameSite=Strict, on the same origin as the API.
- CSRF: every state-changing request needs a matching Origin from an exact allowlist and a per-session CSRF token in a header; GET never changes state.
- Limits: a body-size cap and a rate limit per app and route, keyed by the full IPv4 address or the IPv6 /64 network, with IPv4-mapped addresses sharing the IPv4 key.
- Errors: a stable code and a plain sentence, never a stack trace; logs carry a route ID and an allowlisted error code, never a raw path, input, token or secret.
9. Key flows
Passkey step-up for money changes. Changing where customers pay needs proof that the owner is present now.

A customer order through a QR code. No account is needed, and the code can do only one thing.

10. The AI gateway
Every AI call passes nine checks in order, and any failure ends it with no call to the model provider.

- Allowances follow the identity: anonymous callers never get more than guests, and allowances follow the server-bound identity or workspace across every sign-in method.
- No budget, no call: a paid task without a budget object is refused by the router itself.
- Prompts are not secrets: system prompts carry no keys, no other users' data and no internal URLs, and are assumed to leak.
- Backstops outside the code: on AWS, a budget alarm, a hard monthly ledger cap, reserved concurrency and an API throttle; on Cloudflare, a rate-limit binding and a kill switch; and an alert when daily spend passes half its cap.
- Usage records without content: one row per call with app, task, model, tokens, cost, outcome and the principal as an HMAC; no prompt or reply text is kept.

11. Data protection and privacy

- Data inventory: every personal field declares its purpose, lawful basis and retention days, and a gate test fails if a column has no entry.
- Minimize: no national ID or date of birth, no address unless delivery needs it, and phone and email optional where possible.
- Sealed columns: AES-256-GCM with a 96-bit nonce, per app and stage keyrings, and associated data that binds the key version, app, tenant, table and row. Ordinary reads see only "present"; a reveal needs a live session with a reader role and is audited before decryption. The operator is never a reader.
- Retention is code: time-to-live on DynamoDB and a purge job on D1 delete on schedule; erase and retention leave only a tombstone with no key.
- Pseudonymize: logs and analytics use an HMAC with a secret pepper.
- PII scrub before any model call: national ID numbers such as NRIC and FIN, phone numbers, card numbers, email and addresses; the scrub logs a count only.
- Rights: export and erase for every person.
- Residency: AWS ap-southeast-1 and D1 in Asia Pacific, with a US business's data kept in its own provider region where set up.
- No trackers: no third-party trackers, ads or remote fonts.
- Consent: recorded with version and time, and each collecting page states what is kept and for how long.
- Breach response: a runbook that meets the PDPA's three-day notification window.
12. Payments
- Cards stay out: where cards are used, checkout is hosted by the payment provider, so card numbers never reach the platform's pages or servers (PCI DSS SAQ A scope).
- Direct payments: for ebz.app, customers pay the business directly on local rails and staff confirm; changing where money goes needs a fresh passkey.
- Webhooks: signature verified with the provider's secret, a replay window enforced, and processed idempotently by event ID; an order is marked paid only from a verified webhook or a staff confirmation, never from the browser's return page.
- Payment proofs: screenshots of PayNow or UPI payments follow the upload rules and are verified by a staff member.
13. The integration hub
The integration hub is a module of the platform in its own package, never a separate product, because every outside call needs the core's identity, tenant scope, revocable grants and audit.
- Connectors are plug-ins: Odoo or ERPNext, Dynamics 365 Business Central, a read-only Power BI feed, Microsoft Teams and WhatsApp.
- Grants: a connector reaches a business only through a scoped grant that business gave, revocable at any time.
- Front door only: connectors call a product's own guarded functions, never its tables, and are audited like any write.
- Events: outgoing through the outbox, exactly once; incoming through verified webhooks.

14. Web, transport and uploads
- Domains and TLS: custom domains only, TLS 1.2 or newer, and HSTS with preload; default cloud addresses are never shared and redirect to the custom domain.
- Headers: no-store on sessions and personal data, nosniff, Referrer-Policy no-referrer, frame-ancestors none, and a strict Content Security Policy on anything a browser can open.
- Pages: script-src 'self' with no inline script, Subresource Integrity on any CDN asset, and every render through the escaping template.
- CORS: an exact origin list per stage, and never credentials across origins.
- Uploads: type checked by content, a size cap, images re-encoded on the server (which strips EXIF location), stored in a private bucket, served through short-lived signed URLs, and never from the app's own origin.
15. Operations

- Accounts: multi-factor authentication on the cloud root and every human user, no long-lived human access keys, and API tokens scoped to one zone or Worker.
- Least privilege: one role per app and stage: AI limited to named models, the encryption key named, email limited to fixed senders.
- Secrets: per-stage secret stores, format-checked on write, required ones checked at start-up (failing closed); rotation bumps a key version that ends sessions fleet-wide.
- Stage isolation: preview and production share nothing at runtime, and a gate test checks it.
- Backups and recovery: DynamoDB point-in-time recovery; D1 Time Travel plus a nightly export to a private R2 bucket; a restore rehearsed per app before go-live.
- Monitoring: alerts on spend over half a cap, spikes in sign-in failures, server errors and unusual tenant denials.
- Incident runbook: kill switch per app, rotate secrets and revoke sessions, preserve logs, assess and notify if required, and a post-incident record.
16. Secure development lifecycle and assurance

- Two builders, one contract: Codex builds the platform core and its adapters, and Claude builds the products; each reviews the other.
- Pull requests with checks: tests, type check, lint with security rules, render safety, dependency audit, secret scan and the data-inventory check, on a protected main branch.
- Dependencies: as few as possible, lockfiles committed, every lockfile audited, a software bill of materials per release, and a recorded reason for any new runtime dependency.
- Security suites first: the attack suites were written against the contract before the core existed; no product goes public while any is unfinished.
- Mutation checks: each guard is broken once on purpose to prove its test fails.
- One gate: a single command runs every test file and every check, and never stops at the first failure.
- Live checks: a smoke test on the real hostname, a TLS and header scan, and a spend-cap test against a fake provider.
- Evidence: each release records the commit, deployed revision, hostnames and gate result, and design choices are recorded as architecture decision records.
17. How the controls line up with common risks
- Broken access control (OWASP A01, API1): the tenancy filter from the session, role checks on every route, and one-purpose capabilities.
- Cryptographic failures (A02): no passwords stored for owners, strong hashing for staff PINs, and sealed columns.
- Injection and insecure design (A03, A04): the contract, strict request shapes, guarded writes and one escaping render sink.
- Identification and authentication failures (A07): passkeys, single-use login transactions, rate-limited codes and step-up for money.
- Software and data integrity (A08): lockfiles, audits, a bill of materials and verified webhooks.
- Logging and monitoring failures (A09): audit in the same commit, pseudonymized logs and alerts.
- Prompt injection and sensitive disclosure (LLM01, LLM02): user text and retrieved documents fenced as untrusted data, and a PII scrub before every call.
- Improper output handling (LLM05): output validated against the task's schema, rendered escaped, and never executed or used as a URL, query or command.
- Excessive agency (LLM06): allowlisted tools and approval before any material action.
- Unbounded consumption (LLM10): atomic budget reservations, rate limits and backstops outside the code.
18. Technology stack
- Language and tooling: TypeScript in strict mode with erasable syntax, run directly by Node 22; node:test; npm workspaces; esbuild; Wrangler and the AWS CDK.
- Cloudflare adapter: Workers, D1 through the atomic store, R2, KV, secrets, Turnstile human checks, the rate-limit binding, cron triggers and Email Routing.
- AWS adapter: DynamoDB through the atomic store, SSM Parameter Store, KMS, the Bedrock model provider, Lambda, API Gateway, CloudFront, EventBridge and SES.
- Identity: WebAuthn passkeys, OpenID Connect with PKCE for Google sign-in, and email one-time codes.
- Crypto: Web Crypto AES-256-GCM for sealed columns, HMAC for pseudonyms, and PBKDF2-SHA256 or scrypt for staff PINs.
- Shared kits: admin-kit (passkeys, staff PIN lifecycle, export, erase, audit), ui-kit (page shell and the one approved DOM sink) and the suite engine.
- Integration hub: connectors for Odoo Community in Docker, Power BI and Microsoft Graph.
- Phone apps: Central Architecture (Mobile Platform SDK), using the same product APIs and identity.
- Engineering model: AI-native, with Codex on the core and Claude on the products.
Products on the platform
- Ebiz Suite: the SME business suite for many kinds of business: start, configure, run and grow, with CRM, ERP, analytics and AI.
- ebz.app: the hosted edition of Ebiz Suite, where a business signs up and runs online at its own address.
- Agent WorkHub: a workspace where people and AI agents work side by side in chats, each chat setting its agent mode (active, on request or off); agents ask before any material action, and suppliers and resellers join a shared chat only when both owners agree. Ebiz Suite is its first customer, and Ebiz M365 Teams Agent Hub is its Microsoft Teams edition.
- Central Architecture (Mobile Platform SDK): the foundation for native iPhone and Android apps, with no second, weaker back end.
Questions a new reader often asks
Questions
Is it a separate product?
No. It is the shared foundation under Ebiz Suite, ebz.app, Agent WorkHub and the phone apps, and the integration hub is how other systems use it.
Why not use an existing login service or cloud product?
Parts are standards: passkeys, OpenID Connect, Cloudflare and AWS. What is distinctive is joining identity, business separation, one-purpose links, audit, privacy and AI limits into one contract, so every product gets all of them by default.
Can an AI agent ever act without a person?
Not for material actions. It may read what it was granted and prepare drafts; sending, buying or changing records waits for approval, and the model never decides that something is approved or paid.
Is it tied to one cloud?
No. Products call the contract, not a cloud; the same atomic cases pass on Cloudflare D1 and on AWS DynamoDB.
What does "revocable grant" mean in practice?
A business can switch off a connection, for example to its accounting software, at any time, and from that moment the connection can do nothing.
Glossary
- Adapter: the code that implements the contract's ports on one cloud.
- Atomic store: the one storage port: consistent reads with revisions and all-or-nothing guarded commits.
- Capability: a link or code that carries one purpose and only the access that purpose needs.
- Connector: a plug-in that lets an outside system talk to a product through the hub.
- Contract: the written, enforced list of what the platform offers to products.
- Grant: a permission a business gives to a connector, limited and revocable.
- Minted evidence: an authority-carrying object, such as a session, that only the core can create.
- Outbox: the table of outgoing events, written with the change and sent exactly once.
- Sealed column: a field encrypted on its own so only certain roles can reveal it.
- Tenant: one business, with its data kept apart from all others.
- Unit of work: the group of reads and writes of one action, saved together or not at all.
*Security is built once, and every product inherits it. Companion articles: "Ebiz Suite", the product, and "ebz.app", its hosted edition. © 2026 Srini Ramakichenane, Singapore.*