Shashank
← All work

Multi-tenant AI services platform

The AI layer of a business operations product used by small service companies. Around twenty-five services sharing one orchestration, memory and metering substrate, rather than twenty-five separate integrations.

The problem

Sector
Business operations SaaS
Scale
~25 AI services
Tenancy
Multi-tenant, metered
Role
Built the AI layer

A product with many AI features usually ends up with many AI implementations: each one wiring its own provider, its own prompts, its own error handling and its own idea of what a tenant is. It works until the first outage, the first cost review, or the first enterprise customer asking who did what.

The answer was a shared substrate. Every feature calls one internal interface, so routing, caching, fallback, metering and audit are solved once and inherited by all of them. Adding a feature becomes product work rather than infrastructure work.

Architecture

SURFACE TENANCY FEATURES AI LAYER PROVIDERS RESULT Client apps web · widget · API Auth & tenant roles · isolation Documents extract · fill · classify Conversations chat · email · calls Agents tasks · scheduling AI service layer route · cache · retry Model providers with fallback Metered result per tenant one interface, so routing, caching, fallback and metering are solved once
Decision engine · Approval gates on writes · Per-tenant usage and cost · Audit trail

Decisions worth defending

Isolation belongs in the data layer

Tenant identity is carried through every layer and enforced where the data lives, not in application conditionals someone can forget. A cross-tenant leak is the single bug a business product may not survive.

A decision engine, not prompt instructions

What runs automatically, what needs a human to approve it, and what is blocked entirely are rules in configuration rather than sentences in a prompt. That makes the policy auditable and testable, and it means changing it does not require redeploying an agent.

Metering from the first release

Tokens, calls and cost recorded per tenant and per feature from day one. It is what makes usage pricing possible, and it is how you find the one feature quietly losing money before the quarterly invoice tells you.

Stack

Platform

  • Serverless functions
  • PostgreSQL
  • Row-level isolation
  • Role-based access

AI layer

  • Model routing
  • Response caching
  • Provider fallback
  • Structured outputs

Features

  • Document extraction
  • Call transcription
  • Form automation
  • Embeddable chat

Operations

  • Usage metering
  • Audit logging
  • Approval workflows
  • Scheduled jobs
← Hybrid retrieval engine Enterprise platform AI →