Moirai is a local-first, cloud-augmented resident agent for Windows that transforms passive digital behavior into an actionable life narrative. Unlike traditional productivity tools that demand manual input, Moirai operates as a background chronicler—observing, compressing, and narrating your digital life through the metaphor of the Three Fates from Greek mythology.
Core Paradigm:
Clotho captures the raw moment. Lachesis weaves meaning. Atropos grants you the final cut.
Moirai consists of four primary components, each serving a distinct purpose in the narrative lifecycle:
Technology: Go
Role: System capture and telemetry spooling
Location: Background Windows process
Clotho integrates deeply with Windows APIs to capture system activity:
- UI Automation for window tracking and process monitoring
- Raw Input API for measuring input velocity (keys/minute, scroll deltas)
- Windows Graphics Capture for smart screenshots during high-intent activities
Key Features:
- Privacy-first design: captures velocity metrics, never raw keystrokes
- Hierarchical storage: organized by Year/Quarter/Week/Day
- Smart screenshot capture triggered by IDE usage or high-velocity activity
Technology: Go + Groq
Role: AI narrative generation and processing
Location: Batch processing service
Lachesis transforms raw telemetry into meaningful narratives:
- Processes daily activity data from Clotho
- Integrates with Groq API ( Llama 3.3 versatile and 4 Maverick )
- Generates narrative summaries and intent classifications
- Outputs both human-readable markdown and structured JSON
Processing Pipeline:
- Reads telemetry data from hierarchical storage
- Extracts text from screenshots using Llama Vision
- Sends metadata + OCR + historical context to Llama 3.3 Versatile
- Receives narrative summary + intent classification
- Saves results as daily chronicles
Technology: Electron + React + TypeScript
Role: User interface and control center
Location: Desktop application
Atropos provides the visual interface for interacting with your narrative:
- System tray integration for minimal intrusion
- Dashboard views for activity chronicles
- Environmental reshaping (resume threads, cut noise)
- Real-time data updates via file system watchers
- Settings management and privacy controls
Features:
- Chronicle tree visualization (Year/Quarter/Week/Day hierarchy)
- Activity pulse indicator (productive/scattered/idle)
- Thread notifications for extended focus sessions
- One-click thread resumption (restore window states)
- Chat interface to ask about your past and work on your future
- Demo mode for testing without real data
Technology: Next.js + React + TypeScript
Role: Marketing website and project showcase
Location: Web application
Aphrodite presents Moirai to the world with a premium, immersive experience:
- Scroll-driven narrative timeline
- WebGL-powered visual effects
- Responsive design with smooth animations (Kind of...Still working on this!)
moirai/
├── clotho/ # System capture service (Go)
│ ├── internal/
│ │ ├── capture/ # Screenshot and screen capture
│ │ ├── config/ # Configuration management
│ │ ├── hooks/ # System event listeners
│ │ ├── storage/ # Hierarchical path management
│ │ ├── telemetry/ # Data collection and storage
│ │ └── worker/ # Background processing
│ ├── go.mod
│ └── main.go
│
├── lachesis/ # Narrative processing engine (Go)
│ ├── internal/
│ │ ├── processor/ # AI integration and analysis
│ │ ├── reader/ # Telemetry data reading
│ │ └── writer/ # Output generation
│ ├── go.mod
│ └── main.go
│
├── atropos/ # Desktop application (Electron)
│ ├── electron/ # Main process and IPC
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Application views
│ │ ├── hooks/ # Custom React hooks
│ │ ├── store/ # Zustand state management
│ │ ├── services/ # API integrations
│ │ └── utils/ # Utility functions
│ └── package.json
│
├── aphrodite/ # Landing page (Next.js)
│ ├── src/
│ │ ├── app/ # Next.js app router
│ │ ├── components/ # React components
│ │ └── hooks/ # Custom hooks
│ └── package.json
│
├── .github/ # GitHub workflows and CI/CD
├── LICENSE
└── project.md # Detailed project specification
- Windows 10/11 (64-bit) (Windows Only)
- Go 1.25.7+ (for building Clotho and Lachesis)
- Node.js 18+ (for building Atropos and Aphrodite)
- Git
git clone https://github.com/AtharvRG/moirai.git
cd moiraicd clotho
go mod download
go build -o clotho.exe .
cd ..cd lachesis
go mod download
go build -o lachesis.exe .
cd ..cd atropos
npm install
npm run build
npm run electron:build
cd ..The built application will be in atropos/dist/.
cd aphrodite
npm install
npm run build
cd .../clotho/clotho.exeClotho will start capturing system activity and storing telemetry data in:
%LOCALAPPDATA%\Moirai\chronicle\<YEAR>\<QUARTER>\<WEEK>\<DATE>.db
Privacy Controls:
- Press
Ctrl+Shift+Endto terminate Clotho and wipe unprocessed data - Configure capture settings in
%LOCALAPPDATA%\Moirai\config.json
./lachesis/lachesis.exeLachesis will:
- Read today's telemetry data
- Process screenshots with Llama Vision
- Generate narrative summaries
- Save results to the chronicle directory
Output:
- Markdown narrative:
<DATE>_summary.md - Structured data:
<DATE>_structured.json
Launch the installed application from the Start Menu or run:
cd atropos
npm run electron:devFeatures:
- View daily chronicles in the Chronicle Tree
- Monitor real-time activity pulse
- Resume previous work threads
- Configure privacy and capture settings
- Export/import data
- Enable demo mode for testing
Create or edit %LOCALAPPDATA%\Moirai\config.json:
{
"dataRoot": "%LOCALAPPDATA%\\Moirai\\chronicle",
"captureInterval": 30,
"screenshotQuality": 0.7,
"enableSmartCapture": true,
"highIntentProcesses": ["code.exe", "devenv.exe", "idea64.exe"],
"velocityThreshold": 100
}Set environment variables for Groq API access(Temporary method):
$env:GROQ_API_KEY="your_actual_groq_key_hereSettings are managed through the application UI:
- System Tray → Settings
- Configure API keys, auto-launch, data paths, and privacy options
Moirai is designed with privacy as a core principle:
- Raw keystrokes are NEVER stored (only velocity metrics)
- Screenshots are processed locally before any cloud transmission
- The Redaction Layer strips File path using regex and window detection
- All raw data stays on your machine
Groq only receives:
- Redacted screenshots (optional, user-toggleable) (Working on this!)
- Process names (e.g., "code.exe")
- Window title hashes (not raw titles for sensitive apps)
- Velocity vectors
- Windows UI Access (for cross-window title reading)
Every 30 seconds, Clotho writes to local:
timestamp | process | window_hash | kps | scroll_vel | thread_id
Triggered when process == code.exe OR velocity > threshold:
- JPEG screenshot (quality 0.7)
- Stored in hierarchical folder structure
- Redaction layer applied before transmission
Every 5-10 minutes (configurable):
- Llama Vision extracts text from screenshots
- Llama 4 Maverick receives: metadata + OCR + historical context
- Returns: narrative summary + intent classification
- Hot Data: Last 7 days (raw spool + screenshots)
- Compressed: Daily summaries after 7 days (narrative text only)
- Archived: Quarterly compression to cold storage
cd clotho
go run main.gocd lachesis
go run main.gocd atropos
npm run electron:devcd aphrodite
npm run devcd clotho
go test ./...
cd ../lachesis
go test ./...cd atropos
npm run lint
npm run build- Windows process monitoring and velocity tracking
- Smart screenshot capture
- Groq integration for OCR and narrative generation
- Hierarchical Chronicle storage
- Environmental reshaping (resume/cut threads)
- Electron-based system tray interface
- Cross-device sync
- Local LLM inference (offline mode)
- Mobile App integration
- Collaborative/shared narratives
- Advanced analytics and insights
- Custom intent classification models
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
We follow conventional commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringperf:- Performance improvementstest:- Test additions or modificationschore:- Build process or auxiliary tool changes
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the Greek mythology of the Three Fates (Moirai)
- Built with modern web and systems programming technologies
- Powered by Groq and Llama
For issues, questions, or feature requests:
- Open an issue on GitHub
- Check the project documentation for detailed specifications
Moirai does not manage your time. It reveals the story of how you spend it.
The system embraces "epistolary latency"—rather than interrupting you with real-time suggestions, it observes for 5-10 minutes before weaving a narrative summary. This transforms the AI from an intrusive assistant into a perceptive diarist, someone who reflects rather than reacts.
If the narrative feels wrong, you simply cut it. No damage done.