Lexia Architecture {#architecture}
Understand how Lexia is built — from its modular layers to how agents connect, deploy, and stay safe.
Image: High-level architecture diagram — user → Lexia Platform → Agents → Integrations
1. Overview
Lexia is a modular platform designed to build, connect, and manage AI agents efficiently.
It's composed of five main layers, each responsible for a specific part of the system.
Layers at a glance:
- Developer Layer
- Deploy Layer
- Safety Layer
- Integration Layer
- Admin Layer
Image: 5-layer stacked architecture diagram showing each Lexia layer with brief labels
2. Developer Layer
The Developer Layer is where AI agents are created, tested, and refined.
It includes:
- AI SDKs (Python, Node.js, etc.)
- Lexia Native Components for chat & UI
- Lexia CLI for local development and deployment
Image: Diagram showing developer tools interacting with Lexia API via CLI and SDKs
3. Deploy Layer
Handles hosting, persistence, and scaling.
Main components:
- Relational DB for structured data
- Vector DB for semantic memory and RAG
- In-Memory DB for fast context caching
- Storage for files and persistent objects
- CD/CI Pipeline for deploying agents to production
Image: Diagram of Lexia Deploy Layer showing databases, storage, and CI pipeline
4. Safety Layer
Ensures compliance, moderation, and observability.
Includes:
- Guardrail: blocks unsafe or unrelated inputs
- Tracing: logs all agent–user interactions
- Insights: provides analytics and usage metrics
- Observability: tracks performance and health
Image: Visualization of moderation pipeline and tracing logs flow
5. Integration Layer
Connects Lexia with the external world.
Supports:
- Webhooks
- Third-party connectors (Slack, WhatsApp, etc.)
- Authentication flows (OAuth, JWT, API Keys)
Image: Diagram showing agent-to-service communication via webhooks and APIs
6. Admin Layer
Provides governance and workspace management:
- Role-based Access Control (RBAC)
- Data Retention & Compliance
- Workspace Management
Image: Screenshot mockup of Lexia admin dashboard showing roles and workspace settings
7. Data Flow Example
From user prompt to final response:
- Message enters through Lexia UI or API.
- Guardrail checks input safety.
- Agent executes function or model call.
- Output is logged in Tracing and sent back.
- Insights update usage metrics.
Image: Sequence diagram showing user request → safety check → agent run → response → logs