ARCHITECTURE WHITE PAPER

Inside TackLabs Business OS:
Unified Multi-Model, 3-Tier Agents & WebRTC Voice

An exhaustive technical inquiry into replacing brittle enterprise Frankenstacks with a unified SurrealDB multi-model engine, hierarchical 3-tier autonomous agents, and sub-350ms streaming voice interfaces.

TackLabs Core Engineering Team12 min readArchitecture Review v2.4 (2026)
< 45ms
Multi-Hop Traversal Latency
vs 320ms+ on ETL
6-in-1
Unified Data Models in One Core
Graph, Vector, Doc, Table, Search, Time
< 350ms
Voice Duplex Streaming Latency
WebRTC Glass-to-Glass with Barge-in
100%
Mutation Governance
Human-in-the-Loop Gateway verification
Executive Architectural Summary

TackLabs Business OS fundamentally diverges from traditional enterprise chatbots. Instead of chaining loosely-coupled services across disparate vendors, TackLabs integrates relational consistency, vector retrieval, graph relations, and full-text search directly inside a single ACID-compliant SurrealDB core. High-impact operations are mediated by a 3-tier agent hierarchy and guarded by a cryptographic Human-in-the-Loop (HITL) authorization gateway.

COMPREHENSIVE MATRIX

Frankenstack vs Unified Architecture

Side-by-side contrast between traditional enterprise agent implementations and the TackLabs unified engine.

CapabilityLegacy FrankenstackTackLabs Business OS
Cross-Department Connectivity
Disconnected PostgreSQL + Neo4j; brittle ETL sync causes frequent data drift
Native SurrealDB Graph resolves plants, stock, and subsidiaries via pointers with zero joins
Vector & Semantic Context Retrieval
External sync to Pinecone/Qdrant induces network latency and cross-boundary privacy risk
In-core native Vector distance calculation co-located with tabular and graph records
From Natural Query to Action
Generates walls of text requiring manual copy-pasting into disconnected ERP spreadsheets
Renders in-situ Interactive GenUI Cards with validated inputs and instant authorization buttons
Access Control & Governance
Coarse table-level RBAC; exposed rows reveal sensitive columns across business branches
Cryptographic Zero-Trust Field-Level ACL isolating subsidiaries and sensitive financial metrics
Voice Interface Capability
Push-to-talk audio batch uploads with high latency and zero conversational barge-in
Full-duplex WebRTC streaming with instant interruption (Barge-in) for driving/on-the-go ops
CHAPTER 01 · Architecture Problem

The Enterprise Frankenstack Crisis

Why pasting AI onto legacy databases fails enterprise operations

Most enterprise AI solutions construct a fragile 'Frankenstack': stitching together PostgreSQL, Pinecone, Neo4j, Redis, and Elasticsearch via brittle ETL pipelines. The inevitable consequences are data drift, compounding latencies exceeding 500ms per agent step, and zero cross-system ACID guarantees.

Data Drift: Batch synchronization desynchronizes inventory truth from conversational reasoning.
Latency Cascade: Multi-hop network hops across disparate database services cause sluggish, unresponsive interactions.
Lack of Unified ACID: Incapable of transactional multi-database rollbacks when automated mutations fail midway.
CHAPTER 02 · Data Foundation

Pillar 1: 6-in-1 Unified Multi-Model Core

A single ACID engine consolidating Graphs, Vectors, Documents, Tables, and Search

TackLabs replaces the entire Frankenstack with a unified SurrealDB core. A single entity record concurrently houses structured financials, zero-join graph pointers, and semantic embeddings. Query latency drops below 45ms with native multi-hop traversals.

Zero-Join Traversals: Traverse operational relationships A->relates_to->B in microseconds without join overhead.
In-Core Vector Recall: Compute semantic distances in the exact same memory space as financial ledger records.
Deterministic ACID: Uncompromising consistency across inventory mutations and tax calculations.

Interactive 6-in-1 Model Inspector

Select a data model below to see how TackLabs handles it natively vs external database tools.

Graph Relations

Native Graph

Native pointer traversal enables multi-hop entity explorations in microseconds without table joins or foreign-key index bottlenecks.

Legacy Pain Point

Requires running dedicated graph servers with nightly batch ETLs, inevitably leading to data desynchronization and high latency.

TackLabs Advantage

Trace operational lifecycles from plant production batches to customer fulfillments in a single query.

SurrealQL · Native Graph Query Pattern
SELECT 
  id, 
  code,
  ->manufactured_by->plant.name AS plant_name,
  ->ordered_by->customer.company_name AS customer_name,
  ->ordered_by->customer->has_branch.name AS branch_names
FROM order:ord_9042;

Live Latency Simulation: Multi-Hop Traversal

Benchmark testing 1 query needing: Entity Relational Data + Vector Match + Customer Graph Record.

Frankenstack (PostgreSQL + Pinecone + Neo4j)320 ms
Compounding network latency across 3 vendor networks
TackLabs Business OS (In-Core Unified Memory)44 ms
Direct pointer traversal in-memory with zero network hop
Cross-Entity Zero-Join Traversal (SurrealQL)
-- ตัวอย่างการสืบค้นข้อมูลข้ามบริษัท สต็อก และผู้จัดส่งในคำสั่งเดียว
SELECT
  id,
  code,
  total_amount,
  status,
  ->ordered_by->customer.company_name AS customer_name,
  ->manufactured_by->plant.name AS manufacturing_plant,
  ->manufactured_by->plant->has_inventory[WHERE quantity < min_threshold].item_sku AS low_stock_alerts,
  ->belongs_to->subsidiary.tax_id AS entity_tax_id
FROM order:ord_2026_09
WHERE status = 'pending_review';
CHAPTER 03 · Autonomous Workforce

Pillar 2: 3-Tier Agent Workforce & War Rooms

Hierarchical specialization with strict Human-in-the-Loop authorization safeguards

TackLabs rejects the one-size-fits-all chatbot paradigm in favor of a 3-tier hierarchy: Executive Copilots, Functional Department Agents, and Deterministic Sandboxed Tools. Complex cross-functional challenges trigger asynchronous 'War Rooms', guarded by a strict Human-in-the-Loop (HITL) gateway.

Tier 1 (Executive Copilot): Cross-subsidiary strategic overview, bottleneck detection, and priority orchestration.
Tier 2 (Functional Agents): Domain-specialized copilots for Sales CRM, Inventory Ops, and Accounting reconciliation.
Tier 3 (Deterministic Tools): Sandboxed, zero-hallucination tools for tax math, stock checks, and ledger mutations.
Human-in-the-Loop Gateway: Agents draft, analyze, and present; the human leader signs off before state commits.
Human-in-the-Loop (HITL) Gateway Definition
// นิยามเกตเวย์ควบคุมการกลายพันธุ์ของข้อมูล (Mutation Guard)
export const QuotationApprovalGateway = createToolGateway({
  action: "quotation:finalize_and_dispatch",
  requiredRole: "org_owner",
  riskLevel: "HIGH_IMPACT_FINANCIAL",
  
  // ตรวจสอบความถูกต้องของข้อมูลก่อนส่งให้มนุษย์ตรวจ
  preValidation: async ({ quotationId, context }) => {
    const doc = await db.select(quotationId);
    assert(doc.total_amount > 0, "Invalid total amount");
    assert(doc.vat_amount === doc.subtotal * 0.07, "Tax mismatch");
    return { ok: true, draft: doc };
  },

  // เรนเดอร์ Interactive GenUI Card ให้ผู้บริหารตรวจบนหน้าจอแชต
  renderReviewUI: (draft) => ({
    component: "QuotationReviewCard",
    props: { ...draft, requireSignature: true }
  })
});
CHAPTER 04 · Omnimodal Interface

Pillar 3: Omnimodal WebRTC Voice & GenUI Cards

Low-latency full-duplex voice with native barge-in and reactive in-chat cards

Business operations happen on the go. TackLabs features an ultra-low latency (<350ms) full-duplex WebRTC streaming engine with conversational barge-in interruption. Furthermore, rather than emitting unstructured markdown walls of text, agents emit Generative UI (GenUI) cards with reactive inputs and approval buttons.

WebRTC Streaming Audio: True full-duplex voice channel eliminating push-to-talk delays.
Native Conversational Barge-in: Interrupt agents mid-sentence; the pipeline pauses audio emission instantly.
Generative UI (GenUI): Replaces text walls with actionable UI components: approval tables, sliders, and toggles.
CHAPTER 05 · Memory & Security

Pillar 4: 4-Layer Cognitive Memory & Zero-Trust ACL

Persistent multi-session memory guarded by cryptographic field-level permissions

Memory is partitioned into 4 distinct cognitive tiers: Working Context, Short-Term Session Buffer, Long-Term Semantic Vector Memory, and Organizational Graph Knowledge. Protected by Zero-Trust Field-Level ACL, access permissions evaluate at the individual attribute level, guaranteeing cryptographic tenant isolation across subsidiaries.

4-Layer Cognitive Memory: Seamless continuity across weeks of conversations without repetitive re-prompting.
Field-Level ACL: Granular column governance; sales agents see customer contacts while financial cost fields are masked.
Cryptographic Multi-Tenancy: Complete isolation of subsidiaries, factories, and retail branches per access rights.
Field-Level Access Control Rule (SurrealQL)
-- กำหนดสิทธิ์ระดับฟิลด์: พนักงานขายเห็นชื่อและเบอร์ แต่ซ่อนต้นทุนและวงเงิน
DEFINE TABLE customer SCHEMAFULL
  PERMISSIONS
    FOR select WHERE $auth.role IN ['founder', 'manager', 'sales_rep']
    FOR update WHERE $auth.role IN ['founder', 'manager'];

-- ฟิลด์สาธารณะสำหรับทีมขาย
DEFINE FIELD company_name ON customer TYPE string;
DEFINE FIELD contact_phone ON customer TYPE string;

-- ฟิลด์ความลับทางการเงิน: อนุญาตเฉพาะ Founder และ Finance Manager
DEFINE FIELD credit_limit ON customer TYPE decimal
  PERMISSIONS
    FOR select WHERE $auth.role IN ['founder', 'finance_manager']
    FOR update WHERE $auth.role IN ['founder'];
CHAPTER 06 · Business Workflow

Pillar 5: End-to-End Business Lifecycle

From natural language prompts to verified audit-trailed enterprise transactions

TackLabs mirrors real enterprise operations in 5 seamless stages: 1) Natural voice/text ingestion, 2) Contextual graph & vector recall, 3) Document draft generation with automated VAT & WHT math, 4) Smart review via interactive GenUI, 5) Atomic ACID stock and ledger mutations, and 6) Immutable cryptographic audit log appending.

Stage 1: Header-lines relational document creation conforming to business accounting standards.
Stage 2: Smart Approval gating preventing unauthorized or erroneous financial mutations.
Stage 3: Cross-department automated dispatch (Sales -> Operations -> Accounting).
Stage 4: Cryptographically signed immutable audit logs verifying every decision and user action.

TackLabs Core Engineering Team

Authored by the core architectural engineers behind TackLabs Business OS. For technical inquiries, custom deployment benchmarks, or developer questions, reach out to [email protected].