WFI silently monitors work patterns, identifies repetitive tasks, scores them for automation potential, and generates AI-powered audit reports with precise ROI projections.
Most audit and reporting workflows inside organizations are slow, repetitive, and almost entirely manual. Work that a well-designed AI system should handle automatically.
Managers spending hours generating reports that should be automated. Every single week.
Data analysts copying figures between Excel sheets manually, introducing human error at scale.
No clear data on which workflows are actually bottlenecks vs. genuine value-adds.
WFI replaces manual audit workflows with an autonomous system that monitors, analyzes, and reports — continuously.
Python tracker captures active applications every 60 seconds via Win32 API. Under 2% CPU overhead.
Discovers recurring behavioral patterns from raw usage data using n-gram sequence analysis algorithms.
Assembles mined patterns into structured workflow definitions with dependency mapping and metrics.
Dual AI engine — rule-based + fine-tuned Mistral 7B via QLoRA — generates business context and ROI.
Real-time tracking, pattern mining, AI suggestions, and report generation.
A dual-engine architecture combining deterministic rule-based logic with a fine-tuned Mistral 7B model for context-aware workflow analysis. Full enterprise-grade security stack.
Logs active application every 60 seconds with <2% CPU overhead. Silent background process.
Session Aggregator → Pattern Miner → Workflow Builder → Business Context Generator.
Rule-based logic (always on) + Fine-tuned Mistral 7B via QLoRA for context-aware insights.
JWT auth, RBAC, AES-256 encryption, audit middleware, async PDF reports, 24h background scheduler.
Every component, every endpoint, every design decision — fully documented for open source contributors.
WFI_ANALYSIS_PRO/ ├── backend/ # FastAPI Python Backend │ ├── app/ │ │ ├── main.py # App entry + middleware + lifespan │ │ ├── config.py # Pydantic Settings (env vars) │ │ ├── database.py # Async SQLAlchemy setup │ │ ├── models.py # ORM: User, ActivityLog, Suggestion, Audit, Config │ │ ├── schemas.py # Pydantic request/response schemas │ │ ├── security.py # JWT, bcrypt, Fernet encryption, RBAC │ │ ├── ai_engine.py # Rule-based pattern analyzer + scorer │ │ ├── llm_engine.py # LLM AI engine (Ollama/API/Local) │ │ ├── workflow_builder.py # 4-stage workflow abstraction pipeline │ │ ├── report_service.py # PDF gen (ReportLab + Matplotlib) │ │ ├── email_service.py # Async SMTP email service │ │ ├── audit_middleware.py # Request logging middleware │ │ ├── scheduler.py # Background analysis worker │ │ ├── seed.py # Demo data seeder │ │ ├── training_data_exporter.py # Real data → training JSONL │ │ ├── synthetic_data_generator.py# Synthetic training data │ │ ├── finetune_pipeline.py # QLoRA fine-tuning │ │ ├── eval_pipeline.py # Model evaluation │ │ └── routes/ │ │ ├── auth.py # /api/v1/auth/* │ │ ├── activity.py # /api/v1/activity/* │ │ ├── analytics.py # /api/v1/analytics/* │ │ ├── config.py # /api/v1/config/* │ │ └── reports.py # /api/v1/reports/*, audit/*, scheduler/* │ ├── Dockerfile │ ├── Modelfile # Ollama model configuration │ └── requirements.txt ├── frontend/ # React + TypeScript + Vite │ ├── src/ │ │ ├── main.tsx # React entry point │ │ ├── App.tsx # Auth + routing │ │ ├── api.ts # API client (all endpoints) │ │ ├── theme.ts # MUI dark theme │ │ ├── index.css # Global styles + animations │ │ ├── components/ │ │ │ └── Layout.tsx # Sidebar + top bar │ │ └── pages/ │ │ ├── LoginPage.tsx # Gradient login page │ │ ├── DashboardPage.tsx # Metrics + charts + AI + PDF │ │ ├── ActivityPage.tsx # Activity logs │ │ ├── SuggestionsPage.tsx # AI suggestions │ │ └── SettingsPage.tsx # System settings │ ├── package.json │ └── Dockerfile ├── tracker/ # Windows Activity Tracker │ └── tracker.py # Win32 API, batch upload, local fallback ├── docs/ # Layered Documentation │ ├── INDEX.md # Reading guide │ ├── 1-planning/ # PRD + TDD │ ├── 2-guides/ # Deployment, Users, AI/ML │ └── 3-changelog/ # Version history ├── docker-compose.yml # Full stack Docker config ├── README.md # Project overview └── STATE.md # Current project status
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| Authentication | |||
| POST | /api/v1/auth/login | — | Login with email/password, returns JWT |
| POST | /api/v1/auth/register | — | Register new user |
| POST | /api/v1/auth/refresh | — | Refresh access token |
| GET | /api/v1/auth/me | User | Current user profile |
| Activity Data | |||
| GET | /api/v1/activity/logs | User | Activity logs (filtered, paginated) |
| POST | /api/v1/activity/logs/batch | User | Batch upload activity logs |
| Analytics & AI | |||
| GET | /api/v1/analytics/dashboard/{user_id} | User | Dashboard metrics & charts data |
| GET | /api/v1/analytics/team/{department} | Manager+ | Team analytics |
| GET | /api/v1/analytics/automation-suggestions | User | AI-generated automation suggestions |
| POST | /api/v1/analytics/run-analysis | User | Run rule-based analysis |
| POST | /api/v1/analytics/run-llm-analysis | User | Run LLM-powered analysis (Mistral 7B) |
| Reports & Audit | |||
| POST | /api/v1/reports/generate | User | Generate & download PDF report |
| POST | /api/v1/reports/generate-and-email | User | Generate PDF + email delivery |
| GET | /api/v1/reports/list | User | List generated reports |
| GET | /api/v1/audit/logs | Manager+ | View audit trail |
| Scheduler & Config | |||
| POST | /api/v1/scheduler/trigger | Admin | Manually trigger analysis |
| GET | /api/v1/scheduler/status | Admin | Scheduler status |
| GET | /api/v1/config/settings | Admin | System configuration |
| PUT | /api/v1/config/settings/{key} | Admin | Update a setting |
| GET | /api/v1/config/monitoring | Manager+ | System health metrics |
30-min access tokens + 7-day refresh. python-jose + bcrypt password hashing.
3-tier roles: Employee → Manager → Admin. Per-endpoint permission checks.
Fernet symmetric encryption for sensitive data. SHA-256 one-way hashing for window titles.
Auto-logs every API request: user, action, IP, duration. Path sanitization for sensitive routes.
| Role | Own Data | Team Data | System Config | Audit Logs | Scheduler |
|---|---|---|---|---|---|
| Employee | ✅ | ❌ | ❌ | ❌ | ❌ |
| Manager | ✅ | ✅ | ❌ | ✅ | ❌ |
| Admin | ✅ | ✅ | ✅ | ✅ | ✅ |
Win32 GetForegroundWindow() every 60s. Records app, title, type, CPU%, memory%.
Auto-login via JWT. Batch upload to API. Local JSON fallback if offline.
Rule-based instant scoring + LLM workflow analysis via 4-stage pipeline.
PDF with charts + ROI. Async SMTP email. 24h auto-scheduler.
React dashboard with real-time data, charts, AI panel, and PDF download.
I'd rather say that openly than present a version that looks more finished than it is.
The architecture went from "just working" to genuinely scalable
Local AI orchestration with Docker + Railway became stable enough for continuous production use
Fine-tuned workflows producing far more context-aware outputs than earlier iterations
The system now feels less like a prototype and more like a company foundation
Report formatting and output intelligence still need significant improvement
GPU inference is partially local due to computational constraints — removing that dependency is the next major milestone
The infrastructure is production-grade. The product experience is not fully polished yet
WFI is fully open source. Get started in minutes with these commands.
Check out the source code, explore the architecture, or reach out to discuss how workflow intelligence can transform your organization.