Skip to content
Back to projects

Full-Stack · 2026

LayaFlow: Decision and Workflow Automation

AI-powered system built around Laya, a structured decision model for fast probabilistic decisions. Instead of calling a generative LLM for every task, Laya turns an unstructured request into structured decisions (category, priority, risk, escalation probability). A deterministic policy engine interprets them and a workflow engine acts (assign, escalate or queue). Example: "Our production database is unavailable and all API requests are failing" becomes Category Technical, Priority Critical, Escalation 0.94, routed to the Engineering team and escalated. Components: Laya decision layer, decision normalizer, policy engine, workflow engine, FastAPI backend, persistence layer, testing layer. Goal: a small specialized model for structured decisions, deterministic software for business rules, and large generative models only when language generation is really needed.

Architecture

  1. User Request
  2. Laya Model
  3. Structured Decision
  4. Policy Engine
  5. Workflow Engine
  6. Assign / Escalate / Queue

Model

  • Laya: small specialized model that emits structured decisions (category, priority, risk, escalation probability)
  • Decision normalizer: validates and clamps outputs into a strict Pydantic schema
  • Policy engine: deterministic rules — no LLM in the business-logic path
  • Generative LLMs used only where language generation is genuinely needed

Dataset

Labeled operational requests (tickets/incidents) with category, priority and escalation outcomes used to train and calibrate Laya.

Results & metrics

Escalation example
0.94 → escalated
Decision path
structured, not generative
Tests
Pytest suite per layer

Deployment steps

  1. 1Run the Laya decision layer behind the FastAPI backend
  2. 2Persist decisions and workflow state with SQLAlchemy on PostgreSQL
  3. 3Policy engine evaluates each decision and routes to assign / escalate / queue
  4. 4Run the Pytest suite, then deploy via Docker Compose

Tech stack

  • Python
  • Laya
  • FastAPI
  • Pydantic
  • SQLAlchemy
  • PostgreSQL
  • Pytest
  • Docker
M

drawing ideas into systems...