Assistant
Architecture

An event-driven AI Operating System

Six layers, one bus. Every component is independently deployable, observable, and replaceable.

Apps

  • Web Dashboard
  • Inbox
  • Agent Builder
  • Workflow Canvas
  • Admin
  • Landing

Services

  • API Gateway (NestJS)
  • Auth
  • Workflow Engine
  • AI Orchestrator
  • Messaging
  • CRM
  • Billing
  • Analytics

Agents

  • Support
  • Sales
  • Voice
  • Booking
  • Custom Runtime

Data

  • Postgres 16
  • pgvector / embeddings
  • Redis (queue + cache)
  • Audit logs

Channels

  • WhatsApp
  • Telegram
  • Facebook / IG
  • Gmail / Outlook
  • Webhooks
  • Phone (Twilio)

Payments

  • Stripe
  • bKash
  • Nagad (soon)

Request lifecycle

From inbound message to executed action — every hop is logged and replayable.

  1. 01

    Ingest

    Messaging service normalizes inbound events from WhatsApp, email, webhooks.

  2. 02

    Bus

    Redis event bus fans the event out to subscribers with at-least-once delivery.

  3. 03

    Trigger

    Workflow Engine evaluates triggers + conditions and decides what runs.

  4. 04

    Reason

    AI Orchestrator loads CRM context + memory, calls LLM with tool schemas.

  5. 05

    Act

    Agent executes tool calls — DB writes, outbound messages, CRM updates, audit.

stack
Frontends
Next.js 14 + React 18
Gateway
NestJS / TypeScript
Workers
Node 20 + BullMQ
Database
Postgres 16 + pgvector
Bus
Redis 7 streams
Models
OpenAI · Anthropic · local
Deploy
Docker · Kubernetes
Observability
Prometheus · Grafana · Loki