Skip to main content

AI-powered WhatsApp ERP for India's 63 million MSMEs

Project description

SUTRA Core logo

SUTRA Core

AI-Powered WhatsApp ERP for India's 63 Million MSMEs
Voice. Text. Hinglish. Zero training. Runs on a โ‚น800/month VPS.

Stars Forks License Python FastAPI Status Deploy CI Gumroad


SUTRA (Systematic Unstructured Text & Resource Allocator) โ€” a textile merchant in Surat sends a Hinglish voice note; SUTRA transcribes, checks stock, confirms the order, deducts inventory, generates a GST invoice, and sends it back via WhatsApp. No app. No login. No training.


โœจ Features

Capability What It Does
๐ŸŽ™๏ธ Voice-to-Order Hinglish voice notes โ†’ transcribed โ†’ structured order in <30s
๐Ÿ“ฆ Auto Inventory Stock deducted on confirmation. Restock alerts before stockout.
๐Ÿ’ฐ Udhaar (Credit) Mgmt Track credit limits, aging, auto-reminders on WhatsApp
๐Ÿงพ GST Invoicing PDF invoices generated and delivered in the same WhatsApp thread
๐Ÿข Multi-Tenant One deployment serves unlimited businesses with isolated data
๐Ÿ” SOC 2 Ready AES-256 encryption, JWT auth, webhook security, RBAC
๐Ÿ–ฅ๏ธ Owner Dashboard Analytics-only Next.js dashboard for month-end review
๐Ÿ“ก Monitoring Prometheus + Grafana stack. Alertmanager for critical events.

๐Ÿš€ Quick Start

git clone https://github.com/ravikumarve/sutra-core.git
cd sutra-core && cp .env.example .env   # configure your API keys
docker compose up --build                # starts FastAPI + Redis + PostgreSQL

That's it. Your webhook listener is live at http://localhost:8000. Configure it as your Meta WhatsApp webhook URL and start receiving orders.

๐Ÿ“– Full deployment guide โ†’


๐Ÿง  How It Works

SUTRA is an asynchronous multi-agent mesh. Three specialized agents process every message through an event-driven pipeline:

  WhatsApp โ”€โ”€โ–บ Webhook โ”€โ”€โ–บ Redis Queue โ”€โ”€โ–บ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  (Voice/Text)            (Event Bus)        โ”‚ Liaison โ”‚โ”€โ”€โ”€โ–บโ”‚ Strategistโ”‚
                                             โ”‚ (Intent)โ”‚    โ”‚(Execution)โ”‚
                                             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
                                                                  โ”‚
                                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”‚
                                              โ”‚ Auditor โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                              โ”‚(Ledger) โ”‚โ”€โ”€โ–บ PDF Invoice
                                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    WhatsApp Reply
Agent Role Integrations
Liaison Decode intent from raw text/audio Whisper-Hinglish, Sentiment Analyzer
Strategist Validate & execute against DB Inventory, Credit Scoring, Pricing
Auditor Immutable ledger + compliance PDF Generator, GST Validator

No agent calls another directly. All communication is through AgentMessage objects on Redis Streams โ€” enabling independent scaling, restart, and replacement.


๐Ÿ› ๏ธ Technology Stack

Layer Technology
Backend FastAPI (Python 3.12+)
Database PostgreSQL 15 with schema-level multi-tenancy
Queue Redis Streams (per-tenant namespaced)
STT OpenAI Whisper (CPU, Hinglish post-processing)
Dashboard Next.js 14 + shadcn/ui (analytics-only)
Monitoring Prometheus + Grafana + Alertmanager
CI/CD GitHub Actions (test โ†’ lint โ†’ security scan โ†’ deploy)
Deployment Docker Compose / systemd

๐Ÿ“Š Architecture Decisions

Decision Why
Headless (WhatsApp-first) Shop owners are on WhatsApp 8 hours/day. No app to install. Zero adoption friction.
PostgreSQL over NoSQL Financial ledger requires ACID. Udhaar entries must be atomic with inventory.
Redis Streams over Kafka Single VPS deployment. Kafka is overkill. Redis handles the throughput comfortably.
CPU-only Whisper 30s async transcription latency is acceptable. No GPU = deployable anywhere.

๐Ÿ“ˆ Roadmap

Feature Status
Multi-agent pipeline (Liaison โ†’ Strategist โ†’ Auditor) โœ… v1.0.0
Whisper-Hinglish NLP pipeline โœ… v1.0.0
Multi-tenancy with isolated schemas โœ… v1.0.0
GST-compliant PDF invoicing โœ… v1.0.0
Docker + systemd deployment โœ… v1.0.0
CI/CD + Monitoring stack โœ… v1.0.0
Security audit (SOC 2 framework) โœ… v1.0.0
Owner analytics dashboard ๐Ÿ”„ In progress
Image-based order parsing (photo โ†’ SKU) ๐Ÿ“‹ Planned v1.1
UPI payment link injection ๐Ÿ“‹ Planned v1.1
Fine-tuned Whisper for 8 regional accents ๐Ÿ“‹ Planned v1.2

๐Ÿ’ฐ Pricing Model

Plan Price For
Starter โ‚น499/month 1 WhatsApp number, 500 orders/mo
Growth โ‚น1,499/month 3 numbers, 2K orders/mo, 3 users
Business โ‚น4,999/month Unlimited, dedicated support, custom integrations

Self-hosted is MIT licensed and free. Paid plans include managed hosting, SLA, and priority support.


๐Ÿ“– Documentation

Document Description
Deployment Guide Step-by-step production setup
Security Hardening Production security measures
Monitoring Setup Prometheus + Grafana guide
Backup Procedures Backup & disaster recovery
Runbooks Operational runbooks
Executive Summary Business overview

๐Ÿค Contributing

We actively welcome contributions in these high-impact areas:

  • Dialect Maps โ€” Hinglish vocabulary, regional terms, unit aliases
  • Industry Presets โ€” New business-type configs (electronics, furniture, etc.)
  • Test Audio Fixtures โ€” Real Hinglish voice note transcriptions
  • Query Optimizations โ€” PostgreSQL performance with EXPLAIN ANALYZE

See CONTRIBUTING.md for detailed guidelines.


๐Ÿ“„ License

MIT โ€” see LICENSE.

Built for the bazaar. Runs in the background. Never misses a bill.


Star History

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sutra_core-1.0.0-py3-none-any.whl (100.2 kB view details)

Uploaded Python 3

File details

Details for the file sutra_core-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sutra_core-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 100.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for sutra_core-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c2a2f977af19447ab045f618ebcdc4aa5cafb9d6ca2363a2970895dabcb1030
MD5 fc1e665356d9625776370a1ba7ffd72d
BLAKE2b-256 ff20909409701759b75d376c73351996729ea85fcd9a535484262906b14325ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page