ERP System as a Chatbot

Time tracking, inventory, and planning automation with built-in AI assistant.

Solution Overview

A full-featured ERP system in a conversational interface format. Time tracking, inventory, planning, analytics - all through a familiar chat. Built-in AI assistant helps users and answers questions about the system. Implementation possible in any messenger or web interface.

Market Positioning

Problems with Existing Solutions

Traditional ERP systems require staff training, specialized software installation, and ongoing technical support. For small and medium businesses, these are unaffordable time and money costs. Operational production process accounting is needed without complex implementations.

What the Solution Provides

  • Zero entry barrier - work through familiar interface without software installation
  • Instant access from any device - phone, tablet, computer
  • Offline mode capability with subsequent synchronization
  • Integration with existing enterprise infrastructure

Functional Modules

Authorization and Roles

Multi-level role model with access rights differentiation. Brute-force protection - no more than 5 attempts per 15 minutes.

  • Binding to unique user identifier
  • Dynamic account activity management
  • Separate interfaces for different roles

Time Tracking

Interactive data entry with multi-step FSM process:

  1. Date selection via interactive calendar
  2. Time parameter entry
  3. Completed operations detailing
  4. Confirmation and saving

The system automatically calculates derived indicators based on configurable formulas and coefficients.

Inventory Management

Material Receipt - recording arrivals with source specification.

Stock Control - minimum inventory monitoring.

Shipments and Unloading - movement documentation.

Inventory Check - periodic reconciliation with reminders.

Planning

  • Target indicators formation for the period
  • Real-time execution monitoring
  • Automatic notifications on approaching deadlines
  • Plan/fact deviation analytics

Analytics and Reporting

Comprehensive production data analysis with Excel export (8 sheets):

  • Employee statistics for any period
  • Key Performance Indicators (KPI) calculation
  • Material consumption convergence analysis
  • Shift log, operation details, material movement
  • Shipment history, inventory data, product balances

Integrated AI Consultant

Key innovation - AI assistant with context memory, trained on system documentation.

Context Memory - assistant remembers previous questions within session (up to 20 messages).

Specialized Knowledge - trained on specific system documentation.

Scope Limitation - answers only relevant questions.

Adaptive Formatting - correct output for selected interface.

Technical Architecture

Layered Architecture with clear separation of responsibilities:

1
Interface LayerConversational interface + FSM + Callbacks
2
Handlers Layer8 modules including auth, accounting, inventory
3
Services LayerBusiness logic, calculations, analytics
4
AI Assistant LayerAgent architecture + LLM Integration
5
Database LayerSQLAlchemy ORM + PostgreSQL 15
6
InfrastructureDocker, Redis, APScheduler

Design Patterns

Finite State Machine - complex multi-step dialog management (25+ states).

Service Layer Pattern - business logic isolation from transport layer.

Repository Pattern - data access abstraction.

Factory Pattern - AI agent creation and caching.

Dependency Injection - inversion of control for testability.

Technology Stack

Python 3.11 - main platform.

SQLAlchemy 2.0 - object-relational mapping.

PostgreSQL 15 - persistent storage.

Redis 7.x - FSM storage, caching.

Agent Architecture - graph-oriented LLM agents.

APScheduler - scheduled background tasks.

openpyxl - Excel report generation.

Docker Compose - service orchestration.

Infrastructure

Containerization

Full containerization with Docker Compose: application (Python 3.11-slim), PostgreSQL 15 with health checks, Redis 7 with persistence (AOF).

  • Isolated environment
  • Reproducible builds
  • Horizontal scaling
  • Simplified backup

Fault Tolerance

  • Health checks for all components
  • Automatic restart on failures
  • Connection pooling with pre-ping check
  • Graceful shutdown handler

Security

  • Running under unprivileged user
  • Network access isolation to DB
  • Secrets storage in environment variables
  • Rate limiting on critical endpoints
  • Transactional operation integrity

Extension Capabilities

Modular architecture enables easy addition of:

  • New types of tracked entities
  • Additional user roles
  • Integrations with external systems (1C, CRM, API)
  • Extended analytics and visualization
  • Multi-language support
  • Web admin interface

Key Advantages

  • Accessibility - work through conversational interface without software installation
  • Full ERP Cycle - time tracking, inventory, planning, analytics
  • AI assistant with context memory, trained on system documentation
  • Reliability - transactional integrity and fault tolerance
  • Scalability - containerized architecture ready-to-scale
  • Security - role model, rate limiting, isolation
  • Extensibility - modular structure for quick customization