Neurons: The Offline-First Agentic Harness for SMEs in African
💡 Inspiration
Across Sub-Saharan Africa, over 90% of retail stores, pharmacies, and local wholesalers operate under severe infrastructural constraints:
- Unreliable Internet Infrastructure: Frequent network downtime, and unstable ISP connections makes traditional cloud-dependent SaaS platforms completely unusable during critical business hours. When the connection drops, merchants cannot process checkout transactions, view inventory, or reconcile daily accounts.
- FX Volatility & High AI Token Costs: AI Tokens and SaaS subscriptions are typically billed in US Dollars (USD), exposing African SMEs to exchange-rate fluctuations and unpredictable AI usage costs. These additional expenses increase their operating costs and can significantly reduce already-limited profit margins.
- Mobile Data Costs: Many African SMEs rely on mobile networks for internet access, making continuous cloud connectivity an additional operating expense. Cloud-based business applications consume data every time information is sent to and retrieved from remote servers. Neurons moves these workloads to the local device, allowing merchants to continue running their business and using AI without requiring a constant internet connection.
Our inspiration: We built Neurons, an ultra-lightweight, modular, offline-first desktop operating system for SME's, powered by a fine-tuned edge language model (bau-small-1.5b.gguf). Neurons gives African merchants an AI-powered CFO, inventory auditor, and store manager that runs locally on everyday consumer laptops, enabling them to manage critical business operations and access AI assistance without relying on a constant internet connection or sending sensitive business data to the cloud.
What It Does
Neurons integrates six core operational functions of retail business management into a single offline desktop application. This provides merchants with a centralized system for managing daily operations, financial activities, inventory, staff, documentation, and internal tasks.
1. Documents and SOP Management
Neurons provides a documents management workspace for creating, editing, and managing business documents. This includes standard operating procedures, tax filing checklists, lease agreements, and other operational documentation. The local AI assistant can also assist with document drafting and revision.
2. Point of Sale and Cashier Reconciliation
The integrated POS system supports barcode scanning, receipt generation, register management, and cashier reconciliation. The system includes a Fraud Guard mechanism that automatically identifies potentially unauthorized discount overrides, including discounts exceeding the configured 15% threshold.
3. Warehouse and Inventory Management
Neurons provides inventory management across multiple branches and warehouse locations. Merchants can monitor stock levels, track inventory movements, and maintain a centralized view of products across their business.
4. Staff Management and Shift Scheduling
The staff management module maintains employee records, roles, working hours, and wage information. It supports hourly wage calculations, monthly payroll tracking, and AI-assisted staff rota generation based on operational requirements.
5. Finance and Profit & Loss Analytics
The finance module provides real-time visibility into revenue, expenditures, cash flow, and profit and loss. It also performs variance analysis to identify discrepancies between expected and recorded financial activity, helping merchants detect potential accounting or operational issues.
6. Task and Workflow Management
Neurons includes a three-stage Kanban task management system covering To Do, In Progress, and Done. Tasks can be assigned priority levels and linked to operational activities. The local AI assistant can also generate follow-up tasks based on business events, financial discrepancies, and operational requirements.
Offline AI Copilot
The AI Copilot is integrated directly into the desktop application and runs locally on the merchant's device. It can assist with operational analysis, document drafting, inventory review, financial analysis, staff scheduling, and task generation without requiring internet connectivity.
How We Built It
1. Edge AI Model Engineering (bau-small-1.5b.gguf)
- Base Architecture:
Qwen2.5-1.5B-Instruct - Quantization:
IQ3_XS(Importance Matrix-guided 3-bit quantization, binary size: ~698 MB) - Jinja Chat Template Baking: Embedded a custom MiniJinja template directly into the GGUF metadata defining 10 structured schemas with system-level instruction routing.
- Inference Runtime: Native
llama.cppcompiled with release CPU optimization running 4 physical compute threads.
2. High-Performance Desktop Frontend
- Shell & Tooling: Electron 35 + Vite 6 + React 19 + TypeScript 5.8
- Design System: Tailwind CSS v4 with custom dark mode tokens, glassmorphism, and responsive Lucide icons.
- Data Persistence: Dexie.js (IndexedDB) with
useLiveQueryreactive hooks and a local change logSyncEnginefor cloud synchronization any time connection is restored.
3. Optimization Formulation
Under the African Deep Tech Challenge 2026 evaluation criteria, performance is scored using:
$$ S_{\text{total}} = 0.50 \cdot S_{\text{acc}} + 0.30 \cdot S_{\text{perf}} + 0.20 \cdot S_{\text{eff}} - P_{\text{thermal}} $$
Where efficiency is constrained by:
$$ S_{\text{eff}} = 100 \times \left(1 - \frac{\text{RAM}_{\text{peak}}}{7000}\right) $$
With RAM budget = 7,000 MB and our measured RAM peak = 892.4 MB:
$$ S_{\text{eff}} = 100 \times \left(1 - \frac{892.4}{7000}\right) = 87.25 / 100 $$
Challenges We Faced
Small Model Mode Collapse & Overfitting:
- Problem: Initial fine-tuning on 100% JSON datasets caused the 1.5B model to lose conversational general intelligence (e.g., answering general store questions with arbitrary shift JSON).
- Solution: Engineered a baked Jinja chat template that routes general queries to
CONVERSATIONAL_CHATand research queries toDEEP_RESEARCH, achieving a 95.2% schema adherence score without degrading natural language reasoning.
MiniJinja C++ Lexer Escape Parsing:
- Problem:
llama.cpp's internal C++ Jinja engine choked on raw string escape sequences (\n), throwing unexpected character errors during runtime. - Solution: Rebuilt the template baker to emit clean multiline Jinja string concatenations (
{{ '<|im_start|>system\n' }}) compatible with both Python and C++ lexers.
- Problem:
Sub-1GB Memory Envelope on Integrated GPUs:
- Problem: Desktop electron applications combined with LLM runtime often balloon past 2 GB RAM.
- Solution: Used
IQ3_XSquantization and strict context window limits ($N_{\text{ctx}} = 1024$), keeping total runtime memory at 892.4 MB — consuming less than 13% of standard 8 GB laptop memory.
What We Learned
- Quantization Efficiency: Importance-matrix quantization (
IQ3_XS) preserves higher schema syntax precision at 3.3 bits/weight than standardQ4_K_Mwithout bloating the memory footprint. - Local-First Architecture: Combining Dexie.js IndexedDB with reactive React hooks (
useLiveQuery) delivers instantaneous UI updates (0 ms network latency), making the app feel significantly faster than traditional SaaS dashboards. - Constrained Decoding for Business Automations: Small, fine-tuned models excel at operational business tasks when outputs are bound to strict, machine-readable JSON schemas.
What's Next for Neurons
- Hardware ESC/POS Receipt Printer Bridge: Direct USB/Bluetooth integration for printing thermal till receipts and Z-reports without OS print dialogs.
- ** Multilingual African Dialect Support:** Fine-tuning localized prompting in Yoruba, Hausa, Igbo, and Pidgin for voice-driven cashier auditing.
Measured Benchmark Results
| Metric | Measured Value | Target / Limit | Status |
|---|---|---|---|
| Peak RAM Footprint | 892.4 MB | $\le 7,000\text{ MB}$ (7.0 GB) | ✅ PASS |
| Time to First Token (TTFT) | 510 ms | $\le 2,500\text{ ms}$ | ✅ PASS |
| Prompt Processing Speed | 9.10 t/s | Standard 4-thread CPU | ✅ PASS |
| Token Generation Speed | 3.76 t/s | Standard 4-thread CPU | ✅ PASS |
| Schema Accuracy Score ($S_{\text{acc}}$) | 95.2 / 100 | Structured JSON Validity | ✅ PASS |
| Thermal Throttle Penalty ($P_{\text{thermal}}$) | 0.00 pts | No throttling observed | ✅ PASS |
| Official Total Score ($S_{\text{total}}$) | 72.63 / 100 | ADTC 2026 Standard Laptop | ✅ PASS |

Log in or sign up for Devpost to join the conversation.