OmniTek solves the multi-tenancy problem using a strict Database-per-Tenant (Isolated Cell) model, decoupled by a stateless edge routing layer. The system is split into a Control Plane (fleet management) and a Tenant Plane (isolated execution environments).
The Next.js tier contains zero hardcoded tenant logic. proxy.ts queries the Control Plane and injects Supabase credentials on the fly.
Each tenant lives in a physically distinct Supabase project. RLS provides secondary logical isolation, eliminating noisy neighbors.
The "One Prompt Does Everything" model relies on a hierarchical agent network that fans out tasks asynchronously. We model agents as the CPU, Skills as the ABI, and Edge Functions as the Actuators.
By offloading execution from the synchronous HTTP request to a pgmq-backed background worker queue, OmniTek achieves At-Least-Once delivery for AI commands. If an Edge Function times out, the Task Worker retries automatically.
Knowledge indexing is a continuous, reactive subsystem. Any state mutation in the tenant plane triggers an immediate vectorization and graph extraction pipeline natively at the database level.
Invoked via PostgreSQL triggers attached to critical tables, guaranteeing every business event is queued for indexing without dual-writes.
Combines Metadata filtering, Dense Vector Search (70%), Sparse Keyword (30%), and Entity Graph Traversal.