Hi everyone,
Recently, I designed NextAssist AI Agent, which utilizes a chat feature to query the database naturally. The agent then presents the data in tabular and charting formats.
What it does:
-
Users type questions like “Show me pending sales orders over 50k” or “How many employees joined this year?”
-
The AI generates and executes secure Python code against your ERPNext instance
-
Results come back as formatted tables, bullet lists, or charts
-
All code runs inside Frappe’s RestrictedPython sandbox — no unsafe operations
Tech stack:
-
Backend: Frappe Framework, Python, RestrictedPython sandbox
-
Frontend: React + TypeScript (standalone www page)
-
AI: Multi-provider support — OpenAI, Anthropic (Claude), Google (Gemini)
-
Real-time streaming via Frappe’s socketio with polling fallback
Features:
-
Streaming token-by-token responses
-
Structured results (tables, charts, file attachments)
-
Session management with context window tracking
-
Model switching per session
-
Scheduler for automated queries and alerts (email, webhook, notifications)
-
Secure code validation and AST transformation before execution
Link to app: GitHub - navdeepghai/nextassist · GitHub
User Guide: https://esss.io/userguide
Demo: https://youtu.be/ePkFNCL8Azk
Feedback and suggestions welcome. Happy to answer questions about the architecture.