Technical Architecture & Product Documentation
Executive Summary
Platform overview and key metrics
Product Purpose and Vision
Mission, vision and core values
Target Customers and Use Cases
Industries and customer segments
System Architecture
Layer diagram and tenancy model
Technology Stack
Frameworks, databases and services
Database Architecture
46 tables across 9 modules
Core Modules Breakdown
15+ modules with configurations
AI Engine and LLM Integration
Multi-provider gateway and RAG
Deployment and DevOps
Docker, Kubernetes and CI/CD
Roadmap
Planned features and timeline
Security and Compliance
RBAC, audit and data protection
Appendix and References
API reference and glossary
MTS AI Agent Studio is a comprehensive enterprise-grade multi-tenant SaaS platform for building, deploying, and managing AI-powered conversational agents with integrated knowledge bases, workflow automation, and a marketplace ecosystem.
15+
Core Modules
7
LLM Providers
46
Database Tables
53
RBAC Permissions
36
Eloquent Models
Unified API abstraction across OpenAI, Anthropic, Google, DeepSeek, and local Ollama. Hot-switch providers without code changes.
Shared database with org scoping by default, isolated DB option for enterprise tenants. Full data isolation at every layer.
Full Retrieval-Augmented Generation pipeline with multi-format document ingestion, intelligent chunking, vector embeddings via Qdrant.
Drag-and-drop multi-step workflow orchestration with triggers, AI steps, conditional branching, loops, and external integrations.
Unlike proprietary platforms, MTS AI Agent Studio provides a provider-agnostic gateway. Switch between OpenAI, Claude, Gemini, or self-hosted models without rewriting a single line of agent logic.
Built-in RBAC with 53 granular permissions, organization-level isolation, comprehensive audit logging, and compliance-ready data handling for regulated industries.
Business users can configure, test, and deploy AI agents through a visual interface. Pre-built templates accelerate time-to-value without prompt engineering expertise.
Integrated RAG pipeline transforms static documents into intelligent, context-aware responses. Upload PDFs, wikis, or databases and have agents answer from verified sources.
Vision Statement
"To democratize enterprise AI by providing an open, secure, and infinitely extensible platform where every organization can build, deploy, and scale intelligent agents without compromising on control, compliance, or choice."
Open-source core, provider-agnostic, no vendor lock-in
Enterprise-grade encryption, RBAC, and audit trails
Horizontal scaling, queue-based processing, caching
Plugin marketplace, custom tools, workflow hooks
Large organizations with 500+ employees needing governed AI deployment, compliance, and multi-department agent management.
B2B SaaS platforms looking to embed AI agents as features within their own products via API and white-label solutions.
Small teams needing rapid AI agent deployment with minimal technical overhead and cost-effective pricing tiers.
Patient intake automation, symptom triage, appointment scheduling, medical record Q&A with HIPAA-compliant knowledge bases.
Portfolio analysis, fraud detection alerts, regulatory compliance checking, client onboarding with KYC document processing.
Product recommendations, order tracking, returns processing, inventory queries, personalized shopping assistance.
Contract review, legal research, case law retrieval, compliance document analysis, client intake automation.
Student tutoring, course material Q&A, admission assistance, grading support, research paper analysis.
Property matching, virtual tour guidance, mortgage calculation, tenant screening, lease document analysis.
Client Layer
Application Layer
Service Layer
Data Layer
External Providers
All tenants share a single database instance with organization_id column scoping on every table. Cost-effective for SMBs and startups.
Each enterprise tenant gets a dedicated database instance with separate credentials and network segmentation for maximum data isolation.
| Category | Technology | Version |
|---|---|---|
| Backend | PHP, Laravel, Livewire | PHP 8.2, Laravel 12.63, Livewire 4.3 |
| Frontend | TailwindCSS, Alpine.js, Filament, Chart.js | Tailwind 4.x, Filament v5.6, Chart.js 4.x |
| Database | MySQL/MariaDB, Redis, Qdrant | MariaDB 10.4+, Redis 7.x, Qdrant 1.x |
| Auth | Laravel Sanctum, Spatie Permission | Sanctum 4.x, Spatie 6.x |
| AI SDKs | OpenAI, Anthropic, Google, DeepSeek, Ollama | Official PHP/HTTP SDKs, 2024+ APIs |
| DevOps | Docker, Kubernetes, GitHub Actions | Docker 24.x, K8s 1.29+, GHA YAML |
| Billing | Stripe, Usage Tracking Engine | Stripe API 2024-12, Custom metering |
46 tables organized across 9 functional modules, all scoped to organizations via organization_id for multi-tenant isolation.
| Module | Tables | Count |
|---|---|---|
| Core / Auth | users, organizations, organization_members, roles, permissions, workspaces | 6 |
| AI Agents | ai_agents, agent_templates, agent_tools | 3 |
| Conversations | conversations, messages, message_feedbacks | 3 |
| Knowledge Base (RAG) | knowledge_bases, documents, document_chunks, embeddings | 4 |
| Workflows | workflows, workflow_steps, workflow_executions | 3 |
| Marketplace | marketplace_items, marketplace_categories, marketplace_reviews, plugin_installations | 4 |
| Billing | subscriptions, plans, invoices, usages, payment_methods | 5 |
| Analytics | audit_logs, analytics_events, api_keys | 3 |
| System | prompt_templates, api_endpoints, webhooks, integrations, notifications | 5 |
| Total | All modules combined | 36+ |
Note: Additional junction tables (model_has_roles, role_has_permissions, etc.), migration tracking tables, and session tables bring the total to 46. Every business table includes organization_id, created_at, updated_at, and soft delete support.
Comprehensive overview of all platform modules with configurations, sample data, and technical details.
Create and configure AI agents with model selection, system prompts, temperature tuning, token limits, and pre-built templates. Each agent supports multi-turn conversations with persistent memory.
Strategic planning and executive decision support. Analyzes market data and generates business plans.
Lead qualification, pipeline management, and sales conversation coaching with CRM integration.
Blog posts, social media content, marketing copy with tone customization and brand voice.
Threat assessment, vulnerability analysis, and security compliance monitoring.
Document search, knowledge retrieval, and FAQ automation powered by RAG pipeline.
Code generation, review, debugging, and refactoring with multi-language support.
First-line customer support with ticket routing, sentiment analysis, and escalation.
Policy Q&A, onboarding automation, leave management with privacy-compliant access.
Full Retrieval-Augmented Generation pipeline transforming static documents into intelligent, context-aware responses.
1,247
Documents
89,432
Chunks
Qdrant
Vector Backend
Visual workflow builder for multi-step agent orchestration with triggers, AI inference, conditional branching, loops, and external action integrations.
TRIGGER
New Message
AI STEP
Sentiment Analysis
CONDITION
Negative > 0.7?
ACTION
Escalate to Manager
AI STEP
Draft Response
OUTPUT
Send and Log
Real-time conversational UI built with Livewire for server-side reactivity. Features conversation sidebar, message history, typing indicators, and agent switching.
Community-driven plugin ecosystem with categories, ratings, install counts, and both free and paid listings.
Pre-trained agent + 500 Q&A pairs + escalation workflow
AI-powered contract review with clause extraction and risk scoring
HIPAA-compliant patient intake, symptom checker, and routing
Stripe-integrated subscription management with usage-based metering, tiered pricing, and automated invoicing.
Perfect for individuals and small teams getting started with AI agents
₹1,499/mo
or ₹11,999/yr · Save 33%
1
Products
1
Users
500
AI Queries/Day
For growing businesses that need multiple agents and team collaboration
₹4,999/mo
or ₹39,999/yr · Save 33%
5
Products
5
Users
5,000
AI Queries/Day
For organizations requiring unlimited scale and enterprise-grade features
₹14,999/mo
or ₹119,999/yr · Save 33%
Unlimited
Products
Unlimited
Users
Unlimited
AI Queries/Day
Real-time operational intelligence with 6 Chart.js visualizations, KPI stat cards, agent leaderboard, and system health.
24,891
Messages (30d)
↑ 12.3%
1,247
Active Conversations
↑ 8.7%
$3,421
API Cost (30d)
↑ 2.1%
99.7%
Uptime (30d)
↑ 0.1%
Full-featured admin dashboard with 9 resources, 26 pages, and 5 dashboard widgets for complete platform management.
17 RESTful API endpoints for programmatic access. Authenticated via Laravel Sanctum bearer tokens with rate limiting.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/agents | List all agents |
| POST | /api/v1/agents | Create new agent |
| PUT | /api/v1/agents/{id} | Update agent |
| DEL | /api/v1/agents/{id} | Delete agent |
| GET | /api/v1/conversations | List conversations |
| POST | /api/v1/conversations | Start conversation |
| POST | /api/v1/conversations/{id}/messages | Send message |
| GET | /api/v1/knowledge-bases | List knowledge bases |
| POST | /api/v1/knowledge-bases/{id}/documents | Upload document |
| GET | /api/v1/analytics/overview | Analytics summary |
// POST /api/v1/agents Authorization: Bearer mts_sk_a1b2c3d4e5f6... Content-Type: application/json { "name": "Finley", "role": "Financial Analyst", "model": "gpt-4o", "temperature": 0.4, "max_tokens": 4096, "knowledge_base_ids": [1, 3] } // Response 201 Created { "id": 9, "name": "Finley", "status": "active", "created_at": "2026-07-12T10:30:00Z" }
Role-Based Access Control powered by Spatie Permission with 5 hierarchical roles and 53 granular permissions.
| Role | Level | Key Permissions |
|---|---|---|
| super-admin | 100 | All permissions, system config, tenant management |
| admin | 80 | Agent CRUD, user management, billing, analytics |
| manager | 60 | Agent CRUD, knowledge bases, workflows, conversations |
| member | 40 | View agents, use chat, view knowledge bases |
| viewer | 20 | Read-only access to dashboards and reports |
Token-based cross-site request forgery prevention on all forms
Output encoding and Content Security Policy headers
Eloquent ORM parameterized queries throughout
Configurable per-route and per-user request throttling
Complete activity trail for compliance and forensics
AES-256 at rest, TLS 1.3 in transit for all data
The LLMGateway singleton pattern provides a unified abstraction across 7 LLM providers, enabling hot-swapping without application changes.
| Provider | Model | Input Cost | Output Cost | Context |
|---|---|---|---|---|
| OpenAI | gpt-4o | $2.50 / 1M | $10.00 / 1M | 128K |
| OpenAI | gpt-4o-mini | $0.15 / 1M | $0.60 / 1M | 128K |
| OpenAI | gpt-4-turbo | $10.00 / 1M | $30.00 / 1M | 128K |
| OpenAI | o3-mini | $1.10 / 1M | $4.40 / 1M | 200K |
| Anthropic | claude-3.5-sonnet | $3.00 / 1M | $15.00 / 1M | 200K |
| Anthropic | claude-3.5-haiku | $0.80 / 1M | $4.00 / 1M | 200K |
| gemini-1.5-pro | $1.25 / 1M | $5.00 / 1M | 2M | |
| gemini-1.5-flash | $0.075 / 1M | $0.30 / 1M | 1M | |
| DeepSeek | deepseek-chat | $0.14 / 1M | $0.28 / 1M | 128K |
| DeepSeek | deepseek-reasoner | $0.55 / 1M | $2.19 / 1M | 128K |
| Ollama | llama3.1 / mixtral | Self-hosted | $0.00 | Varies |
// Per-message cost calculation
total_cost = (input_tokens / 1,000,000) * input_price
+ (output_tokens / 1,000,000) * output_price
// Monthly organization usage
monthly_cost = SUM(all_message_costs) * (1 + markup)
DOCUMENT
PDF, DOCX, TXT
CHUNK
512 tokens
EMBED
text-embedding-3
VECTOR STORE
Qdrant
RETRIEVE
Top-K search
INJECT
Into prompt
Production-ready deployment with Docker Compose for single-node and Kubernetes manifests for high-availability clusters.
| Service | Image | Port | Purpose |
|---|---|---|---|
| app | php:8.2-fpm | 9000 | Laravel application server |
| nginx | nginx:alpine | 80, 443 | Reverse proxy and static assets |
| mysql | mariadb:10.4 | 3306 | Primary relational database |
| redis | redis:7-alpine | 6379 | Cache, sessions, queue broker |
| qdrant | qdrant/qdrant:v1 | 6333 | Vector database for RAG |
| ollama | ollama/ollama:latest | 11434 | Local LLM inference (optional) |
| worker | php:8.2-fpm | - | Laravel queue worker |
Deployment
App, worker replicas
Service
ClusterIP/NodePort
ConfigMap
Env variables
Secret
API keys, passwords
Ingress
TLS, routing rules
HPA
Auto-scaling rules
PDB
Pod disruption budget
PVC
Persistent storage
Push to main
git push
Lint and Test
PHPStan + PHPUnit
Build Docker
Multi-stage build
Push Registry
ghcr.io
Deploy K8s
Rolling update
Health Check
Smoke tests
Strategic feature development timeline across the next three quarters.
Enterprise-grade security architecture with defense-in-depth strategies and compliance-ready data handling.
0
Breaches (Lifetime)
99.99%
Security SLA
24/7
Monitoring
< 1hr
Incident Response
| RAG | Retrieval-Augmented Generation - combining document retrieval with LLM generation for grounded responses |
| LLM Gateway | Unified abstraction providing a single API interface across multiple LLM providers |
| Multi-Tenancy | Architecture where a single instance serves multiple organizations with data isolation |
| RBAC | Role-Based Access Control - permissions based on organizational roles and hierarchies |
| Filament | Laravel admin panel framework providing CRUD resources, pages, and dashboard widgets |
| Livewire | Full-stack Laravel framework enabling reactive components without JavaScript |
| Sanctum | Laravel auth package for SPA, API token, and mobile app authentication |
| Qdrant | Open-source vector similarity search engine for storing and querying embeddings |
| Endpoint | Method | Rate Limit |
|---|---|---|
| /api/v1/agents | GET, POST | 60/min |
| /api/v1/agents/{id} | GET, PUT, DELETE | 60/min |
| /api/v1/conversations | GET, POST | 30/min |
| /api/v1/conversations/{id}/messages | GET, POST | 120/min |
| /api/v1/knowledge-bases | GET, POST | 30/min |
| /api/v1/knowledge-bases/{id}/documents | POST | 10/min |
| /api/v1/workflows | GET, POST | 30/min |
| /api/v1/marketplace | GET | 60/min |
| /api/v1/analytics/overview | GET | 20/min |
| /api/v1/health | GET | Unlimited |
PHP
8.2.x
Laravel
12.63
Filament
v5.6
Livewire
4.3.x
MariaDB
10.4+
Redis
7.x
Qdrant
1.x
Docker
24.x
Technical Architecture and Product Documentation v2.4.0
Confidential. July 2026. All rights reserved.
This document contains proprietary information. Distribution restricted to authorized personnel.