Namtheg is a premium, end-to-end agentic AutoML platform. It automates the entire machine learning pipeline—from raw CSV upload, profiling, target selection, and feature engineering to model training, evaluation plotting, and instant serverless API deployment.
Driven by a LangChain agentic brain (DeepSeek via OpenRouter) and equipped with tailored Python execution tools, Namtheg makes training and deploying custom ML models a seamless, single-click experience.
This repository is structured as a modern monorepo separating frontend UI from backend execution:
├── Backend/ # Python FastAPI Backend
│ ├── app/
│ │ ├── agent/ # LangChain Tool-calling Orchestrator & System Prompts
│ │ ├── pipeline/ # Core pipeline steps (Profiling, Feature Engineering, Training, Visualization)
│ │ ├── deploy/ # Modal serverless deployment logic
│ │ ├── storage.py # Local file-based run manager
│ │ └── main.py # FastAPI application routes
│ ├── requirements.txt # Backend Python dependencies
│ └── .env.example # Example local backend environment variables
│
├── Frontend/ # Next.js 15 Frontend
│ ├── app/ # Next.js App Router (Upload, Preview, Running, Result, Inference UI)
│ ├── components/ # Reusable UI component library (TailwindCSS + Framer Motion)
│ ├── lib/ # Frontend API client library
│ ├── package.json # Node.js dependencies and scripts
│ └── .env.local.example # Example local frontend environment variables
│
├── Docs/ # Product specs and agent rules
│ ├── PRD.md # Product Requirements Document
│ └── AGENTS.md # Agent Operational guidelines
│
├── render.yaml # Render Deployment Blueprint config
└── insurance.csv # Sample dataset for demonstration
When you select a target column and click Start AutoML, Namtheg kicks off a stateful LangChain agent that executes the following specialized tools sequentially:
profile_dataset: Inspects schemas, missing values, distinct values, and data types.detect_problem_type: Auto-detects whether the task isregressionorclassificationbased on the target column cardinality and datatype.run_eda: Computes descriptive statistics, target distribution characteristics, and feature-target correlations.feature_engineer: Dynamically drops high-missing or high-cardinality ID columns, imputes missing values (median/mode), and encodes categorical columns.train_model: Trains a Random Forest (Regressor or Classifier) with a 5-fold Cross-Validation + 80/20 holdout split.generate_visualization: Generates a Predicted-vs-Actual scatter plot (regression) or Confusion Matrix heatmap (classification).- Justification: DeepSeek reviews all metrics and writes a highly structured 3-5 sentence analysis explaining model performance.
- Python 3.10+ installed
- Node.js 18+ installed
-
Navigate to the backend directory:
cd Backend -
Create and activate a virtual environment:
python -m venv .venv # Windows: .venv\Scripts\Activate.ps1 # macOS/Linux: source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure your environment variables:
copy .env.example .env
Open
.envand fill in:OPENROUTER_API_KEY: Get one from OpenRouter.MODAL_WORKSPACE: Your Modal username.
-
Start the backend:
uvicorn app.main:app --reload --port 8000
- Navigate to the frontend directory:
cd Frontend - Install npm packages:
npm install
- Set up local environment variables:
copy .env.local.example .env.local
- Start the Next.js development server:
Open
npm run dev
http://localhost:3000to interact with the UI.
Namtheg is fully ready for multi-tier production deployment:
A pre-configured Render Blueprint (render.yaml) is located in the root. When pushed to GitHub and connected to Render:
- It automatically provisions the FastAPI backend at
namtheg-b. - It provisions the Next.js frontend at
namtheg, automatically wiring it to communicate internally with the backend. - Environment variables (
OPENROUTER_API_KEY,MODAL_TOKEN_ID, etc.) are securely requested during setup.
When a user clicks "Deploy to Modal" on their successfully trained model:
- The backend leverages Modal serverless volumes (
namtheg-models) and the shared app (namtheg-inference). - Zero-cold-start uploads: The model is saved directly to a mounted persistent volume rather than redeploying containers.
- Interactive serverless prediction endpoints are served dynamically!
Ensure you deploy the core serverless inference wrapper once to your Modal space:
cd Backend
pip install modal
modal token new
modal deploy app/deploy/inference_app.pyCopyright (c) 2026 Khalid. All Rights Reserved. See LICENSE.
This project is source-available for viewing only. No use, copying, modification, or distribution is permitted without prior written permission from the copyright holder.