A scalable, multi-tenant orchestration SaaS for agentic, event-driven workflows—built natively on microservices for cloud-scale, extensibility, and B2B isolation.
- Pure Microservices Architecture: Independent services for orchestration, memory, tenancy, agents, UI, and more.
- Scalability: Each service can scale horizontally—minimize bottlenecks, maximize flexibility.
- Event-Driven Agentic Flow: Mix deterministic/DAG logic with agentic, contextual, and human-in-the-loop execution.
- Contextual Memory (Graph & Vector): Durable, organizational "memory" for recalling historical workflows and decisions.
- Multi-Tenant Isolation: Secure and separated data/workflow per business.
- API Gateway (Port 3000) - Single entrypoint; auth, routing, rate limiting
- Tenant Management (Port 3001) - Business org CRUD, SSO, quotas
- Orchestration Engine (Port 3002) - Executes workflows as DAG and event-driven graph
- Event Bus (Port 3003) - Central event router/broker (Redis Streams)
- State Management (Port 3004) - Stores/replays workflow execution state
- Agent Registry (Port 3005) - Agent/tool registration, metadata
- Agent Execution (Port 3006) - Executes agents with provided workflow context
- Knowledge Graph (Port 3007) - Neo4j/ArangoDB; models relationships, entities, executions
- Vector Memory (Port 3008) - Qdrant/Weaviate—semantic embeddings & similarity search
- Context Retrieval (Port 3009) - Combines graph/vector for hybrid context recall (GraphRAG)
- Memory Indexer (Port 3010) - Background indexer; embeds data/events into graph/vector DBs
- Human-in-the-Loop (Port 3011) - Approval queue, notifications, intervention UI
- Workflow Editor Backend (Port 3012) - Workflow CRUD/validation, template management
- Analytics/Observability (Port 3013) - Traces, metrics, dashboards, per-tenant visibility
- Language: TypeScript (Node.js 20+)
- Service Framework: Express.js (REST APIs)
- Monorepo Management: Turborepo
- Event Bus: Redis Streams
- Job Queue: BullMQ (Redis)
- Relational Database: PostgreSQL 15+
- Knowledge Graph: Neo4j 5.x or ArangoDB 3.x
- Vector Database: Qdrant 1.7+ or Weaviate 1.24+
- Containerization: Docker, Docker Compose
- Authentication: JWT with tenant claims
- Observability: Winston logging, health checks
- Node.js 20+
- Docker & Docker Compose
- PostgreSQL 15+ (if running locally)
- Redis 7+ (if running locally)
-
Clone the repository
git clone <repository-url> cd lyzr-orchestration
-
Install dependencies
npm install
-
Build shared packages
cd packages/shared-types && npm run build cd ../shared-utils && npm run build cd ../shared-config && npm run build cd ../..
-
Start infrastructure services
docker-compose up -d postgres redis
-
Build and start microservices
# Build all services npm run build # Start services in development mode npm run dev
-
Start all services with Docker
docker-compose up -d
-
View logs
docker-compose logs -f
-
Stop services
docker-compose down
Copy the example environment file and customize:
cp env.example .envKey environment variables:
DB_HOST,DB_PORT,DB_NAME,DB_USER,DB_PASSWORD- PostgreSQL configurationREDIS_HOST,REDIS_PORT- Redis configurationJWT_SECRET- JWT signing secret (change in production!)- Service ports for each microservice
All API requests (except public endpoints) require a JWT token in the Authorization header:
Authorization: Bearer <your-jwt-token>
Base URL: http://localhost:3001/api/v1 or via Gateway: http://localhost:3000/api/v1/tenant-management
POST /tenants
Content-Type: application/json
{
"name": "Acme Corporation",
"domain": "acme.com",
"adminEmail": "[email protected]",
"adminName": "John Admin",
"adminPassword": "securepassword"
}GET /tenants?page=1&limit=50GET /tenants/{tenantId}PUT /tenants/{tenantId}
Content-Type: application/json
{
"name": "Updated Company Name",
"settings": {
"quotas": {
"maxWorkflows": 200
}
}
}POST /users
Content-Type: application/json
{
"tenantId": "tenant_123",
"email": "[email protected]",
"name": "Jane User",
"role": "developer",
"password": "userpassword"
}POST /auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "securepassword"
}Base URL: http://localhost:3000
/health- Gateway health check/services- List available services/api/v1/*- Proxied requests to microservices
lyzr-orchestration/
├── apps/ # Microservices
│ ├── api-gateway/ # API Gateway service
│ ├── tenant-management/ # Tenant Management service
│ ├── orchestration-engine/ # Orchestration Engine service
│ └── ... # Other microservices
├── packages/ # Shared packages
│ ├── shared-types/ # TypeScript type definitions
│ ├── shared-utils/ # Common utilities
│ └── shared-config/ # Configuration management
├── docker-compose.yml # Docker orchestration
├── package.json # Root package.json
└── turbo.json # Turborepo configuration
# Build all services
npm run build
# Build specific service
cd apps/tenant-management
npm run build# Start all services in watch mode
npm run dev
# Start specific service
cd apps/tenant-management
npm run dev# Run tests for all services
npm test
# Run tests for specific service
cd apps/tenant-management
npm test- Project bootstrapping with Turborepo
- Shared packages (types, utils, config)
- Tenant Management Service
- PostgreSQL integration
- CRUD operations for tenants and users
- JWT authentication
- Database schema and migrations
- API Gateway Service
- Request routing and proxying
- Authentication middleware
- Rate limiting
- WebSocket support
- Docker Compose setup
- Database initialization scripts
- Orchestration Engine Service
- Event Bus Service
- Agent Registry & Execution Services
- Memory layer (Vector DB, Knowledge Graph)
- Context Retrieval Service
- Human-in-the-Loop Service
- Workflow Editor Backend
- Analytics/Observability Service
- Demo UI/Frontend
The system includes sample data for testing:
Sample Tenants:
- Tenant ID:
tenant_sample_1, Domain:sample1.com - Tenant ID:
tenant_sample_2, Domain:sample2.com
Sample Users:
[email protected]/[email protected](Admin role)[email protected]/[email protected](Developer role)[email protected](Viewer role)
Each service exposes a health check endpoint:
# Check API Gateway health
curl http://localhost:3000/health
# Check Tenant Management health
curl http://localhost:3001/health- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
- Use TypeScript for all new code
- Follow the existing code structure
- Add proper error handling and logging
- Write tests for new functionality
- Update documentation as needed
For questions and support, please open an issue in the repository.