How fchfaz/cosmos works
Jarvis is a personal assistant with a laptop-hosted server and Android notification relays. The main workflow is device notification ingestion into a filtered, deduplicated inbox, or owner chat through Telegram/PWA; the assistant routes requests to skills, with approval required for external write actions. Email polling, Instagram DM access, notes, system actions, and offline/local/cloud language-model modes are additional product capabilities. Several central modules and the PWA are represented from README or SOURCE INDEX evidence because their implementations were not excerpted; uncertain internal links are omitted.
Main entry points: context.py Runtime context · main.py HTTP server · brain.py Request brain · approval.py Approval manager
Components 25
Interfaces and devices
- HTTP server
core/main.py - Telegram bot
interfaces/telegram_bot.py - PWA
interfaces/web/index.html - Termux relay
android/termux/relay.sh - Kotlin relay
android/NotificationRelay/app/src/main/java/id/jarvis/relay/RelayService.kt
Assistant core
- Runtime context
core/context.py - Request brain
core/brain.py - Skill registry
core/registry.py - LLM router
core/llm.py - Approval manager
core/approval.py
Assistant capabilities
- Skill contract
skills/base.py - Notification inbox
skills/notif_skill.py - Gmail skill
skills/email_skill.py - Instagram DM
skills/instagram_skill.py - Notes skill
skills/notes_skill.py - System skill
skills/system_skill.py
Persistence and safety
- SQLite database
core/db.py - Event bus
core/bus.py - Safety filters
core/safety.py - Settings
core/config.py
Other components
- Assistant owner
- Android devices
- Gmail API
- Meta Graph API
- LLM services
Connections 36
- Assistant owner → HTTP server: sends requests
README.md - Assistant owner → Telegram bot: chats
README.md - Assistant owner → PWA: uses
README.md - Android devices → Termux relay: runs relay
README.md - Android devices → Kotlin relay: runs relay
README.md - Termux relay → HTTP server: posts notifications
README.md - Kotlin relay → HTTP server: posts notifications
README.md - HTTP server → Runtime context: creates
core/main.py - HTTP server → Request brain: routes chat
core/main.py - HTTP server → Telegram bot: starts
core/main.py - Runtime context → SQLite database: creates
core/context.py - Runtime context → Event bus: creates
core/context.py - Runtime context → LLM router: creates
core/context.py - Runtime context → Skill registry: creates
core/context.py - Runtime context → Approval manager: creates
core/context.py - Runtime context → Request brain: creates
core/context.py - Runtime context → Settings: uses
core/context.py - Runtime context → Event bus: subscribes handlers
core/context.py - Request brain → Safety filters: uses
core/brain.py - Request brain → LLM router: uses
- Request brain → Skill registry: dispatches actions
- Skill registry → Skill contract: loads plugins
core/registry.py - Telegram bot → Skill registry: calls skills
interfaces/telegram_bot.py - Telegram bot → Approval manager: decides approvals
interfaces/telegram_bot.py - HTTP server → Approval manager: handles decisions
core/main.py - HTTP server → Notification inbox: ingests notifications
- Notification inbox → Event bus: publishes events
skills/notif_skill.py - Notification inbox → SQLite database: reads dedup and events
skills/notif_skill.py - Event bus → SQLite database: stores events
core/bus.py - Gmail skill → Gmail API: reads and sends
README.md - Instagram DM → Meta Graph API: uses Graph API
skills/instagram_skill.py - Instagram DM → SQLite database: reads notification events
skills/instagram_skill.py - Gmail skill → Approval manager: requires approval
README.md - Instagram DM → Approval manager: requires approval
README.md - LLM router → LLM services: calls configured model
- PWA → HTTP server: uses API