AI-powered ERP Assistant
Hybrid read-only AI assistant for an ERP system — still under active development — combining semantic search with validated SQL over MySQL AI views, exposed as a Gradio chat UI and a FastAPI HTTP API for ongoing improvement and client/ERP integration.
Key highlights
- LangGraph/ReAct agent (OpenAI or Gemini) that chooses semantic search for names and descriptions, or SQL for exact values, filters, aggregations and dates
- Semantic index: MySQL ERP views to local multilingual-e5-small embeddings to Qdrant
- SQL guard: sqlglot allows a single read-only SELECT on ai_view_* only, with a forced LIMIT, executed by a read-only MySQL user
- FastAPI (chat, session history, session delete, health) and Gradio chat with model selection; conversation history in MySQL, keyed by session_id and shared by both
- Docker Compose for FastAPI, Gradio, Qdrant and supporting services in local and staging environments
- Optional Langfuse tracing for agent runs, retrieval and SQL
- Actively iterating on agent tooling, retrieval quality and SQL safety based on real ERP usage