Runko Works

Case study

A multi-tenant AI assistant platform, built solo

An AI assistant that qualifies site visitors and hands usable leads to sales, for many businesses at once, on a core that is never rebuilt per customer.

Client
Own product
Role
Architect and sole engineer
Period
2026 – now
Area
AI · Platforms & data
Stack
TypeScript · NestJS · PostgreSQL · React · React Native · Claude API · OpenAI API · AWS · OpenTofu

Why it mattered

Enquiries reach a business at any hour and through many doors: the website, WhatsApp, Telegram, Instagram, the phone. Most of them get a slow answer or a form that tells sales very little. An assistant can talk to the visitor, find out what they actually need and hand sales a lead they can act on.

The hard part is doing that for many businesses at once. Each one has its own questions, its own knowledge and its own CRM, and none of them wants a development project every time a question changes. It has to grow with them as well: a new channel, a new process, ten times the conversations. In Europe it also has to respect data protection from the first message.

How it works

The platform is built around one idea: the core is never rebuilt for a business. What a business needs is added around it in one of three ways: configured, coded, or connected. A typical case is configured in a playbook. A process of its own, or a new tool, is coded and plugged in. A system the business already runs, its ERP, its shop or its ticket desk, is connected over MCP, the open standard for giving an AI model tools. With today’s AI, writing code is no longer the bottleneck. Having to touch the core for it would be.

What a message passes on its way through the platform is drawn on How the assistants are built. This page is about what carries it.

It adapts to a business

  • Configured: a playbook for the typical case. What the assistant asks, which outcomes count as qualified, when it hands over to a human and how fields map to the CRM. Changing it needs no code and no deployment.
  • Coded: an app for a case of its own. A step of a business process or a new tool is written as an app: inside the core, or as a service of its own that the core knows only by its address and a versioned contract. The core is not changed for it.
  • Connected: the business’s own systems over MCP. A system that speaks MCP brings its tools along, and the assistant reads stock, orders or tickets live. It changes data only after the visitor has confirmed exactly what will be sent. The parts & orders demo works this way, and Connected over MCP shows how.
  • A model per assistant. Claude or GPT is chosen per assistant, with a fallback model. For a client that needs EU residency, every AI call stays inside the EU.
  • Its own knowledge and channels. Each assistant answers from its own knowledge base. Web widget, Telegram, WhatsApp, Instagram and a mobile app share one conversation model.
  • Tenants apart. Platform → clients → assistants → conversations, with tenant isolation enforced in the application layer. The platform operator cannot read a client’s conversations.

It grows three ways

One deployment, one region, infrastructure as code

  1. Channelswebsites, messengers, apps
  2. ProxyTLS, static files
  3. API and workersone modular process
  4. PostgreSQLdata, queue, vectors
  • Object storage: files, nightly backups
  • Models: by the client’s key, or inside the EU

Vertical

More from one server

One reply at a time
20.3 s
Five at once
4.4 s

Measured: ten visitors write at the same moment, a stand-in model answers in two seconds.

Replies run in parallel inside one process, and a bigger machine carries more of them. The database lets one reply per conversation run, so no visitor gets two answers.

Horizontal

More servers

The process keeps no state of its own. The queue and the schedule live in PostgreSQL; live updates and rate limits move to Redis with one setting. Checked by running two processes side by side.

Functional

More capabilities

A vendor sits behind a port: model, CRM, calendar, storage. Business logic comes as an app, inside the core or as a service with its own repository, database and deployment.

One deployment, three ways to grow. None of them rewrites the core.

The application follows twelve-factor rules. When one server is no longer enough, PostgreSQL moves to a managed service, the API to several instances and the static files to a CDN: a change of configuration, not a rewrite.

It runs on little, in one region

  • One small server in Frankfurt. A proxy with automatic TLS, one process for the API and its workers, PostgreSQL next to it. Files and nightly database backups go to object storage.
  • Everything as code. Network, server, storage, DNS and deploy roles are written in OpenTofu. Staging and production are separate environments with their own servers, databases and secrets.
  • Deploys without stored keys. The pipeline takes a short-lived role, ships a build, runs the migrations, switches the release and checks its health. Nobody logs in over SSH: the port is closed.
  • Left out on purpose. No message broker: the queue lives in PostgreSQL. No serverless functions: WebSockets and the agent loop fit a long-lived process. No separate vector store.
  • Data protection by construction. A processing agreement per client, cookie consent in the widget, data export and deletion, encrypted per-client secrets.

The operator apps and the evaluation suite are separate projects built on top of it.