How ndeshpan30/laif works
Autonomous Cognitive Offloader pairs a conversational BuJo logger with a deterministic life scheduler: users state goals, log activities, or announce deadlines; the backend extracts typed intent, applies memory guardrails, and delegates calendar placement to a CP-SAT solver. Separate flows ingest syllabus PDFs and episodic constraints for retrieval and knowledge-graph exploration, while telemetry updates dynamic trackers and logs. The Ledger presents recorded activity. Paths and links reflect the supplied tree, README capabilities, and sampled code; unsampled endpoint wiring is shown only where documented, and uncertain call relations are omitted.
Main entry points: main.py FastAPI App · database.py Database Session & Schema · page.tsx Conversation UI · conversation.py Conversation Service
Components 26
User Experience
- Conversation UI
frontend/app/page.tsx - Speech Manager
frontend/components/SpeechManager.ts - Sound Manager
frontend/components/SoundManager.ts - Ledger Dashboard
frontend/app/ledger/page.tsx - Knowledge Graph UI
frontend/app/web/page.tsx - Graph View & Details
frontend/components/KnowledgeGraphView.tsx
Conversation & Scheduling
- FastAPI App
backend/app/main.py - Conversation API
backend/app/api/conversation.py - Conversation Service
backend/app/services/conversation.py - Goal & Telemetry Extraction
backend/app/services/gemini_client.py - CP-SAT Scheduler
backend/app/solver/scheduler.py - Schedule API
backend/app/api/schedule.py
Memory & Knowledge Graph
- Semantic API
backend/app/api/semantic.py - Syllabus & Constraint RAG
backend/app/services/rag.py - Knowledge Graph API
backend/app/api/knowledge_graph.py - Knowledge Graph Service
backend/app/services/knowledge_graph.py
BuJo Telemetry & Ledger
- Telemetry API
backend/app/api/telemetry.py - Telemetry Engine
backend/app/services/telemetry_engine.py - Tracker API
backend/app/api/trackers.py
Persistence
- User API
backend/app/api/user.py - Database Session & Schema
backend/app/database.py - Domain Models
backend/app/models
Other components
- User
- LLM Provider
- Browser Audio & Speech
- Frontend Client
Connections 41
- User → Conversation UI: states goals
- Conversation UI → Speech Manager: captures speech
- Conversation UI → FastAPI App: sends requests
- FastAPI App → Conversation API: dispatches
- Conversation API → Conversation Service: handles conversation
- Conversation Service → Goal & Telemetry Extraction: extracts intent
- Goal & Telemetry Extraction → LLM Provider: requests generation
- Conversation Service → CP-SAT Scheduler: solves schedule
- Conversation Service → Syllabus & Constraint RAG: retrieves context
- Conversation UI → Sound Manager: plays feedback
- Sound Manager → Browser Audio & Speech: generates tones
- Speech Manager → Browser Audio & Speech: uses speech APIs
- User → Semantic API: uploads syllabus
- FastAPI App → Semantic API: dispatches
- Semantic API → Syllabus & Constraint RAG: ingests and retrieves
- Syllabus & Constraint RAG → Database Session & Schema: reads and writes context
- User → Schedule API: manages schedule
- FastAPI App → Schedule API: dispatches
- Schedule API → CP-SAT Scheduler: solves schedule
- Schedule API → Database Session & Schema: reads and writes schedule
- User → Telemetry API: logs activities
- FastAPI App → Telemetry API: dispatches
- Telemetry API → Goal & Telemetry Extraction: extracts data points
- Telemetry API → Telemetry Engine: processes logs
- Telemetry Engine → Database Session & Schema: reads and writes trackers and logs
- Telemetry Engine → Knowledge Graph Service: syncs logged nodes
- User → Tracker API: manages trackers
- FastAPI App → Tracker API: dispatches
- Tracker API → Database Session & Schema: reads and writes trackers
- User → User API: manages profile
- FastAPI App → User API: dispatches
- User API → Database Session & Schema: reads and writes user
- Database Session & Schema → Domain Models: maps records
- Frontend Client → Ledger Dashboard: views ledger
- Frontend Client → Knowledge Graph UI: explores graph
- Knowledge Graph UI → FastAPI App: fetches graph
- FastAPI App → Knowledge Graph API: dispatches
- Knowledge Graph API → Knowledge Graph Service: builds graph
- Knowledge Graph Service → Database Session & Schema: reads graph data
- Knowledge Graph UI → Graph View & Details: renders filtered graph
- Ledger Dashboard → FastAPI App: loads ledger data